![background image](http://html1.mh-extra.com/html/omron/r88a-mcw151-drt-e/r88a-mcw151-drt-e_operation-manual_742243138.webp)
123
Command, function and parameter description
Section 6-3
PRINT "The error ";RUN_ERROR[0];
PRINT " occurred in line ";ERROR_LINE[0]
ENDIF
STOP
The IF statement is present to prevent the program going into error routine
when it is stopped normally.
6-3-32
CAM
Type:
Motion Control Command
Syntax:
CAM(
start_point, end_point, table_multiplier, distance
)
Description:
The CAM command is used to generate movement of an axis following a
position profile which is stored in the Table variable array. The Table values
are absolute positions relative to the starting point and are specified in
encoder edges. The Table array is specified with the TABLE command.
The movement can be defined with any number of points from 2 to 8.000. The
MC Unit moves continuously between the values in the Table to allow a num-
ber of points to define a smooth profile. Two or more CAM commands can be
executed simultaneously using the same or overlapping values in the Table
array. The Table profile is traversed once.
CAM requires that the start element in the Table array has value zero. The
distance argument together with the SPEED and ACCEL parameters deter-
mine the speed moving through the Table array. Note that in order to follow
the CAM profile exactly the ACCEL parameter of the axis must be at least
1000 times larger than the SPEED parameter.
CAM works on the default basis axis (set with BASE) unless AXIS is used to
specify a temporary base axis.
Arguments:
start_point
The address of the first element in the Table array to be used.
Being able to specify the start point allows the Table array to hold more than
one profile and/or other information.
end_point
The address of the end element in the Table array.
table_multiplier
The Table multiplier value used to scale the values stored in the Table. As the
Table values are specified in encoder edges, use this argument to set the val-
ues for instance to the unit conversion factor (set by UNITS parameter).
distance
A factor given in user units that controls the speed of movement through the
Table. The time taken to execute CAM depends on the current axis speed
and this distance. For example, assume the system is being programmed in
mm and the speed is set to 10 mm/s and the acceleration sufficiently high. If a
distance of 100 mm is specified, CAM will take 10 seconds to execute.
The SPEED parameter in the base axis allows modification of the speed of
movement when using the CAM move.
See also:
ACCEL, AXIS, CAMBOX, SPEED, TABLE
Example:
Assume that a motion is required to follow the following position equation:
t(x) = x*25 + 10000(1–cos(x))
Here, x is in degrees. This example is for a Table that provides a simple oscil-
lation superimposed with a constant speed. To load the Table and cycle it
continuously the following code would be used.
GOSUB camtable
loop: