Chapter 5 Applied Instructions Explanation S 1 : Source device; S 2 : Slope (Unit: 0.001); S 3 : Offset; D : Destination device The values in S 1 , S 2 , and S 3 must be in the range of -32767 to 32767. Equation: D =( S 1 Ч S 2 )ч1000+ S 3 To obtain the value in S 2 , users have to use the slope equation below, round the result to the nearest integer, and get a 16-bit integer. To obtain the value in S 3 , the users have to use the offset equation below, round the result to the nearest integer, and get a 16-bit integer. Slope equation: S 2 =[(Maximum destination value–Minimum destination value)ч(Maximum source value–Minimum source value)]Ч1,000 Offset equation:
S 3 = Minimum destination value–Minimum source valueЧ S 2 ч1,000 Output curve Destination value Source value Maximum source value Minimum source value 5-117 API Instruction code Operand Function 202 SCAL P S , S , S , D 1 2 3 Scale Device Xn.n Yn.n M S K 16# F KnM KnS D W T C V Z S 1 S 2 S 3 D Pulse instruction 16-bit instruction (7 steps) 32-bit instruction – D Maximum d S1 Minimum de