Motion Coordinator Technical Reference Manual
Trio BASIC Commands 8-17
Motion and Axis Commands
Parameters:
Example:
Motion is required to follow the POSITION equation:
t(x) = x*25 + 10000(1-cos(x))
Where x is in degrees. This example table provides a simple oscillation superim-
posed with a constant speed. To load the table and cycle it continuously the pro-
gram would be:
GOSUB camtable
loop:
CAM (1,19,1,200)
GOTO loop
Note:
The subroutine camtable loads the data into the cam TABLE, as shown in the graph
below.
start point:
The cam table may be used to hold several profiles and/or
other information. To allow freedom of use each command
specifies where to start in the table.
end point:
Specifies end of values in table. Note that 2 or more
CAM()
commands executing simultaneously can use the same val-
ues in the table.
table multiplier:
The table values are absolute positions from the start of
the motion and are normally specified in encoder edges.
The table multiplier may be set to any value to scale the
values in the table.
distance:
The distance factor controls the speed of movement
through the table. The time taken to execute the
CAM()
command is dependent on the current axis
SPEED
and this
distance (which is in user units).
Say for example the system is being programmed in mm
and the speed is set to 10mm/sec. If a distance of 100mm
is specified the CAM command will take 10 seconds to exe-
cute. The speed may be changed at any time to any value
as with other motion commands. The
SPEED
is ramped up
to using the current
ACCEL
value. To obtain a
CAM
shape
where
ACCEL
has no effect the value should be set to at
least 1000 times the
SPEED
value (assuming the default
SERVO_PERIOD
of 1ms).