AKD BASIC User Guide | 6 AKD BASIC Parameters, Operators, Statements
6.5.1 CAM.ACTIVATE
General Information
Type Parameter
Description Activates the specified cam table.
Units None
Range 0 to 8
Default
Value
0
Data Type Integer
Start Version M_01-06-00-000
Description
CAM.ACTIVE activates the specified cam table. The Position Command is calculated accord-
ing to the Master Position and the points in the specified cam table.
When you activate a new cam, the drive accelerates (at EGEAR.ACCLIMIT) or decelerates (at
EGEAR.DECLIMIT) as necessary to the speed required by the present motion of the Cam
Master and the slave position profile defined in the cam table.
When speed synchronization is achieved, EGEAR.LOCK is set to one and a correction move
is performed to bring the slave into position lock with the cam table. The direction of this move
is controlled by CAM.CORRECTDIR. The parameters of this correction move are the same as
for any other move (i.e., MOVE.ACC, MOVE.DEC, MOVE.RUNSPEED).
If the master is not moving or if the slave position profile in the cam table does not require cam
motion when the cam is activated, the speed synchronization occurs instantly and the cor-
rection move is executed as soon as the cam is activated.
CAM.ACTIVATE is automatically set to zero (i.e., any cam is disengaged) when the drive is
disabled.
To disable the correction move, set CAM.CORRECTDIR = 3.
You must declare and create a cam table before you make it active. If MOVE.RUNSPEED is
equal to zero when you set CAM.ACTIVATE, a run-time error is generated because the cor-
rection move cannot be performed.
Examples
The following example declares, creates, and activates a cam.
Main
CAM.CREATE(1, 5) ‘allocate space for cam #1, 5
points
‘start the cam create block
CAM.ADDPOINT(0, 0)
CAM.ADDPOINT(200, 65536 / 10)
CAM.ADDPOINT(400, 65536 / 8)
‘add the points
CAM.ADDPOINT(600, 65536 * 3 / 4)
CAM.ADDPOINT(800, 65536)
End ‘end the cam create block
DRV.SWENABLE = 0 ‘Disable motor while setting
position
CAM.MASTER = 2 'Cam Master = External Encoder
153 Kollmorgenâ„¢ | March 30, 2012