Check Reference

NI-Motion VI

Check Reference

Checks the status of a search sequence initiated by Find Reference.

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
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/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, check reference on the specified axis. If FALSE, do not check reference on the specified axis.
Axis 2—If TRUE, check reference on the specified axis. If FALSE, do not check reference on the specified axis.
Axis 3—If TRUE, check reference on the specified axis. If FALSE, do not check reference on the specified axis.
Axis 4—If TRUE, check reference on the specified axis. If FALSE, do not check reference on the specified axis.
Axis 5—If TRUE, check reference on the specified axis. If FALSE, do not check reference on the specified axis.
Axis 6—If TRUE, check reference on the specified axis. If FALSE, do not check reference on the specified axis.
Axis 7—If TRUE, check reference on the specified axis. If FALSE, do not check reference on the specified axis.
Axis 8—If TRUE, check reference on the specified axis. If FALSE, do not check reference on the specified axis.

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

Vector Space 1—If TRUE, check reference on the specified vector space. If FALSE, do not check reference on the specified vector space.
Vector Space 2—If TRUE, check reference on the specified vector space. If FALSE, do not check reference on the specified vector space.
Vector Space 3—If TRUE, check reference on the specified vector space. If FALSE, do not check reference on the specified vector space.
Vector Space 4—If TRUE, check reference on the specified vector space. If FALSE, do not check reference on the specified vector space.
Axis or Vector Space can select an axis (1 through 15), vector space (0x11 through 0x14), multiple axes (0), or multiple vector spaces (0x10). When simultaneously checking multiple axes or vector spaces, the Axis/VS Map parameter indicates which axes or vector spaces are involved.

To check multiple axes, the Axis or Vector Space selector is set to 0 and the Axis/VS Map bitmap defines the axes to check. Similarly, to check 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 Check 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 Check 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.
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.
Found Reference is a returned Boolean value that indicates the success of the search or searches the VI is waiting for. It does not matter if different searches are being executed on different axes. When all searches are completed on all the axes or vector spaces specified, Found Reference is true if all searches were successful. If any search did not complete successfully, Found Reference is false.
Finding Reference is a Boolean value that returns true when the find reference is ongoing.
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 returns whether the reference on the indicated axes is found. 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 executed with the Run Sequence option the Check Reference VI does not require an Axis or Vector Space or Axis/VS Map. When waiting on a Run Sequence, the Check Reference VI returns the status of the entire sequence. The Found Reference Boolean returns True only if and when all of the operations in the sequence are successful.

Wait until the Finding Reference parameter is false before checking the status of the Found Reference parameter. The status of the Found Reference parameter is undefined when Finding Reference is true. The Wait Reference VI does this for you, but you cannot execute any other VIs while Wait Reference is running.

Example

You initiated a Find Home on Axis 1, and Find Center on Axis 2 and Axis 3, and you want to check if all axes have found their reference. Call Check Reference with the following parameters:

Axis or Vector Space = Axis Control (0)
Axis/VS Map = 00001110 (axis 1, 2, & 3 enabled)