9-21
9 Motion Control Functions
NJ/NX-series CPU Unit Motion Control Userās Manual (W507)
9-2 Single-axis Synchronized Control
9
9-2-5 Cam Tables
The MC Function Module must identify the cam end point of the cam table. If an overwrite is performed
from the user program during cam operation and the number of valid cam data changes, you must
update the number of valid cam data to the latest value. Use the MC_SetCamTableProperty instruction
for this.
The cam end point is the data located one cam data before the first cam data with a phase of 0 after the
start point in the cam table. All cam data after phase 0 is detected will be invalid.
For example, refer to the following cam table. The EndPointIndex (End Point Index) output variable is
999 and the MaxDataNumber (Maximum Number of Cam Data) output variable is 5,000 from the
MC_SetCamTableProperty instruction.
Precautions for Correct UsePrecautions for Correct Use
⢠You cannot change the maximum number of cam data from the user program.
⢠Execute this instruction after overwriting the cam data in any way that changes the number of
valid cam data. If the number of valid cam data is not updated, the cam operation and the
operation of the EndOfProfile (End of Cam Cycle) of the MC_CamIn instruction may not be as
expected.
For details on the Set Cam Table Properties instruction, refer to the MC_SetCamTableProperty (Set
Cam Table Properties) instruction in the NJ/NX-series Motion Control Instructions Reference Manual
(Cat. No. W508).
Updating Cam Table Properties
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
MyCam1 [0]
MyCam1 [997]
MyCam1 [998]
MyCam1 [999]
MyCam1 [1000]
MyCam1 [4999]
Phase
Displacement
0
00
0
Maximum number of data: 5,000
Invalid data
Cam end point
Valid data
Cam start point
Cam data structure array
359.8
359.9
360.0
0
2
1
0
0