Examples and tips
PROGRAMMING MANUAL 271
Revision 3.0
fig. 43
Suppose the motion system consists of two axis, AXIS(0) and
AXIS(1). AXIS(0) is the master axis. It makes a simple forward
movement. AXIS(1) is the slave axis. It must follow the master axis
in accordance to cosine rule:
where x
0
is the position of the master AXIS(0), and x
1
is the
position of the slave AXIS(1). You can link the two axis with the
CAMBOX command. For more details, refer to section 3.2.42.
Suppose furthermore that the parameter end_pos is not constant,
but it can change due to different conditions of the motion system.
The part of the program that creates the CAM table is:
'Initial CAM values
VR(end_pos)=15
current_end_pos=VR(end_pos)
FOR i=0 TO 999
TABLE(i, VR(end_pos)*(1-COS(2*PI*i/999))/2)
NEXT i
...
loop:
IF VR(end_pos)<>current_end_pos THEN
'Recalculate the CAM Table
FOR i=0 TO 999
TABLE(i, VR(end_pos)*(1-COS(2*PI*i/999))/2)
NEXT i
current_end_pos=VR(end_pos)
ENDIF
...
GOTO loop
The VR(end_pos) value can be changed from some other program
or externally from another controller using FINS messaging. In this
case, the CAM table must be recalculated.
The creation of the CAM table is complete. The initialization of the
desired axis and system parameters for tracing is:
I52E-EN-03.book Seite 271 Freitag, 29. Juni 2007 11:55 11