Robot language – Yamaha SRCP User Manual

Page 131

Advertising
background image

8-

33

8

ROBOT LANGUAGE

8-5 Sample Programs

8-5-9 Turning ON a general-purpose output during robot

movement when it has passed a specified position

Point

P0 Start

position

P1 Target

position

P10

Position at DO0=1

P11

Position at DO0=0

P0

P1

DO0=1

P10

P11

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

Advertising