Assignment Statement
Assignment Statement substitutes a value or a result from calculation to the variable or PLC device.
The PLC device where the constant, the value of variable and the result of calculation has to be placed on the left side of operator ‘:=’. All the assignment statements must be ended with " ; ".
Format: Identifier := Expression
Identifier can be a variable or a PLC Device.
In Expression, a constant, PLC Device variable (the value that PLC Device has) and the Expressions listed in [Expressions] can be used.
Example
Example | Description |
MX00 := 1; | 1 is substituted to M00 |
DW100 := 100; | 100 is substituted to D100 |
DW500 := DW00 + DW01; | The result of the summation of D0 and D1 is substituted to D500 |