10 Application Instructions API 202-313 API 205 Operands: S 1 : Source device 1 S 2 : Source device 2 n : Data length / function D : Destination device Explanations: 1. EH2/SV_V1.9 and versions above, and EH3/SV2 support the 16-bit instruction. EH3_V1.20 and version above, and SV2 support the 32-bit instruction. 2. S 1 and S 2 can be T/C/D devices, for C devices only 16-bit devices are applicable (C0~C199). 3. The high 16-bit value in the operand n used in the 32-bit instruction is an invalid value. 4. The low 8-bit value in the operand n indicates the data length. The operand n used in the 16-bit instruction should be within the range between 1 and 16.
The operand n used in the 32-bit instruction should be within the range between 1 and 32. PLC will take the upper/lower bound value if set value exceeds the available range. 5. The high 8-bit value in the operand n indicates the comparison condition. 6. If n used in the 16-bit instruction is set to H0108, it means that 8 pieces of data are compared to 8 pieces of data, and the “larger than” comparison is performed. If n used in the 32-bit instruction is set to H00000320, it means that 32 pieces data are compared to 32 pieces of data, and the “less than” comparison is performed. 7.
If the setting value for the comparison condition exceeds the range, or the firmware version does not support the comparison condition, the default “equal to” comparison is performed. EH3_V1.20 and version above, and SV2 and versions above support the setting value for the comparison condition. 8. The comparison values used in the 16-bit instruction are signed values. The comparison values used in the 9. Data written in operand D will all be stored in 16-bit format or in 32-bit format. When data length is less than 16 32-bit instruction are 32-bit values (M1162=Off), or floating-point values (M1162=On). or 32, the null bits are fixed as 0, e.g.
if n = K8, bit 0~7 will be set according to compare results, and bit 8~15 will all be 0. 10. If the comparison result meets the condition, the corresponding bit is set to 1. Otherwise, it is set to 0. DVP-PLC Application Manual 10-7 Mnemonic Operands Function CMPT P Compare table Type OP Bit Devices Word devices Program Steps X Y M S K H KnX KnY KnM KnS T C D E F CMPT: 9 steps DCMPT: 17 steps DCMPTP: 17 steps S 1 * * * S 2 * * * n * * * D * * * * * * PULSE 16-bit 32-bit ES EX SS SA SX S C EH S EH3 V SV2 ES EX SS SA SX SC EH3 ES EX SS SA SX SC EH3 EH SV EH SV SV2 SV2 Value K0 K1 K2 K3 K4 Comparison condition S = S 1 2 S S S > S 1 2 S >= S 1 2