beautypg.com

Festo Кабели и принадлежности User Manual

Page 349

background image

7. Description of the commands

7−83

Festo P.BE−SPC200−EN en 0901d

Program 0

...

N003 G28 @1 X200 ;Load top row of pallets

N004 G28 @2 X50 ;Load distance between rows

N005 #LR0=6 ;Initialize number of rows

N006 L1 ;Access program 1

N007 #AR0=–1 ;Update counter

N008 #TR0=0 10 ;Gap filled?

N009 E05 6 ;Jump to N006

... ;further commands

...

N080 M30 ;Program end

Subroutine 1: Fill pallet gap

N000 #TNI0.0 0 ;Wait for part

N001 G00 X0 ;Fetch part, position 0 mm

N002 #SQ0.0 ;Close gripper

N003 G00 X@1 ;Move to pallet position

N004 #RQ0.0 ;Open gripper, place part

N005 G29 @1 X@2 ;Calculate next position

... ;further commands

...

N016 M02 ;Subroutine end

Position register @1 contains the current pallet position.
Position register @2 contains the distance between the rows.
These position registers are initialized in lines N003 and
N004 (program 0).

Register R0 serves as loop counter and is initialized with the
number of rows. Subroutine 1 is accessed 6 times and the
current pallet gap is then filled.