Examples and tips
PROGRAMMING MANUAL
300
R
e
vi
si
o
n
1
.0
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.47. 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:
'Initializations
FOR i=0 TO 1
BASE(i)
ATYPE=40
UNITS=8192
REP_DIST=20