Robot language – Yamaha SRCP User Manual

Page 124

Advertising
background image

8-

26

8

ROBOT LANGUAGE

8-5 Sample Programs

8-5-4 Robot stands by at P0, and moves to P1 and then to P2 to

pick and place a workpiece

Horizontal direction
Vertical direction
Hold

AC servo motor
Air cylinder
Air chuck

Actuator

DI0
DI1
DI2

Upper end limit switch

1: ON

0: OFF

Lower end limit switch

1: ON

0: OFF

Workpiece detection sensor 1: Detected 0: No

General-purpose input

DO0
DO1

Air cylinder

1: Down 0: Up

Air chuck

1: Close 0: Open

General-purpose output

P0
P1
P2

Robot standby position
Workpiece feed position
Workpiece mount position

Point

Operation
q

w

e

Moves to the workpiece feed position from the
standby position, and picks up a workpiece.
Moves to the workpiece mount position and places
the workpiece.
Returns to the standby position.

P1

P2

P0

e

q

w

X-axis

AC servo

Air cylinder
(DO0)

Air chuck
(DO1)

Upper end limit
switch (DI0)

Lower end limit
switch (DI1)

Workpiece detection
sensor (DI2)

Program

Comment

[NO1]
001: L

1

; Label definition

002: MOVA

0,

100

; Moves to the standby position

003: WAIT

2,

1

; Waits for workpiece feed

004: MOVA

1,

100

; Moves to the workpiece feed position

005: DO

0,

1

; Air cylinder moves down

006: WAIT

1,

1

; Waits until the air cylinder moves down

007: DO

1,

1

; Chuck closes

Picks up
workpiece

008: TIMR

100

; Delays for one second

009: DO

0,

0

; Air cylinder moves up

010: WAIT

0,

1

; Waits until the air cylinder moves up

011: MOVA

2,

100

; Moves to the workpiece mount position

012: DO

0,

1

; Air cylinder moves down

013: WAIT

1,

1

; Waits until the air cylinder moves down

Placing
workpiece

014: DO

1,

0

; Chuck opens

015: TIMR

100

; Delays for one second

016: DO

0,

0

; Air cylinder moves up

017: WAIT

0,

1

; Waits until the air cylinder moves up

018: JMP

1,

1

; Returns to L1

Advertising