17.03.2014 Views

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>DVP</strong>-<strong>ES2</strong>/<strong>EX2</strong>/<strong>SS2</strong>/<strong>SA2</strong>/<strong>SX2</strong>/SE <strong>Operation</strong> <strong>Manual</strong> - Programming<br />

API Mnemonic Operands Function<br />

86 VRSC P Volume Scale Read<br />

<strong>ES2</strong><br />

<strong>EX2</strong><br />

Controllers<br />

<strong>SS2</strong> <strong>SA2</strong> <strong>SX2</strong> SE<br />

Type Bit Devices Word devices Program Steps<br />

OP X Y M S K H KnX KnY KnM KnS T C D E F VRSC, VRSCP: 5 steps<br />

S * *<br />

D * * * * * *<br />

PULSE 16-bit 32-bit<br />

<strong>ES2</strong><br />

<strong>ES2</strong><br />

<strong>ES2</strong><br />

<strong>SS2</strong> <strong>SA2</strong> <strong>SX2</strong> SE <strong>SS2</strong> <strong>SA2</strong> <strong>SX2</strong> SE <strong>SS2</strong> <strong>SA2</strong> <strong>SX2</strong> SE<br />

<strong>EX2</strong> <strong>EX2</strong> <strong>EX2</strong><br />

Operands:<br />

S: Variable resistor number (0~1) D: Destination device for storing scaled value<br />

Explanations:<br />

VRSC instruction reads the scaled value (0~10) of the 2 VRs on PLC and stores the read data in<br />

destination device D as an integer, i.e. if the value is between 2 graduations, the value will be<br />

rounded off.<br />

Program Example 1:<br />

When X0 = ON, VRSC instruction reads the scaled value (0 to10) of VR No. 0 and stores the read<br />

value in device D10.<br />

X0<br />

VRSC K0 D10<br />

Program Example 2:<br />

Apply the VR as digital switch: The graduations 0~10 of VR correspond to M10~M20, therefore only<br />

one of M10 ~M20 will be ON at a time. When M10~M20 is ON, use DECO instruction (API 41) to<br />

decode the scaled value into M10~M25.<br />

1. When X0 = ON, the graduation (0~10) of VR No.1 will be read out and stored in D1.<br />

2. When X1 = ON, DECO instruction will decode the graduation (0~10) into M10~M25.<br />

X0<br />

X1<br />

M10<br />

M11<br />

M20<br />

VRSC K1 D1<br />

DECO D1 M10 K4<br />

ON when VR graduation is 0<br />

ON when VR graduation is 1<br />

ON when VR graduation is 10<br />

3-238

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!