Kaiyi — 6.3.2 Explanation of Data Conversion Instructions

AH500 Programming Manual x=Source value ( S 1 ) b=Offset =Minimum destination value–Minimum source valueЧSlope uation y=kx+b, and the The parameters above are being substituted for y, k, x, and b in the eq operation equation in the instruction is obtained. y=kx+b=D=k S 1 +b=SlopeЧ S 1 + Offset = SlopeЧ S 1 + source valueЧSlope=SlopeЧ( S 1 –Minimum source value) + Minimum destination value =( S 1 –Minimum source value)Ч(Maximum destination value–Minimum destination value)ч(Maximum source value–Minimum source value) + Minimum destination va Minimum destination value–Minimum lue 9. alue in If S 1 is larger than the maximum source value, the maximum source value will be the v S 1 .

If S 1 is less than the minimum source value, the minimum source value will be the value in S 1 . After the input values and the parameters are set, the output curve is as shown below. Example 1: 1. Suppos source value in D1 is 200, the maximum destination value in D2 is 500, and the minimum destination value in D3 is 30. When X0.0 is ON, the instruction SCLP is executed, and the scale value is stored in D10. 2. The operation equation: D10= 80.35 is rounded off to the nearest whole digit, and becomes 80. 80 is stored i e the value in S 1 is 500, the maximum source value in D0 is 3,000, the minimum [(500–200)Ч(500–30)]ч(3,000–200)+30=80.35 n D10. 6-99