Yamaha SRCP manual When P1 is nearer to the plus side than P0

Models: SRCP

1 246
Download 246 pages 58.82 Kb
Page 131
Image 131

8-5 Sample Programs

8-5-9 Turning ON a general-purpose output during robot movement when it has passed a specified position

P0

P1

P10

P11

DO0=1

DO0=0

Point

P0 Start position

P1 Target position

P10 Position at DO0=1

P11 Position at DO0=0

When P1 is nearer to the plus side than P0:

Program

 

 

 

Comment

[NO0]

 

 

 

 

001: L

0

 

 

; Label definition

002: MOVA

0,

100

 

; Moves to P0 at speed 100

003: TON

1,

1,

0

; Starts program NO1 as task 1

004: MOVA

1,

10

 

; Moves to P1 at speed 10

005: JMP

0,

0

 

; Returns to L0

Program

 

 

Comment

[NO1]

 

 

 

001: DO

0,

0

; Turns DO0 off

002: P

10

 

; Sets the point variable to 10

003: L

0

 

; Label definition

004: JMPP

0,

1

; Jumps to L0 when the robot does not reach P10

005: DO

0,

1

; Turns DO0 on

006: P

11

 

; Sets the point variable to 11

007: L

1

 

; Label definition

008: JMPP

1,

1

; Jumps to L1 when the robot does not reach P11

009: DO

0,

0

; Turns DO0 off

8

ROBOT LANGUAGE

8-33

Page 131
Image 131
Yamaha SRCP manual When P1 is nearer to the plus side than P0