7 Application Instructions API 50-99 API 86 Operands: S : No. of VR D : Device for storing the scale of VR Explanations: 1. Range of S : 0 ~ 7; without function card: 0 ~ 1 2. See the specifications of each model for their range of use. 3. VRSC instruction is used for reading 2 points (No.0, No.1) of PLC or the VR rotary switch scale (0 ~ 10) in the 6 points of the function cards (No.2 ~ No.7) and storing the data in D . If the position of the VR falls in the middle of two scales, VRSC will round up the value into an integer of 0 ~ 10. Program Example 1: When X0 = On, the scale of VR0 (0 ~ 10) will be stored in D10. X0 Program Example 2: 1.
When the VR is used as DIP switch, they will correspond to scale 0 ~ 10 and only one of M10 ~ M20 will be On. Use API 41 DECO instruction to decode the scales into M10 ~ M25. 2. When X0 = On, store the scale (0 ~ 10) of VR1 into D1. 3. When X1 = On, use API 41 DECO to decode the scales into M10 ~ M25. X0 X1 M10 On when the scale is 0 M11 On when the scale is 1 M20 On when the scale is 10 Remarks: If the MPU is not inserted with a VR extension card, and the No. of the rotary switches inVRRD or VRSC instruction in the program are set as K2 ~ K7, errors will occur in the execution of grammar check.
DVP-PLC APPLICATION MANUAL 7-131 Mnemonic Operands Function VRSC P Volume Scale Type OP Bit Devices Word Devices Program Steps X Y M S K H KnX KnY KnM KnS T C D E F VRSC, VRSCP: 5 steps S * * D * * * * * * * * PULSE 16-bit 32-bit EH3 SV2 ES EX SS EH3 ES EX SS SA SX SC EH SV EH3 SV2 ES EX SS SA SX SC EH SV SA SX SC EH SV SV2 VRSC K0 D10 VRSC K1 D1 DECO D1 M10 K4