Delta ISPSoft — 13.2.1 Assignment Structure─:=

Chapter 13 Structured Texts 13.2 Structure of a Statement 13.2.1 Assignment Structure─:=  Format  Description The value represented by the expression at the right side of := is assigned (transmitted) to the device or the symbol at the left side of :=.  Rules and limits  The expression at the right side of := can be a constant, a device, a symbol, or an arithmetic expression. Only a device or a symbol can be at the left side of :=.  For the assignment / transmission, the operands at both sides of := must conform to the rules listed below. (a) One operand is an M/S/T/C/HC device, and the other operand is a symbol whose data type is BOOL/STEP/TIMER/COUNTER.

(The device assigned to the operand which is a symbol is a bit device.) (b) One operand is a D/L device, and the other operand is a symbol whose data type is not BOOL/STEP/REAL/STRING. (c) One operand is a T/C device, and the other operand is a D/L device or a symbol whose data type is WORD/INT/TIMER/COUNTER. (d) One operand is a D/L/HC device, or a symbol whose data type is COUNTER, and to which a HC device is assigned. The other operand is a symbol whose data type is DWORD/DINT. (e) One operand is a symbol whose data type is WORD and the other operand is a symbol whose data type is INT. (f) Both operands are symbols whose data types are REAL/STRING.

The data lengths of the operands must be the same. (g) One operand is a symbol whose data type is WORD, and the other operand is a symbol whose data type is DWORD. The transmission direction can only be from WORD to DWORD but not the other way around or the data might be lost. (h) One operand is a symbol whose data type is INT, and the other operand is a symbol whose data type is DINT. The transmission direction can only be from INT to DINT but not the other way around or the data might be lost. 13-11