DVP-ES2/EX2/SS2/SA2/SX2/SE Operation Manual - Programming

API

86

Mnemonic

Operands

Function

 

 

 

 

VRSC

P

 

Volume Scale Read

 

 

 

 

Controllers

ES2 SS2 SA2 SX2

SE

EX2

 

Type

Bit Devices

 

 

 

 

 

Word devices

 

 

 

 

 

 

 

 

Program Steps

OP

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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

 

 

 

 

 

 

 

 

ES2

SS2

SA2

SX2

SE

ES2

SS2

SA2

SX2

SE

ES2

SS2

SA2

SX2

SE

 

 

 

 

 

 

 

 

EX2

EX2

EX2

 

 

 

 

 

 

 

 

 

 

 

 

Operands:

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

Explanations:

VRSC instruction reads the scaled value (0~10) of the 2 VRs on PLC and stores the read data in destination device D as an integer, i.e. if the value is between 2 graduations, the value will be rounded off.

Program Example 1:

When X0 = ON, VRSC instruction reads the scaled value (0 to10) of VR No. 0 and stores the read value in device D10.

X0

VRSC K0 D10

Program Example 2:

Apply the VR as digital switch: The graduations 0~10 of VR correspond to M10~M20, therefore only one of M10 ~M20 will be ON at a time. When M10~M20 is ON, use DECO instruction (API 41) to decode the scaled value into M10~M25.

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

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

X0

VRSC K1 D1

X1

DECO D1 M10 K4

M10

ON when VR graduation is 0

M11

ON when VR graduation is 1

M20

ON when VR graduation is 10

3 - 238

Page 354
Image 354
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual Vrsc, Volume Scale Read