5 Applied Instructions and Basic Usage
counters C0~C199 can be used in the same way.
5. If the 32-bit counters C200~C255 are used as data registers, they can be operands used by 32-bit
instructions.
Operand type
1. X devices, Y devices, M devices, and S devices can only be turned ON or OFF. They are bit
devices.
2. 16-bit (or 32-bit) T devices, C device, D devices, V devices, and Z devices are word devices.
3. If Kn is added to the front of an X/Y/M/S device, a word device will be formed. For example, K2M0
represents a device composed of the eight bit devices M0~M7.
X0
K2M0 D10MOV
When X0 is ON, the values of M0~M7 are moved to
bit 0~bit 7 in D10, and bit 8~bit 15 are set to 0.
Values in word devices composed of bit devices
16-bit instruction 32-bit instruction
A 16-bit value is in the range of K-32,768 to
K32,767.
A 32-bit value is in the range of K-2,147,483,648 to
K2,147,483,647.
Value in a word device composed of bit
devices
Value in a word device composed of bit devices
K1 (4 bits) 0~15 K1 (4 bits) 0~15
K2 (8 bits) 0~255 K2 (8 bits) 0~255
K3 (12 bits) 0~4,095 K3 (12 bits) 0~4,095
K4 (16 bits) -32,768~+32,767 K4 (16 bits) 0~65,535
K5 (20 bits) 0~1,048,575
K6 (24 bits) 0~167,772,165
K7 (28 bits) 0~268,435,455
K8 (32 bits) -2,147,483,648~+2,147,483,647
General flags
Example: M1968 is a zero flag, M1969 is a borrow flag, and M1970 is a carry flag
Every flag in a DVP-20PM series motion controller corresponds to an operation result.
The state of a flag varies with an operation result. For example, if the instruction ADD/SUB/MUL/DIV is
used in the main program O100~M102, the operation result gotten will affect the states of
M1968~M1970. However, if the instruciton is not executed, the states of the flags will remain
unchanged. The states of flags are related to instructions. Please refer to the explanations of
instructions for more information.
5.3 Processing Values
X devices, Y devices, M devices, and S devices can only be turned ON or OFF. They are bit devices.
Values can be stored in T device, C devices, D devices, V devices, and Z devices. They are word
devices. If Kn is added to the front of an X/Y/M/S device, a word device will be formed.
If Kn is added to the front of an X/Y/M/S device, a word device will be formed. For example, K2M0
represents a device composed of the eight bit devices M0~M7.
M15 M14 M13 M12 M11 M10 M9 M8 M7 M6 M5 M4 M3 M2 M0M1
The values in M0~M7 are moved.
Equal to
Bit 8~bit 15 are set to 0.
00000000
00001 1 1 1
11111111
D1
Low byte
D1
1111000000000000
b15
b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b0b1
0000000
0
Valid data
Low byte
DVP-20PM Application Manual
5-7