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.

3. Instruction Set<br />

API Mnemonic Operands Function<br />

71 D HKY Hexadecimal key input<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 HKY: 9 steps<br />

S *<br />

DHKY: 17 steps<br />

D 1 *<br />

D 2 * * * * *<br />

D 3 * * *<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 (occupies 4 consecutive devices) D 1 : The start of output devices<br />

(occupies 4 consecutive devices) D 2 : Device for storing key input value D 3 : Key input status<br />

(occupies 8 consecutive devices)<br />

Explanations:<br />

164. This instruction creates a 16-key keyboard by a multiplex of 4 consecutive external input<br />

devices from S and 4 consecutive external output devices from D 1 . By matrix scan, the key<br />

input value will be stored in D 2 . D 3 stores the condition of keys A~F and indicates the key input<br />

status of both 0~9 and A~F..<br />

165. M1029 = ON for a scan cycle every time when a key is pressed.<br />

166. If several keys are pressed, only the first pressed key is valid.<br />

167. D 2 maps to a decimal value, a 4-digit decimal value 0~9,999 (16-bit instruction) or an 8-digit<br />

value 0~99,999,999 (32-bit instruction). If the entered number exceeds the available range, i.e.<br />

4 digit in 16-bit and 8 digits in 32-bit instruction, the highest digit performs overflow<br />

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

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

Program Example:<br />

169. Designate 4 input points X20 ~ X23 and the other 4 output points Y20 ~ Y23 to construct a<br />

16-key keyboard. When X4 = ON, the instruction will be executed and the keyed-in value will<br />

be stored in D0 in BIN form. The key status will be stored in M10 ~ M19.<br />

X4<br />

HKY X20 Y20 D0 M0<br />

3-185

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

Saved successfully!

Ooh no, something went wrong!