AH500 Programming Manual Symbol: S 1 : Data source Word/Double word S 2 : Parameter Word/Double word D : Destination device Word/Double word Explanation: 1. Only the 32-bit instructions can use the 32-bit counter. 2. The operand S 2 used in the 16-bit instruction is set as follows. 3. The operand S 2 used in the 16-bit instruction occupies four devices. 4. The operand S 2 used in the 32-bit instruction is set as follows. 5. The operand S 2 used in the 32-bit instruction occupies eight devices. 6. If the values used in the 32-bit instruction are floating-point numbers, SM658 can be set to ON. If the values are decimal integers, SM685 can be set to OFF. 7.
The operation equation in the instruction: D =[( S 1 –Minimum source value)Ч(Maximum destination value–Minimum destination value)]ч(Maximum source value)+Minimum destination value 8. The operational relation between the source value and the destination value:
y=kx+b y=Destination value (D) k=Slope=(Maximum destination value–Minimum destination value)ч(Maximum source value–Minimum source value) 6-102 API Instruction code Operand Function 0217 D SCLP P S , S , S , D 1 2 3 Parameter type of scale value operation Device X Y M S T C HC D L SM SR E PR K 16# “$” DF S 1 S 2 D Pulse instruction 16-bit instruction (9 steps) 32-bit instruction (9 steps) AH500 AH500 AH500 Device number Parameter Setting range S 2 Maximum source value -32,768~32,767 S +1 2 Minimum source value -32,768~32,767 S +2 2 Maximum destination value -32,768~32,767 S +3 2 Minimum destination value -32,768~32,767 Setting range Device Parameter Floating-point number Integer number S , S +1 2 2 Maximum source value -2,147,483,648~ 2,147,483,647 The range of 32-bit floating-point numbers S +2, S +3 2 2 Minimum source value S +4, S +5 2 2 Maximum destination value S +6, S +7 2 2 Minimum destination value