3. Instruction Set

API

Mnemonic

Operands

Function

Controllers

66

ALT

 

P

 

 

Alternate State

 

 

 

 

ES2/EX2 SS2 SA2 SX2

 

 

 

 

 

 

 

SE

Type

Bit Devices

 

Word devices

 

 

 

 

Program Steps

OP

X

Y

M

S

K

H KnX KnY KnM KnS T

C

D

E

F

ALT, ALTP: 3 steps

D

 

*

*

*

 

 

 

 

 

 

 

 

 

 

 

 

 

PULSE

 

 

16-bit

 

32-bit

ES2/EX2

SS2

SA2

SX2

ES2/EX2

SS2

SA2

SX2

ES2/EX2

SS2

SA2

SX2

SE

SE

SE

Operands:

D: Destination device

Explanations:

144.The status of D is alternated every time when the ALT instruction is executed.

145.When ALT instruction is executed, ON/OFF state of D will be switched which is usually applied on switching two operation modes, e.g. Start/Stop

146.This instruction is generally used in pulse execution mode (ALTP).

Program Example 1:

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

X0

ALTP Y0

X0

Y0

Program Example 2:

Creating a flashing circuit by applying ALTP with a timer

When X20 = ON, T0 will generate a pulse every two seconds and output Y0 will be switched between ON and OFF by the pulses from T0.

X20 T0

TMR T0 K20

T0

ALTP Y0

3 - 1 6 9

Page 285
Image 285
Delta DVP-ES2/EX2/SS2/SA2/SX2/SE manual KnX KnY KnM KnS T ALT, Altp 3 steps