The number of the last element in the cam data variable that was written is output to the
EndPointIndex output variable of the instruction as the end point index. In this example, 3600 would
be output.
This completes execution of the instruction.
Cam Table Displacement Overflow
A Cam Table Displacement Overflow error (error code: 5742 hex) will occur if the value of Distance
(Slave Axis Displacement) in the cam data calculated by the instruction exceeds the valid range of
REAL data. The value of the relevant Distance (Slave Axis Displacement) will not change, and creat-
ing the cam table will be aborted.
A Cam T
able Displacement Overflow error can occur only when Curve (Curve Shape) is set to poly-
nomic 3 or polynomic 5. If this error occurs, refer to the following calculation methods for displace-
ments for polynomic 3 or polynomic 5 and correct the values in the CamProperty (Cam Properties)
and CamNodes in-out variables.
Displacement Calculation Method for Polynomic 3
The element number in the array variable specified for CamNodes is “m.”
When polynomic 3 is specified for Curve (Curve Shape) of element m, Phase of element m-1 is set as
the initial value P
init
of the master axis phase. In the same way, Distance is set to the initial value d
init
of the slave axis displacement. When m = 0, calculations are performed with P
init
and d
init
set to 0.
Also, Phase of element m is set to the final value P
final
of the master axis phase. In the same way,
Distance for element m is set to the final value d
final
of the slave axis displacement.
d(n) is calculated as shown below when d(n) is Distance (Slave Axis Displacement) of the nth cam
data from d
init
.
When 0 ≤ n < N,
d(n) = d
init
+ (d
final
- d
init
) ·
Ʃ
i = f
a
i
·
3
(
(P
final
- P
init
)
pitch
· n
)
i
When n = N,
d(n) = d
final
However, when (P
final
- P
phase
) / pitch is an integer
,
When (P
final
- P
phase
) / pitch is not an integer,
N = floor
pitch
P
final
- P
phase
(
)
+ 1
a
1
=
(d
final
- d
init
)
V
init
· T
5 Common Command Instructions
5-28
NY-series Motion Control Instructions Reference Manual (W561)