Practical examples
5-2-8
CAM table inside a program
failed=0
ELSE 'If the mark has not been detected
PRINT "Mark not detected"
failed=failed+1
'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
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:
•
The motion provides a smooth acceleration without sudden acceleration
changes, so the material slip is minimized
•
It gives a fast deceleration so the cycle time is reduced. During
deceleration there is no material slip and the friction helps to the stop to
zero.
IF failed>max_fail THEN 'After several
Section 5-2
341