Mitsubishi — 5.6 Application Instructions

5 Categories and Use of Basic Application Instructions API 203 Operands: S 1 : Source value S 2 : Parameters D : Operation result Explanations: 1. SCLP instruction performs a proportional calculation according to the internal slope equation as well as the parameters set in this instruction. 2. Settings of S 2 for 16-bit instruction (occupies 4 consecutive devices): 3. Settings of S 2 for 32-bit instruction (occupies 8 consecutive devices). 4. Operation equation in the instruction: D = [( S 1 – min. source value) Ч (max. destination value – min. destination value)] ч (max. source value – min. source value) + min. destination value 5.

The equation to obtain the operation equation of the instruction: y = kx + b where y = Destination value ( D ) k = Slope = (max. destination value – min. destination value) ч (max. source value – min. source value) x = Source value ( S 1 ) b = Offset = Min. destination value – Min. source value Ч slope 6. Substitute the above parameters into y = kx + b and the operation instruction can be obtained. y = kx + b = D = k S 1 + b = slope Ч S 1 + offset = slope Ч S 1 + min. destination value – min. source value Ч slope = slope Ч ( S 1 – min. source value) + min. destination value = ( S 1 – min. source value) Ч (max. destination value – min. destination value) ч (max. source value – min.

source value) + min. destination value DVP-PM Operation Instruction 5-136 Mnemonic Operands Function Controllers 20PM 10PM D SCLP Parameter proportional value calculation P Type OP Bit Devices Word devices Program Steps X Y M S K H KnX KnY KnM KnS T C D V Z SCLP, SCLPP: 9 steps DSCLP, DSCLPP: 13 steps S 1 * * * S 2 * * * D * Device No. Parameter Range S 2 Max. source value -32768~32767 S +1 2 Min. source value -32768~32767 S +2 2 Max. destination value -32768~32767 S +3 2 Min. destination value -32768~32767 Range Device No. Parameter Floating point Integer number S 、S +1 2 2 Max. source value -2,147,483,648~2,147,483,647 Range of 32-bit floating point number S +2、3 2 Min.

source value S +4、5 2 Max. destination value S +6、7 2 Min. destination value