Camming and Gearing Functions

Use camming and gearing motion to synchronize one or more follower axes to a leader axis. The motion of the follower axes is a function of the motion of the leader axis.

Limitations

Camming and gearing motion does not apply to the acceleration limiting feature, the feedrate limiting feature, and the automatic acceleration feature.

The conditions that follow automatically stop the relation between the follower axis and the leader axis:

  • If you use the CammingOff() function or the GearingOff() function on the follower axis.
  • If you use the Abort() function on the leader axis or the follower axis.
  • If you disable the follower axis.
  • If software clamping occurs on the follower axis.
  • If the controller generates an axis fault on the follower axis and that fault is set in the FaultMaskDisable Parameter or the FaultMaskDecel Parameter.

You cannot configure a camming or gearing relation between axes that have different position update rates. The table that follows shows the position update rates for each drive type.

Table: Position Update Rates

Drive Type   Position Update Rate
Servo Axis FLEX, iXA4, and XA4 10 kHz
All others 20 kHz
Galvo Axis 100 kHz

Camming Motion

Camming motion causes the position or velocity of a follower axis to move based on the position of the leader axis and the coordinates that you specify in a cam table.

For an example program, refer to Camming.

The CammingLoadTableFromArray() function lets you load a cam table, which consists of coordinates that specify the follower axis position for each leader axis position.

function CammingLoadTableFromArray($tableNum as integer, $leaderValues[] as real, $followerValues[] as real, $numValues as integer, $unitsMode as CammingUnits, $interpolationMode as CammingInterpolation, $wrapMode as CammingWrapping, $tableOffset as real)

Loads a camming table into the SMC.

Arguments

$tableNum  The camming table number to use. This value must be greater than or equal to 0 and less than or equal to 99. Use this number when using the CammingOn() and CammingFreeTable() functions.

$leaderValues  Array of leader axis position values for the follower axis to track.

$followerValues  Array of follower axis positions or velocities to use.

$numValues  The number of values in the leaderValues and followerValues arrays.

$unitsMode  The units of the values in the camming table.

$interpolationMode  The interpolation type to use if the position of the leader axis is between two values in the table.

$wrapMode  Determines how a leader axis position value outside of the table is treated.

$tableOffset  An offset applied to all follower axis position or velocity values in the table.

You can specify leader axis and follower axis positions with units that are user units or counts. The unit type that you use depends on the value of the $unitsMode argument that you specify to the CammingLoadTableFromArray() function.

You can set this argument with the enumeration that follows.

Use the $interpolationMode argument of the CammingLoadTableFromArray() function to configure the type of interpolation that the controller uses when the position of the leader axis is different from one of the positions specified in the $leaderValues argument:

  • If the leader axis position on the controller is equal to one of the positions specified in the $leaderValues argument, the controller uses the value of that cam table entry as the follower axis position.
  • If the leader axis position on the controller is between two of the leader axis positions in the cam table, the controller uses the specified linear or cubic spline interpolation to calculate a follower axis position that is between the two corresponding follower axis positions in the table.

You can set this argument with the enumeration that follows.

Tip: Aerotech recommends that you use cubic spline interpolation to get maximum smoothness for the motion of the follower axis. But if you want minimum rippling to occur, use linear interpolation.

Use the $wrapMode argument of the CammingLoadTableFromArray() function to configure the behavior of the camming motion when the leader axis is out of the range of positions that you specify for the $leaderValues argument. The wrapping modes are as follows:

  • If you specify that wrapping must not occur: The controller uses the value of the $leaderValues argument that is nearest to the position of the leader axis to determine the position of the follower axis.
  • If you specify that wrapping must occur: The controller wraps the position value of the leader axis to determine the position of the follower axis.

You can set this argument with the enumeration that follows.

Use the $tableOffset argument of the CammingLoadTableFromArray() function to offset the position value of the leader axis that is used to determine the position of the follower axis. For this argument, you can specify the types of values that follow:

  • If you specify a value of zero, no offset occurs.
  • If you specify a positive value, the cam table shifts to the left by the quantity of the offset that you specify.
  • If you specify a negative value, the cam table shifts to the right by the quantity of the offset that you specify.

