Hello fellow enthousiasts,
I having a small Structured Text problem on an Omron CJ2M using CX-programmer.
I’m trying to use an SHL instruction but I can’t get it to work because I have no idea how to make it shift.
The syntax sort of looks like this: A:= SHL (B,C)
A being the outcome
B being the word I want to shift left
C being the number of bits I want to move it
But what makes the instruction shift, where do I put my clock pulse or machine cycle pulse?
I tried placing it in an IF statement:
IF P_1s THEN
A:= SHL (B,C)
END_IF
The compiler agrees with the syntax but no output whatsoever on A:=
What am I missing here?
Thanks in advance!
Greetings,
Andy
I having a small Structured Text problem on an Omron CJ2M using CX-programmer.
I’m trying to use an SHL instruction but I can’t get it to work because I have no idea how to make it shift.
The syntax sort of looks like this: A:= SHL (B,C)
A being the outcome
B being the word I want to shift left
C being the number of bits I want to move it
But what makes the instruction shift, where do I put my clock pulse or machine cycle pulse?
I tried placing it in an IF statement:
IF P_1s THEN
A:= SHL (B,C)
END_IF
The compiler agrees with the syntax but no output whatsoever on A:=
What am I missing here?
Thanks in advance!
Greetings,
Andy
Last edited: