KEYENCE Visual KV Series User Manual

Page 133

Advertising
background image

2.4 Instruction Details

1

2

3-109

Chapter 2 Instructions

Sequence program
Assign the relays to execute the five processes on the previous page as follows:

1 Wait until the start switch is turned ON.:

Input relay 0000

2 Turn on lamp 1 for 1 second.:

Output relay 0500

3 Turn on lamp 2 for 3 second.:

Output relay 0501

4 Turn on lamp 3 for 5 second.:

Output relay 0502

5 Turn on lamps 1, 2, and 3 simultaneously: Output relays 0500, 0501, and 0502

for 7 seconds.

The following is the ladder diagram for the I/O assignments above, and is written
with and without STG instructions.

Without STG instruction

With STG instruction

0000

T000

#00010

T000

1000

SET

1000

T000

T001

1001

1000

#00030

T001

1001

T001

T003

T002

1002

T002

T003

1100

1101

1102

#00050

T002

#00070

T003

1002

1100

1100

0500

1000

1101

0501

1001

1102

0502

1002

2008

0000

T000

1001

STG

1002

JMP

#00010

T000

0500

T001

1002

STG

1003

JMP

#00030

T001

0501

T002

1003

STG

1004

JMP

#00050

T002

T003

1001

JMP

#00070

T003

0502

1004

STG

0500

0501

0502

1001

SET

OR circuit is required because
double coil cannot be used.

1000 (0500) turns ON for 1 second
when input 0000 turns ON.

1001 (0501) turns ON for 3 seconds
when T000 turns ON.

1002 (0502) turns ON for 5 seconds
when T001 turns ON.

1100 (0500), 1101
(0501), and 1102 (0502)
turn ON for 7 seconds
when T002 turns ON.

The process is repeated from the
beginning when T003 turns ON.

The process is repeated from the
beginning when T003 turns ON.

1001 turns ON at the start of operation.

0500 turns ON for 1 second when input
0000 turns ON. Then, 1002 turns ON.

0501 turns ON for 3 seconds when
1002 turns ON. Then, 1003 turns ON.

0502 turns ON for 5 seconds when 1003
turns ON. Then, 1004 turns ON.

0500, 0501, and 0502 turn ON for 7
seconds when 1004 turns ON.

STG

KVNKA Chap 02_4bP.p65

08.3.11, 0:00 PM

109

Advertising