Mitsubishi — 5.6 Application Instructions

5 Categories and Use of Basic Application Instructions API 110 Operands: S 1 : 1 st comparison value S 2 : 2 nd comparison value D : Comparison result Explanations: 1. The data of S 1 is compared to the data of S 2 and the result ( > , = , < ) is indicated by three bit devices in D . 2. Only 32-bit instructions DECMP and DECMPP are applicable. 3. D occupies 3 consecutive devices. 4. F refers to floating point input. Be sure to add a decimal point when using it. 5. If S 1 or S 2 is specified with floating point value F, the instruction will operate in binary floating point. Program Example: 1. If the specified device is M10, M10~M12 will automatically be used. 2.

When X0 = ON, one of M10~M12 will be ON. When X0 = OFF, DECMP is not executed, M10~M12 will retain their previous state before X0 = OFF. 3. Connect M10~M12 in series or parallel for achieving the results of ≧ , ≦ , ≠ . 4. RST or ZRST instruction is required if users need to reset the comparison result. X0 M10 M11 M10 = ON when (D1,D0)>(D101,D100) M11 = ON when (D1,D0)=(D101,D100) M12 M12 = ON when (D1,D0) Points to note: For floating point operations, see “5.3 Numeric Values for Data Processing”.

DVP-PM Operation Instruction 5-94 Mnemonic Operands Function Controllers 20PM 10PM D ECMP P Binary Floating Point Compare Type OP Bit Devices Word Devices Program Steps X Y M S F H KnX KnY KnM KnS T C D V Z DECMP, DECMPP: 9 steps S 1 * * S 2 * * D * * * DECMP D0 D100 M10