8-5 Sample Programs

8-5-3 Positioning 2 points and sending job commands to a PLC at each position

P1

P2

Job 1

Job 2

Point

P1 Position at which job 1 is complete

P2 Position at which job 2 is complete

General-purpose input

 

DI1

Job 1 completion 1: Complete

0: Not complete

 

 

DI2

Job 2 completion 1: Complete

0: Not complete

 

 

General-purpose output

 

 

 

 

 

 

 

 

 

 

 

DO1

Job 1 command

1: Output

0: Canceled

 

 

DO2

Job 2 command

1: Output

0: Canceled

 

Program

 

 

 

 

Comment

[NO0]

 

 

 

 

 

 

 

001: DO

 

1,

0

 

; Cancels job 1 command

002: DO

 

2,

0

 

; Cancels job 2 command

003: L

 

1

 

 

; Label definition

004: MOVA

1,

100

; Moves to P1

005: DO

 

1,

1

 

; Outputs job 1 command

006: WAIT

1,

1

 

; Waits until job 1 is complete

007: DO

 

1,

0

 

; Cancels job 1 command

008: MOVA

2,

100

; Moves to P2

009: DO

 

2,

1

 

; Outputs job 2 command

010: WAIT

2,

1

 

; Waits until job 2 is complete

011: DO

 

2,

0

 

; Cancels job 2 command

012: JMP

1,

0

 

; Returns to L1

8

ROBOT LANGUAGE

8-25

Page 123
Image 123
Yamaha SRCP manual Cancels job 1 command