Mitsubishi — 5.3 Processing Values

Chapter 5 Applied Instructions  If Kn is in the range of K1~K3 (or K4~K7), the bits which are not assigned values in the 16-bit register (the 32-bit register) to which a value is moved will be set to 0. As a result, operations will be performed on positive numbers if Kn is in the range of K1~K3 (or K4~K7).  The binary-coded decimal number in M4~M11 is converted into a binary number, and the binary number is stored in D0.  Users can specify bit device numbers freely. It is suggested that M device numbers/S device numbers should start from a number which is a multiple of 8.  Consecutive devices M0 Take data registers for instances. D0, D1, D2, D3, and D4 are consecutive data registers.

The consecutive word devices composed of bit devices are shown below. The consecutive word devices composed of bit devices are shown above. To avoid confusion, please do not skip any word device composed of bit devices. Beisdes, if a 32-bit operation is performed on K4M0, the high 16 bits in the 32-bit register to which the value in K4M0 is moved will be set to 0. If a 32-bit value is required, please use K8M0. After an operation is performed, the binary integer gotten will be given priority. For example, 40ч3=13, and the remainder 1 is dropped. The integer part of the square root of an integer is retained, and the fractional part of the square root is dropped.

However, if a decimal instruiction is used, a decimal will be gotten. The applied intructions listed below are decimal instructions. Representations of binary floating-point numbers The floating-point numbers in a motion control module are 32-bit floating-point numbers, and the representations of the floating-point numbers conform to the IEEE 754 standard. b 31 b 0 Sign bit 0: Positive number 1: Negative number Representation of a floating-point number: ( ) 127 ; .1 2 1 = Ч Ч − − B M B E S A 32-bit floating-point number is in the range of ±2 -126 to ±2 +128 , that is, a 32-bit floating-point number is in the range of ±1.1755Ч10 -38 to ±3.4028Ч10 +38 . Example 1:

23 is represented by a 32-bit floating-point number. Step 1: Converting 23 into a binary number: 23.0=10111 5-13 BIN K2M4 D0 K1M0 K1M4 K1M8 K1M12 K2M0 K2M8 K2M16 K2M24 K3M0 K3M12 K3M24 K3M36 K4M0 K4M16 K4M32 K4M48 API 110 (D ECMP) API 111 (D EZCP) API 116 (D RAD) API 117 (D DEG) API 120 (D EADD) API 121 (D ESUB) API 122 (D EMUL) API 123 (D EDIV) API 124 (D EXP) API 125 (D LN) API 126 (D LOG) API 127 (D ESQR) API 128 (D POW) API 129 (D INT) API 130 (D SIN) API 131 (D COS) API 132 (D TAN) API 133 (D ASIN) API 134 (D ACOS) API 135 (D ATAN) API 136 (D SINH) API 137 (D COSH) API 138 (D TANH) 8-bit 23-bit S Exponent Mantissa