Read Reference Status

NI-Motion VI

Read Reference Status

Reads the currently selected reference status for the given set of axes or coordinate (vector) space.

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
Status Type is the selector for the type of reference status to read.

You can choose from the following status types:

Status Type Description
Home Found returns True if the last Find Home executed successfully
Index Found returns True if the last Find Index executed successfully
Center Found returns True if the last Find Center executed successfully
Forward Limit Found returns True if the last Find Forward Limit executed successfully
Reverse Limit Found returns True if the last Find Reverse Limit executed successfully
Reference Found returns True if the last Find Reference executed successfully
Current Sequence Phase     returns the current phase of a sequence that is currently executing
Finding Reference returns True if a Find Reference is currently executing
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, read status on the specified axis. If FALSE, do not read status on the specified axis.
Axis 2—If TRUE, read status on the specified axis. If FALSE, do not read status on the specified axis.
Axis 3—If TRUE, read status on the specified axis. If FALSE, do not read status on the specified axis.
Axis 4—If TRUE, read status on the specified axis. If FALSE, do not read status on the specified axis.
Axis 5—If TRUE, read status on the specified axis. If FALSE, do not read status on the specified axis.
Axis 6—If TRUE, read status on the specified axis. If FALSE, do not read status on the specified axis.
Axis 7—If TRUE, read status on the specified axis. If FALSE, do not read status on the specified axis.
Axis 8—If TRUE, read status on the specified axis. If FALSE, do not read status on the specified axis.

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

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

To read multiple axes, the Axis or Vector Space selector is set to 0 and the Axis/VS Map bitmap defines the axes to read. Similarly, to read 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 Read Reference Status 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 Read Reference Status.
Ret Vect indicates the destination for the return data generated by this VI. Available return vectors include return data to the host (0xFF), return data to a variable (0x01 through 0x78), return data to an indirect variable (0x81 through 0xF8), and do not return data (0). 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:
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.
Value is the Status Type output.

Using This VI

This VI reads the currently selected reference status for the given set of axes or coordinate (vector) space.

If multiple axes in a coordinate space are selected using the axis bitmap, all axes must have successfully found their last reference for Home Found, Index Found, Center Found, Forward Limit Found, Reverse Limit Found, and Reference Found to be true.

If any of the selected axes are currently executing a Find Reference, Finding Reference is true. Wait until Finding Reference is false before checking the status of any other attribute. The status of the Home Found, Index Found, Center Found, Forward Limit Found, Reverse Limit Found, and Reference Found status types are 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.