*2. If you use a user-defined variable, create an array variable with a starting element number of 0 and a maximum of 358
array elements N.
Function
• The MC_GenerateCamTable instruction calculates cam data based on CamProperty (Cam Proper-
ties) and CamNodes
(Cam Nodes) that are specified for the in-out variables when Execute changes
to TRUE.
• The calculated cam data values are written to CamTable specified for the in-out variable.
• The items in CamProperty (Cam Properties) and CamNodes correspond to the items that are set
with the Cam Editor of the Sysmac Studio.
• When writing the cam table is completed, the end point index of the cam table is updated and the
number of the last cam element is output to EndPointIndex.
It is not necessary to execute the MC_SetCamTableProperty (Set Cam Table Properties) instruction
after completion of the MC_GenerateCamTable instruction.
• While the cam table creation process is in progress, _MC_COM.Status.GenerateCamBusy (Cam
Table Creation Busy) in the MC Common variable of the motion control system variables will be
TRUE.
1
0
0.0
0.0
... ...
179 0.0
180 0.0
181 0.0
...
0.0
0.0
...
0.0
0.0
0.0
... ...
1
0
1.0
0.0
... ...
179 199.0
180 200.0
181 0.0
...
1.0
0.0
...
179.0
180.0
0.0
... ...
Cam table before instruction execution
Element No.
Phase
Displacement
Cam table after instruction execution
Element No.
Phase
Displacement
MC_GenerateCamTable_instance
CamTable CamTable
CamProperty CamPropertyCam table properties
Cam nodes (Curve definitions)
“180” is output after instruction execution.
CamNodes
Busy
CommandAborted
Error
ErrorID
ErrorParameterCode
ErrorNodePointIndex
EndPointIndex
MC_GenerateCamTable
Execute
CamNodes
Done
The cam data is
calculated and written
to the table when the
instruction is executed.
Cam end point
5 Common Command Instructions
5-20
NY-series Motion Control Instructions Reference Manual (W561)