IMPORTANT: Before you enable or disable cam table motion, make sure that the leader axis is stationary.

The CammingOn() function lets you synchronize the follower axis to the leader axis.

The CammingOff() function lets you stop synchronizing the follower axis to the leader axis.

function CammingOn($followerAxis as axis, $leaderAxis as axis, $tableNum as integer, $source as CammingSource, $output as CammingOutput)

Enables camming on the specified leader axis and follower axis.

Arguments

$followerAxis  The axis to set as the follower axis.

$leaderAxis  The axis to set as the leader axis.

$tableNum  The camming table number to use. This value must be greater than or equal to 0 and less than or equal to 99.

$source  The signal on the leader axis that the follower axis will track.

$output  The output signal to generate and the synchronization mode to use on the camming follower axis.

Use the $source argument of the CammingOn() function to configure the position value of the leader axis that is used to determine the position of the follower axis.

You can set this argument with the enumeration that follows.

Use the $output argument of the CammingOn() function to configure the type of output that camming motion generates for the follower axis. Specify one of the output modes that follow:

  • Relative Output mode causes the controller to continuously position the follower axis at the difference between the position of the follower axis when the camming motion was enabled and the position of the follower axis that is generated from the cam table.
  • Absolute Output mode causes the controller to automatically generate MoveRapid() motion that moves the follower axis to the correct position before the camming motion starts. This position is generated from the cam table.
  • Velocity Output mode causes the controller to use the positions specified for the follower axis as velocities. These positions are specified in the CammingLoadTableFromArray() function.

You can set this argument with the enumeration that follows.

function CammingOff($followerAxis as axis)

Disables camming on the specified follower axis.

Arguments

$followerAxis  The follower axis on which to disable camming.

The MaxSpeedClamp Parameter does not limit the velocity of follower axes during camming motion.

To release a cam table from the controller, use the CammingFreeTable() function.

function CammingFreeTable($tableNum as integer)

Unloads a camming table from the SMC.

Arguments

$tableNum  The camming table number to remove. This value must be greater than or equal to 0 and less than or equal to 99.

Gearing Motion

Gearing motion causes a follower axis to follow the position of a leader axis. You can use the GearingSetLeaderAxis() function to configure the relation between the follower axis and the leader axis. The controller continuously maintains the follower axis velocity in proportion with the leader axis velocity based on a fixed ratio that you set with the GearingSetRatio() function.

function GearingSetLeaderAxis($followerAxis as axis, $leaderAxis as axis, $gearingSource as GearingSource)

Configures gearing for an axis.

Arguments

$followerAxis  Follower axis for the gearing setup.

$leaderAxis  Leader axis for the gearing setup.

$gearingSource  Input data source for gearing.

You can set the $gearingSource argument with the enumeration that follows.

function GearingSetRatio($followerAxis as axis, $gearRatio as real)

Sets the gearing ratio for an axis.

Arguments

$followerAxis  The axis on which to set the gear ratio.

$gearRatio  The scale factor applied to the motion of the follower axis, specified as the ratio of follower axis counts to leader axis counts. A negative gear ratio will cause the follower axis to move in the opposite direction of the motion of the leader axis.

After you configure the gearing motion, you can enable it by using the GearingOn() function. This function has two modes that you can use:

  • If you enable the gearing motion with unfiltered mode, the controller does not smooth out sudden changes in the velocity of the leader axis.
  • If you enable the gearing motion with filtered mode, the controller smooths out sudden changes in the velocity of the leader axis to prevent the controller from transmitting them to the follower axis.

function GearingOn($followerAxis as axis, $filter as GearingFilter)

Enables gearing on an axis.

Arguments

$followerAxis  The axis on which to enable gearing.

$filter  Type of filter applied to follower axis motion.

You can set the $filter argument with the enumeration that follows.

To disable gearing motion, use the GearingOff() function.

function GearingOff($followerAxis as axis)

Disables gearing on an axis.

Arguments

$followerAxis  The axis on which to disable gearing.

Related Topics 

Camming Example Program

Advanced Motion Functions