Wait ReferenceWaits 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.
| Device Compatibility
|
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):
When searching on multiple vector spaces (Axis or Vector Space = Vector Space Control):
|
|||||||||||||||||||||||||
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.
|
|||||||||||||||||||||||||
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:
|
|||||||||||||||||||||||||
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.
|
|||||||||||||||||||||||||
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