Mitsubishi — 5.6 Application Instructions

5 Categories and Use of Basic Application Instructions 7. If S 1 > max. source value, S 1 will be set as max. source value. If S 1 S 1 will be set as min. source value. When the source value and parameters are set, the following output figure can be obtained: Destination value Source value Max. source value Min. 8. Flag: M1126. Flag for switching between decimal integer and binary floating point for SCLP instruction ON: binary floating point; OFF: decimal integer Program Example 1: 1. Assume source value S 1 = 500, max. source value D0 = 3000, min. source value D1 = 200, max. destination value D2 = 500, and min. destination value D3 = 30.

When X0 = ON, SCLP instruction executes and the result of proportional calculation will be stored in D10. 2. Equation: D10 = [(500 – 200) Ч (500 – 30)] ч (3000 – 200) + 30 = 80.35. Rounding off the result into an integer, D10 =80. Destination value Source value DVP-PM Application Manual 5-137 D Max. Destina e value 1 Min. destinati X0 MOV K3000 D0 MOV K200 D1 MOV K500 D2 MOV K30 D3 X0 SCLP K500 D0 D10 SCLP K500 D0 D10 MOV K3000 D0 MOV K200 D1 MOV K500 D2 MOV K30 D3 = 500 D = 30 0 S 1=500