![background image](http://html1.mh-extra.com/html/omron/smartslice-grt1-ml2/smartslice-grt1-ml2_programming-manual_742305339.webp)
Examples and tips
PROGRAMMING MANUAL
333
R
e
vi
si
o
n
1
.0
WAIT UNTIL IN(start_signal)=0
WAIT UNTIL IN(start_signal)=1
'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