flex_enable_gearing_single_axis |
Enable Gearing Single Axis
Usage
status = flex_enable_gearing_single_axis(u8 boardID, u8 axis, u16 enable);
Purpose
Enables a slave axis for master-slave gearing.
Parameters
Name | Type | Description |
---|---|---|
boardID | u8 | assigned by Measurement & Automation Explorer (MAX) |
axis | u8 | axis to enable or disable |
enable | u16 | enable/disable value |
Parameter Discussion
axis is the axis to enable or disable. Valid values are NIMC_AXIS1 through NIMC_AXIS30. On motion controllers that support fewer than thirty axes, configuring non-existent axes returns error 70006 (NIMC_badResourceIDOrAxisError). Refer to Axes for axis resource IDs.
enable indicates if the function enables or disables the slave axis for gearing.
1 = Gearing enabled
0 = Gearing disabled
Using This Function
This function is similar to the Enable Gearing function, but allows you to enable or disable gearing on a single axis without affecting the other axes.
The Enable Gearing Single Axis function enables and disables master-slave gearing functionality of a slave axis. When gearing is enabled, the position of the slave axis and its corresponding master is recorded as its absolute gearing reference. From then on, as long as the gear ratio remains absolute, every incremental change of a master position is multiplied by the corresponding absolute gear ratio and applied to the slave axis. Refer to the Load Gear Ratio function for more information about absolute versus relative gear ratios.
Note Changing the absolute gear ratio causes the slave axes to jump to a new position specified by the new gear ratio. With servo motor systems the slave jumps immediately. With stepper systems, if the new slave position is within 4,000 steps, it jumps to the new position. Otherwise, the slave axis waits until the commanded slave position moves to within 4,000 steps and then jumps to the new position. The slave axis then resumes following the master axis according to the gear ratio. |
You must call the Configure Gear Master and Load Gear Ratio functions prior to enabling master-slave gearing. In addition, you must enable and activate the slave axes before enabling gearing. An error is generated if a slave is killed when gearing is enabled. These checks ensure that the slave axis enables in a controlled fashion.
Note If you are running a slave axis move with a stepper axis, it is possible that the slave axis geared velocity exceeds the maximum step rate of the controller. In this case, the controller kills the axis and sets the following error status to true. Refer to the Specifications section of your controller user manual for the maximum step rate of your controller. |
You can call this function at any time to disable gearing or to re-enable gearing with new absolute gearing reference positions. If gearing is disabled on a moving axis, the axis immediately stops but remains active. If the slave axis was also implementing a superimposed move, the superimposed move decelerates to a stop.
Executing the Stop Motion function on a slave axis stops the axis and automatically disables gearing for that axis. If the master trips on following error, the slave halt stops and disables gearing. Find Reference cannot be executed on slave axes with gearing enabled. An error is generated and the find sequence does not start.
Note National Instruments recommends disabling gearing before resetting the position of the master axis or the slave axis. When the position of either the master axis or the slave axis is reset, the reset offset is treated as gearing offset, and the slave axis jumps to the new gear position in one PID period. |