5 Categories and Use of Basic Application Instructions X0 When X0 = ON, the contents in M0 ~ M7 will be moved to b0 ~b7 in D10 and b8 ~ b15 will be set to “0”. ‹ Kn values ‹ Flags The flags listed below are used for indicating the operation result of the application instruction: M1968: zero flag M1969: borrow flag M1970: carry flag All flags will turn ON or OFF according to the operation result of an instruction. For example, the execution result of instructions ADD/SUB/MUL/DVI in O100 mian program will affect the status of M1968 ~ M1970. When the instruction is not executed, the ON/OFF status of the flag will be held. The status of the four flags relates to many instructions.
See relevant instructions for more details. 5.3 Numeric Values for Data Processing ‹ 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 ‹ For 16-bit data, K1~K4 are applicable. For 32-bit data, K1~K8 are applicable. For example, K2M0 refers to a front of the bit device. 8-bit value composed of M0 ~ M7.
Valid data M15 M14 M13 M12 M11 M10 M9 M8 M7 M6 M5 M4 M3 M2 M0 M1 Transmit to Low byte Reset to 0 D1 b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b0 b1 0 0 0 0 0 0 0 0 Equals Low byte D1 ‹ Transmit K1M0, K2M0, K3M0 to 16-bit registers. ONly the valid bit data will be transmitted and the upper bits in DVP-PM Application Manual 5-7 MOV K2M0 D10 16-bit instruction 32-bit instruction Designated value: K-32,768 ~ K32,767 Designated value:
K-2,147,483,648 ~ K2,147,483,647 Values for designated K1 ~ K4 Values for designated K1 ~ K8 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 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1