Enable Gearing Single Axis

NI-Motion VI

Enable Gearing Single Axis

Enables slave axis for master-slave gearing.

Details

Device Compatibility

DeviceCompatibility
7330
N
7340
Y
7344
Y
7350
Y
7390
N
NI SoftMotion Controller for CANopen—Accelnet
Y
NI SoftMotion Controller for CANopen—Xenus
Y
Gearing (Disable) indicates whether to enable or disable the slave axis for gearing. If true, gearing is enabled. If false, gearing is disabled (default).
Board ID is a unique number assigned by Measurement & Automation Explorer (MAX) used to send and receive commands and data to or from a specific NI motion controller.
Axis is the slave axis to enable or disable.
error in (no error) describes error conditions that occur before this VI runs. The default input of this cluster is no error. If an error already occurred, this VI returns the value of error in in error out. The VI runs normally only if no incoming error exists. Otherwise, the VI passes the error in value to error out. The error in cluster contains the following parameters:
status is TRUE if an error occurred before this VI was called, or FALSE if not. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code.
code is a number identifying an error or warning. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code. Use the error handler VIs to look up the meaning of this code and display the corresponding error message.
source is a string that indicates the origin of the error, if any. Typically, source is the name of the VI in which the error occurred.
Bd ID Out is provided for flow control. You can string together NI-Motion VIs by wiring the Bd ID Out terminal of one VI to the Board ID terminal of the next VI.
Resource Output is the Axis, Vector Space, ADC, or Encoder you wired into the VI. Use Resource Output to pass the resource to another VI and/or to display information about the device.
error out contains error information. If error in indicates an error, error out contains the same error information. Otherwise, it describes the error status that this VI produces.
status is TRUE if an error occurred, or FALSE if not. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code.
code is a number identifying an error or warning. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code. Use the error handler VIs to look up the meaning of this code and display the corresponding error message.
source is a string that indicates the origin of the error, if any. Typically, source is the name of the VI in which the error occurred.

Using This VI

This VI is similar to the Enable Gearing VI, but allows you to enable or disable gearing on a single axis without affecting the other axes.

The Enable Gearing Single Axis VI 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 VI for 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 VIs prior to enabling master-slave gearing. In addition, you must enable and activate the slave axis before enabling gearing. An error is generated if the 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 the Enable Gearing Single Axis VI 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 VI on a slave axis stops the axis and automatically disables gearing for that axis. If the master trips on following error, the slave axis 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.