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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<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 />

72 DSW DIP Switch<br />

Controllers<br />

<strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SA2</strong><br />

SE<br />

<strong>SX2</strong><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 DSW: 9 steps<br />

S *<br />

D 1 *<br />

D 2 * * *<br />

n * *<br />

PULSE 16-bit 32-bit<br />

<strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SA2</strong><br />

<strong>SA2</strong><br />

<strong>SA2</strong><br />

<strong>SX2</strong> <strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SX2</strong> <strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong><br />

SE SE SE <strong>SX2</strong><br />

Operands:<br />

S: The Start of input devices D 1 : The Start of output devices D 2 : Device for storing switch input<br />

value n: Groups of switches (n = 1~2)<br />

Explanations:<br />

177. This instruction creates 1(2) group of 4-digit DIP switch by the combination of 4(8) consecutive<br />

input points starting from S and 4 consecutive output points starting from D 1 . The set value will<br />

be read in D 2 and the value in n specifies the number of groups (1~2) of the DIP switch.<br />

178. n = K1, D 2 occupies 1 register. n = K2, D 2 occupies 2 consecutive registers..<br />

179. There is no limitation on the times of using this instruction in the program, however only one<br />

instruction is allowed to be executed at the same scan time.<br />

Program Example:<br />

180. The first group of DIP switches consists of X20 ~ X23 and Y20 ~ Y23. The second group of<br />

switches consists of X24 ~ X27 and Y20 ~ Y23. When X10 = ON, the instruction will be<br />

executed and the set value of the first switch will be read and converted into BIN value then<br />

stored in D20. BIN value of 2 nd switch will be stored in D21.<br />

X0<br />

DSW X20 Y20 D20 K2<br />

181. When X0 = ON, Y20~Y23 are scanned repeatedly. M1029 = ON for a scan time when a scan<br />

cycle from Y20 to Y23 is completed.<br />

X0<br />

operation start<br />

Y20<br />

0.1s<br />

0.1s 0.1s<br />

Y21<br />

Y22<br />

0.1s<br />

0.1s<br />

interrupt<br />

Y23<br />

0.1s<br />

M1029<br />

execution completed<br />

3-188

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

Saved successfully!

Ooh no, something went wrong!