Reset PositionResets the axis position to the specified position, taking following error into account.
| Device Compatibility
|
Primary Reset Position (0) is the reset value for the axis and its associated primary feedback resource, taking following error into account. You can reset position to any value in the total position range of –(231) to +(231–1). The value is in steps for stepper systems and counts for servo systems. | |||||||
Secondary Reset Position (0)
is the reset value for the optional secondary feedback resource. You can reset position to any value in the total position range of –(231) to +(231–1).
|
|||||||
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 axis to control. | |||||||
Inp Vect indicates the source of the data for this VI. Available input vectors include immediate (0xFF), variable (0x01 through 0x78), or indirect variable (0x81 through 0xF8). Refer to Input and Return Vectors for more detailed information. | |||||||
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:
|
|||||||
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.
|
Using This VI
This function resets the axis position and the associated primary feedback position, taking following error into account, and resets the optional secondary feedback position. This means that if you reset the position to 0 and have a following error of 15, the feedback position is –15.
You can reset position to zero or any value in the 32-bit position range. You can reset the secondary feedback to the same value as the axis and primary feedback or you can reset it to a different value. If a secondary feedback resource is not in use, the corresponding reset value is ignored. If you use the same feedback device for both primary and secondary feedback, you must reset the positions to be the same value.
Note Non-zero reset values are useful for defining a position reference offset. |
Position can be reset at any time. However, it is recommended that you reset position only while the axis is stopped. An axis reset while the axis is moving does not have a repeatable reference position.
Note For axes in p-command mode, ensure that the axis is not moving before calling Reset Position. Calling Reset Position when the axis is moving introduces position error into the system. |
Typically, you execute the Reset Position VI one time after the Find Home and Find Index sequences of the Find Reference VI have completed successfully to set the zero position for the system and not again until the next power-up.
An ADC channel used as a primary feedback resources is reset by storing an offset value when this VI is executed. In this way, its zero reference is not lost and you can still read the actual ADC value with the Read ADCs VI.
Note If you are doing onboard programming and are using Inp Vect to get the data this VI needs, remember that this VI reads the variables starting at the memory address pointed to by Inp Vect in the following order: Primary Reset Position, Secondary Reset Position. Enabled breakpoints are also automatically disabled when you execute Reset Position on the corresponding axis. |
Resetting position sets the value returned by steps/rev to the primary reset position.
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. |
Remarks
This section includes information about how the behavior of this VI differs among the controllers that support it.
NI SoftMotion Controller Considerations
The following list includes considerations you must make when you are using this VI with the NI SoftMotion Controller:
- The secondary reset position is ignored.
- When you reset a slave position, gearing is not disabled.
Note National Instruments recommends that you do not reset the position when an axis is moving or gearing is enabled because doing so might cause the axis to jump and/or cause a following error.