Wait Reference

NI-Motion VI

Wait Reference

Waits for a search sequence initiated by Find Reference to complete and returns the status. Wait Reference also can be used to query the status of a search.

Details

Device Compatibility

DeviceCompatibility
7330
Y
7340
Y
7344
Y
7350
Y
7390
Y
NI SoftMotion Controller for CANopen—Accelnet
Y
NI SoftMotion Controller for CANopen—Xenus
Y
Timeout (ms) specifies how long, in milliseconds, the Wait Reference call waits before returning. If the timeout is reached before the search completes the Wait Reference Returns. In this manner, Wait Reference can be used to check the status of a search by passing a timeout of 0. By default, the timeout is 4294967295 or 0xFFFFFFFF. This value is handled differently, signifying an infinite wait time.
Axis/VS Map (Disabled) is the bitmap of axes or vector spaces (coordinate spaces) to use with this VI. It is only required when multiple axes or vector spaces are selected with the Axis or Vector Space parameter. Otherwise, this parameter is ignored.

When searching on multiple axes (Axis or Vector Space = Axis Control):

Axis 1—If TRUE, wait on the specified axis. If FALSE, do not wait on the specified axis.
Axis 2—If TRUE, wait on the specified axis. If FALSE, do not wait on the specified axis.
Axis 3—If TRUE, wait on the specified axis. If FALSE, do not wait on the specified axis.
Axis 4—If TRUE, wait on the specified axis. If FALSE, do not wait on the specified axis.
Axis 5—If TRUE, wait on the specified axis. If FALSE, do not wait on the specified axis.
Axis 6—If TRUE, wait on the specified axis. If FALSE, do not wait on the specified axis.
Axis 7—If TRUE, wait on the specified axis. If FALSE, do not wait on the specified axis.
Axis 8—If TRUE, wait on the specified axis. If FALSE, do not wait on the specified axis.

When searching on multiple vector spaces (Axis or Vector Space = Vector Space Control):

Vector Space 1—If TRUE, wait on the specified vector space. If FALSE, do not wait on the specified vector space.
Vector Space 2—If TRUE, wait on the specified vector space. If FALSE, do not wait on the specified vector space.
Vector Space 3—If TRUE, wait on the specified vector space. If FALSE, do not wait on the specified vector space.
Vector Space 4—If TRUE, wait on the specified vector space. If FALSE, do not wait on the specified vector space.
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 or Vector Space can select an axis (1 through 15), vector space (17 through 19), multiple axes (0), or multiple vector spaces (16). When simultaneously starting multiple axes or vector spaces, the Axis/VS Map parameter indicates which axes or vector spaces are involved.

To wait on multiple axes, the Axis or Vector Space selector is set to 0 and the Axis/VS Map bitmap defines the axes that are involved. Similarly, to wait on multiple vector spaces, the Axis or Vector Space selector is set to 16 and the Axis/VS Map bitmap defines the vector spaces that are involved.

Note  It is not possible to combine a Wait Reference on an axis and a vector space in a single use of this VI. To accomplish this, create a single axis vector space and then execute a multi-vector space Wait Reference.
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.
Poll Interval (20 ms) is the distance in time between the polling of the find reference activity.
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.
Axis or Vector Space Output is the Axis or Vector Space you wired into the VI. Use Axis or Vector Space 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.
Found Reference is a returned Boolean value that indicates the success of the find it is waiting for. It does not matter if different finds are being executed on different axes. When all finds are done on all the axes or vector spaces specified, Found Reference is true if all of the finds were successful. If any find did not complete successfully, Found Reference is false.

Using This VI

This VI returns when the find on the indicated axes finishes or the timeout is reached, whichever occurs first. There is no need to specify what type of find to wait for because the controller knows what searches are being done on what axes. This VI waits for and reports on the success of the current or last executed find on an axis, vector space, or a given set of axes or vector spaces as a whole.

If a Find Reference is being executed with the Run Sequence option the Wait Reference VI does not require an Axis or Vector Space or Axis/VS Map. When waiting on a Run Sequence, the Wait Reference VI returns when the entire sequence has finished. The Found Reference Boolean returns True only if all of the operations in the sequence were successful.

Note  You cannot execute any other processes while the Wait Reference VI is running. Use Check Reference or Read Reference Status if you want to run other processes simultaneously.

Example

You initiated a Find Home on Axis 1, and Find Center on Axis 2 and Axis 3, and you want to wait for all find sequences to finish before proceeding with the rest of the program. Simply call Wait Reference with the following parameters:

Axis or Vector Space set to Axis Control (0)
Axis Map set to 00001110 (axis 1, 2, & 3 enabled)
Timeout is Unwired