5 Categories and Use of Basic Application Instructions
DVP-PM Operation Instruction
5-8
the 16-bit register will all be filled with 0. The same rule applies when sending K1M0, K2M0, K3M0, K4M0,
K5M0, K6M0, K7M0 to 32-bit registers.
When the Kn value is specified as K1~K3 (K4~K7) for a 16-bit (32-bit) operation, the empty upper bits of the
target register will be filled with “0.” Therefore, the operation result in this case is positive since the MSB(Most
significant bit) is 0.
M0
BIN K2X4 D0
) The BCD value composed of X4 ~ X13 will be converted to
BIN value and sent to D0.
When assigning the number of bit devices, a multiple of 10 is preferred, e.g. X0, X10, …Y0, Y10…M0, M10, etc.
Assign Continuous Bit Devices
As already explained, bit devices can be grouped into 4 bit units. The “n” in Kn defines the number of groups of
4 bits to be combined for data operation. For data register D, consecutive D refers to D0, D1, D2, D3, D4…; For
bit devices with Kn, consecutive No. refers to:
K1X0 K1X4 K1X10 K1X14……
K2Y0 K2Y10 K2Y20 Y2X30……
K3M0 K3M12 K3M24 K3M36…….
K4S0 K4S16 K4S32 K4S48…….
Note: To avoid errors, please follow the order listed above when assigning continuous bit devices. In additoin,
when K4Y0 is used in 32-bit operation, the high word is defined as 0. Therefore, it is recommended to use K8Y0
in 32bit operation.
Floating Point Operation
The operations in DVP-PM are conducted in BIN integers. When the integer performs division, e.g. 40 ÷ 3 = 13,
the remainder will be 1. When the integer performs square root operations, the decimal point will be left out. To
obtain the operation result with decimal point, please use floating point instructions.
API 110(DECMP) API 111(DEZCP) API 116(DRAD) API 117(DDEG)
API 120(DEADD) API 121(DESUB) API 122(DEMUL) API 123(DEDIV)
API 124(DEXP) API 125(DLN) API 126(DLOG) API 127(DESQR)
API 128(DPOW) API 129(D INT) API 130(D SIN) API 131(D COS)
API 133(DASIN) API 133(D ASIN) API 134(D ACOS) API 135(D ATAN)
API 136(D SINH) API 137(D COSH) API 138(D TANH)
Binary Floating Point
DVP-PM represents floating point value in 32 bits, following the IEEE754 standard:
S
Exponent
Mantissa
8-bit 23-bit
b
31
b
0
Sign bit
0: positive
1: negative