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

66 ALT P Alternate State<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 ALT, ALTP: 3 steps<br />

D * * *<br />

Operands:<br />

D: Destination device<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 />

Explanations:<br />

144. The status of D is alternated every time when the ALT instruction is executed.<br />

145. When ALT instruction is executed, ON/OFF state of D will be switched which is usually applied<br />

on switching two operation modes, e.g. Start/Stop<br />

146. This instruction is generally used in pulse execution mode (ALTP).<br />

Program Example 1:<br />

When X0 goes from OFF to ON, Y0 will be ON. When X0 goes from OFF to ON for the second time,<br />

Y0 will be OFF.<br />

X0<br />

ALTP<br />

Y0<br />

X0<br />

Y0<br />

Program Example 2:<br />

Creating a flashing circuit by applying ALTP with a timer<br />

When X20 = ON, T0 will generate a pulse every two seconds and output Y0 will be switched<br />

between ON and OFF by the pulses from T0.<br />

X20<br />

T0<br />

TMR<br />

T0<br />

K20<br />

T0<br />

ALTP<br />

Y0<br />

3-169

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

Saved successfully!

Ooh no, something went wrong!