Delta DVP-ES3 — 6.3.2 Explanation of Data Conversion Instructions

DVP-ES3 Series Programming Manual Example 2 1. Suppose the values in S 1 , S 2 , and S 3 are 500, -168, and 534 respectively. When M0 is ON, the SCAL instruction calculates the scaled value, and stores the scaled value in D10. 2. For the equation: D10=(500Ч-168)ч1,000+534=450 _6 Additional remarks 1. You must know the slope and the offset to use SCAL. If the slope and the offset are unknown, you can use the SCLP instruction. 2. When the 16-bit instruction is performed, the value entered into S 2 must be between –32,768 to 32,767. If the value in S 2 exceeds the range, use the SCLP instruction. 3.

When the 32-bit instruction is performed, the value entered into S 2 must be between -2,147,483,648 to 2,147,483,647. If the value in S 2 exceeds the range, use the SCLP instruction. 4. When you use the slope equation, note that the maximum source value should be larger than the minimum source value. However, the maximum destination value is not necessarily larger than the minimum destination value. 5. For the 16-bit instruction, if the value in D is larger than 32,767, the value stored in D is 32,767. If the value in D is less than -32,768, the value stored in D is -32,768. 6.

When the 32-bit instruction is performed, if the value in D is larger than 2,147,483,647, the value stored in D will be 2,147,483,6477. If the value in D is less than -2,147,483,648, the value stored in D will be -2,147,483,648. 6-110