5 Applied Instructions and Basic Usage
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.
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 values if Kn is in the range of K1~K3 (or K4~K7).
M0
BIN K2X4 D0
The binary-coded decimal value in X4~X11 is
converted into a binary value, and the binary value is
stored in D0.
Users can specify bit device numbers freely. It is suggested X device numbers/Y devuce numbers
should end with 0, and that M device numbers/S device numbers should start from a number which is a
multiple of 8.
Consecutive devices
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.
K1X0 K1X4 K1X10 K1X14……
K2Y0 K2Y10 K2Y20 Y2X30……
K3M0 K3M12 K3M24 K3M36…….
K4S0 K4S16 K4S32 K4S48…….
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
K4Y0, the high 16 bits in the 32-bit register to which the value in K4Y0 is moved will be set to 0. If a
32-bit value is required, please use K8Y0.
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.
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)
Representations of binary floating-point values
The floating-point values in a DVP-20PM series motion controller are 32-bit floating-point values, and the
representations of the floating-point values conform to the IEEE 754 standard.
S
Exponent
Mantissa
8-bit 23-bit
b
31
b
0
Sign bit
0: Positive number
1: Negative number
Representation of a floating-point value:
127;.121
BM
BE
S
DVP-20PM Application Manual
5-8