Examples and tips
PROGRAMMING MANUAL
293
Revi
si
on 3.0
'Move bag length
MOVEABS(bag_distance)
WAIT UNTIL MTYPE=2 'To verify that the MOVEABS is being executed
'If we work with Mark, activate the trigger
'MARK=FALSE when triggered and TRUE when not triggered
IF work_with_mark AND MARK THEN
REGIST(1)
WAIT UNTIL MARK=0
ENDIF
'Wait until movement finished or mark detected
WAIT UNTIL MTYPE=0 OR (MARK AND work_with_mark)
'Working with mark
IF work_with_mark THEN
IF MARK THEN 'If the mark has been detected, the position is corrected
MOVEMODIFY(bag_distance-expecREG_POS)
failed=0
ELSE 'If the mark has not been detected
PRINT "Mark not detected"
failed=1
IF failed>max_fail THEN 'After several consecutive misdetection stop the application
PRINT "Mark definitelly lost"
program_alarm=3
STOP
ENDIF
ENDIF
ENDIF
'Wait until the feed movement has finished
WAIT IDLE
GOTO loop
6.2.7
CAM table inside a program
It shows how to create a CAM table inside a program, and use the
CAMBOX
motion command.
The profile used is the COS square one. This is a quite typical profile for feeder-type applications as:
I52E-EN-03.book Seite 293 Freitag, 29. Juni 2007 11:55 11