AH500 Motion Control Module Manual Suppose the values in S 1 , S 2 , and S 3 are 500, 168, and -4 respectively. When X0.0 is ON, the instruction SCAL is executed, and a scale is stored in D0. Equation: D0=(500Ч168)ч1000+(-4)=80 Example 1 X0.0 Destination value Slope=168 Offset=-4 D S 1 0 =500 Source value Suppose the values in S 1 , S 2 , and S 3 are 500, -168, and 534 respectively. When X0.0 is ON, the instruction SCAL is executed, and a scale value is stored in D10. Equation: D10=(500Ч-168)ч1000+534=450 Example 2 X1.0 Destination value D Offset=534 Source value 0 Additional remark Only when a slope and an offset are known can the instruction SCAL be used.
If a slope and an offset are unknown, it is suggested that users should use the instruction SCLP. The value in S 2 must be in the range of –32,768 to 32,767 (The actual value in S 2 must be in the range of –32,768 to 32,767.) If the value in S 2 is not in the range, please use the instruction SCLP instead. If users use the slop equation above, the maximum source value must be greater than the minimum source value, and the maximum destination value do not have to be greater than the minimum destination value. If the value in D is greater than 32,767, the value stored in D will be 32,767. If the value in D is less than -32,768, the value stored in D will be -32,768.
5-118 SCAL K500 K168 K-4 D0 .0 SCAL K500 K-168 K534 D10 Slope=-168 S 1=500