Mitsubishi — 5.3 Processing Values

AH500 Motion Control Module Manual  Values in word device composed of bit devices  General flags Every flag in a module corresponds to an operation result. Example: SM968 is a zero flag, SM969 is a borrow flag, and SM970 is a carry flag 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 SM968~SM970. 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 M/S device, a word device will be formed.  If Kn is added to the front of an M/S device, a word device will be formed. For example, K2M0 represents a device composed of the eight bit devices M0~M7. Valid data M15 M14 M13 M12 M11 M10 M9 M8 M7 M6 M5 M4 M3 M2 M0 M1 Low byte Bit 8~bit 15 are set to 0. The values in M0~M7 are moved.

D1 b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b0 b1 0 0 0 0 0 0 0 Equal to Low byte  The value in K1M0 is moved to a 16-bit register, and bit 4~bit 15 in the register are set to 0. The value in K2M0 is moved to a 16-bit register, and bit 8~bit 15 in the register are set to 0. The value in K3M0 is moved to a 16-bit register, and bit 12~bit 15 in the register are set to 0. The value in K1M0 is moved to a 32-bit register, and bit 4~bit 31 in the register are set to 0. The value in K2M0 is moved to a 32-bit register, and bit 8~bit 31 in the register are set to 0. The value in K3M0 is moved to a 32-bit register, and bit 12~bit 31 in the register are set to 0.

The value in K4M0 is moved to a 32-bit register, and bit 16~bit 31 in the register are set to 0. The value in K5M0 is moved to a 32-bit regiser, and bit 20~bit 31 in the register are set to 0. The vlaue in K6M0 is moved to a 32-bit register, and bit 24~bit 31 in the register are set to 0. The value in K7M0 is moved to a 32-bit register, and bit 28~bit 31 in the register are set to 0. D1 5-12 16-bit instruction A 16-bit value is in the range of K-32,768 to K32,767. Value in a word device composed of bit devices K1 (4 bits) 0~15 K2 (8 bits) 0~255 K3 (12 bits) 0~4,095 K4 (16 bits) -32,768~+32,767 32-bit instruction 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 K1 (4 bits) 0~15 K2 (8 bits) 0~255 K3 (12 bits) 0~4,095 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 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1