flex_config_gear_master |
Configure Gear Master
Usage
status = flex_config_gear_master(u8 boardID, u8 axis, u8 masterAxisOrEncoderOrADC);
Purpose
Assigns a master axis, encoder, or ADC channel for master-slave gearing.
Tip Refer to the Remarks section for information about how the behavior of this function differs between controllers. |
Parameters
Name | Type | Description |
---|---|---|
boardID | u8 | assigned by Measurement & Automation Explorer (MAX) |
axis | u8 | slave axis to control |
masterAxisOrEncoderOrADC | u8 | axis, encoder or ADC channel to use as the master |
Parameter Discussion
axis is the slave axis to control. 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.
masterAxisOrEncoderOrADC is the axis (NIMC_AXIS1 through NIMC_AXIS30), trajectory generator, encoder (NIMC_ENCODER1 through NIMC_ENCODER30), or ADC channel (NIMC_ADC1 through NIMC_ADC30) to use as the master for this slave axis. A zero (0) value means no master is assigned (default). On motion controllers that support fewer than thirty axes, configuring non-existent resources returns error 70006 (NIMC_badResourceIDOrAxisError). Refer to Axes, Encoders, and ADC Channels, respectively for axis, encoder, and ADC channel resource IDs.
Note axis and masterAxisOrEncoderOrADC cannot be the same, because an axis cannot be its own master. |
Using This Function
This function assigns a master axis, encoder, or ADC channel to the slave axis selected. Any number of slave axes can have the same master, but each slave axis can have only one master. A slave axis may also serve as the master axis for any number of additional slave axes.
You must call this function prior to enabling master-slave gearing with the Enable Gearing function. Typically, the source for the master position is an independent encoder, an ADC channel, or the feedback resource of an enabled axis. In each case, you assign the resource, not the axis, as the master. The gear master, which can be an axis, encoder, or ADC, must be enabled before you can use this function. Use the Enable Axis, Enable Encoders, or Enable ADCs functions to enable the gear master.
When an axis is assigned as the master, its trajectory generator output (not its feedback position) is used as the master position command. This mode of operation can eliminate the following error skew between the master and slave axes and is especially useful in gantry applications. The master axis can be operating in any mode (including being a slave to another master).
Master-slave functionality of slave axes is in addition to their normal mode of operation. This allows a point-to-point move to be superimposed upon the slave while the slave axis is in motion due to being geared to its master. This functionality is useful for registration and reference offset moves. Refer to the Gearing section of the NI-Motion Help for information about using superimposed moves/registration applications. Also, refer to the Rotating Knife section of the NI-Motion Help for example code that includes superimposed moves.
Refer to the Load Gear Ratio and Enable Gearing functions for more information about master-slave gearing.
Remarks
This section includes information about how the behavior of this function differs among the controllers that support it.
NI SoftMotion Controller Considerations
The following list includes considerations you must make when you are using this function with the NI SoftMotion Controller:
- The NI SoftMotion Controller does not support using analog feedback as the gear master (analog gearing).