Programming Actions and Conditions
S7-GRAPH for S7-300/400 Programming Sequential Control Systems
C79000-G7076-C526-01
7-13
Assignments with Operator
Enter assignments with an operator with the syntax A:=B<operator>C. These
assignments are basic math functions and bit logic operations. The assigned
address A specifies the data type of the expression. You can use the following
assignments with an operator:
Assignments with
Operator
Comment
A := B + C +I, +D, +R
A := B - C -I, -D, -R
A := B * C *I, *D, *R
A := B / C /I, /D, /R
When necessary, the operator can be supplemented by +D/+R in
the basic math functions.
A := B MOD C Modulo: Only for data type DINT
A := B AND C AND operation (STL instructions: AW, AD)
A := B OR C OR operation (STL instructions: OW, OD)
A := B XOR C EXCLUSIVE OR operation (STL instructions: XOW, XOD)
A := B SHL C Shift left, 0<=C<=255 (STL instructions: SLW, SLD)
A := B SHR C Shift right, 0<=C<=255 (STL instructions: SRW, SRD)
A := B SSR C Shift right with sign, 0<=C<=255 (STL instructions: SSI, SSD)
A := B ROL C Rotate left, 0<=C<=255 (STL instructions: RLD)
A := B ROR C Rotate right, 0<=C<=255 (STL instructions: RRD)