DVP-ES2/EX2/EC5/SS2/SA2/SX2/SE&TP Operation Manual - Programming
Numeric Values
1. Devices indicates ON/OFF status are called bit devices, e.g. X, Y, M and S. Devices used for
storing values are called word devices, e.g. T, C, D, E and F. Although bit device can only be
ON/OFF for a single point, they can also be used as numeric values in the operands of
instructions if the data type declaration device Kn is added in front of the bit device.
2. For 16-bit data, K1~K4 are applicable. For 32-bit data, K1~K8 are applicable. For example,
K2M0 refers to a 8-bit value composed of M0 ~ M7.
M15 M14 M13 M12 M
11 M10 M9 M8 M7 M6 M5 M4 M3 M2 M0M1
0 0 0 0 0 0 0 0
0000 1 1 1 1
11111111
D1
D1
1111 000000000000
b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b0b1
0000000
0
Valid data
Reset to 0
Transmit to
Equals
Low byte
Low byte
3. Transmit K1M0, K2M0, K3M0 to 16-bit registers. Only the valid bit data will be transmitted
and the upper bits in the 16-bit register will all be filled with 0. The same rule applies when
sending K1M0, K2M0, K3M0, K4M0, K5M0, K6M0, K7M0 to 32-bit registers.
4. When the Kn value is specified as K1~K3 (K4~K7) for a 16-bit (32-bit) operation, the empty
upper bits of the target register will be filled with “0.” Therefore, the operation result in this
case is positive since the MSB(Most significant bit) is 0.
The BCD value combined by X0 to X7 will be
converted to D0 as BIN value.
Assign Continuous Bit Numbers
As already explained, bit devices can be grouped into 4 bit units. The “n” in Kn defines the number
of groups of 4 bits to be combined for data operation. For data register D, consecutive D refers to
D0, D1, D2, D3, D4…; For bit devices with Kn, consecutive No. refers to:
K1X0 K1X4 K1X10 K1X14…
K2Y0 K2Y10 K2Y20 Y2X30…
K3M0 K3M12 K3M24
K3M36…
K4S0 K4S16 K4S32 K4S48…
Note: To avoid errors, please do not skip over the continuous numbers. In additoin, when K4Y0 is
used in 32-bit operation, the upper 16-bit is defined as 0. Therefore, it is recommended to use
K8Y0 in 32bit operation.