Read Execution Status

NI-Motion VI

Read Execution Status

You can use this polymorphic VI to read the execution status of a selected axis execution status attribute, all execution status attributes on an axis, or a selected coordinate execution status attribute.

Use the pull-down menu to select an instance of this VI.

Details

Device Compatibility

Device Compatibility
7330
N
7340
N
7344
N
7350
Y
7390
Y
NI SoftMotion Controller for CANopen—Xenus
N
NI SoftMotion Controller for CANopen—Accelnet
N

Read Axis Status

attribute is the attribute you want to read. Refer to the Details section for more information. The following are valid attributes:
  • axis active—Returns the status to the Boolean element of the data cluster.
  • move complete—Returns the status to the Boolean element of the data cluster.
  • profile complete—Returns the status to the Boolean element of the data cluster.
  • blend complete—Returns the status to the Boolean element of the data cluster.
  • following error exceeded—Returns the status to the Boolean element of the data cluster.
  • velocity threshold exceeded—Returns the status to the Boolean element of the data cluster.
  • axis moving—Returns the status to the Boolean element of the data cluster.
  • direction forward—Returns the status to the Boolean element of the data cluster.
board in is a unique number assigned by Measurement & Automation Explorer used to send and receive commands and data to or from a specific NI motion controller.
axis in is the axis to read with this VI.
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.
data is a cluster of variables that contains the values for the selected attribute. Read the correct element of the cluster for the attribute. The values of the other elements in the cluster are undefined.
integer is 32-bit integer data.
double is 64-bit floating point data.
Boolean is Boolean data.
board out is provided for flow control. You can string together NI-Motion VIs by wiring the board out terminal of one VI to the board in terminal of the next VI.
axis out is provided for flow control. You can string together NI-Motion VIs by wiring the axis out terminal of one VI to the axis in terminal of the next VI.
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.

Read All Axis Status

board in is a unique number assigned by Measurement & Automation Explorer used to send and receive commands and data to or from a specific NI motion controller.
axis in is the axis to read with this VI.
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.
axis status is the data record containing axis status information. Refer to the Details section for more information.
board out is provided for flow control. You can string together NI-Motion VIs by wiring the board out terminal of one VI to the board in terminal of the next VI.
axis out is provided for flow control. You can string together NI-Motion VIs by wiring the axis out terminal of one VI to the axis in terminal of the next VI.
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.

Read Coordinate Status

attribute is the attribute you want to read. Refer to the Details section for more information. The following are valid attributes:
  • move complete—Returns the status to the Boolean element of the data cluster.
  • profile complete—Returns the status to the Boolean element of the data cluster.
  • blend complete—Returns the status to the Boolean element of the data cluster.
  • following error exceeded—Returns the status to the Boolean element of the data cluster.
board in is a unique number assigned by Measurement & Automation Explorer used to send and receive commands and data to or from a specific NI motion controller.
coordinate in is the coordinate to read with this VI.
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.
data is a cluster of variables that contains the values for the selected attribute. Read the correct element of the cluster for the attribute. The values of the other elements in the cluster are undefined.
integer is 32-bit integer data.
double is 64-bit floating point data.
Boolean is Boolean data.
board out is provided for flow control. You can string together NI-Motion VIs by wiring the board out terminal of one VI to the board in terminal of the next VI.
coordinate out is provided for flow control. You can string together NI-Motion VIs by wiring the coordinate out terminal of one VI to the coordinate in terminal of the next VI.
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

Use this VI to read the execution status of an axis or coordinate.

Caution  If this VI uses reflective memory, it should not be used for event checking. In this case, only use the information returned by this VI for display purposes. Refer to Reflective Memory VIs for more information.
Note  Refer to VI Execution Times for benchmark timing information about your controller.

The VI will return True or False based on the following criteria:

Element Execution Status
axis active True = motor is on
False = motor is off
move complete True = move complete
False = move not complete
profile complete True = profile is complete
False = profile generation in process
blend complete True = blend complete
False = blend pending
following error exceeded True = axis or coordinate axis exceeded the programmed following error limit
False = axis or coordinate axis following error is below the programmed following error limit
Note  If you are running a contoured move or slave axis move with a stepper axis, it is possible that the contour velocity or the slave axis geared velocity exceeds the maximum step rate of the controller. In this case, the controller kills the axis and sets the following error status to true. Refer to the Specifications section of your controller user manual for the maximum step rate of your controller.
velocity threshold exceeded True = axis velocity is above the programmed velocity threshold
False = axis velocity is below the programmed velocity threshold
axis moving True = axis is moving
False = axis is stopped
direction forward True = axis moving forward
False = axis moving in reverse
index capture occurred True = encoder index position capture occurred
False = encoder index position not captured
position capture occurred True = position capture (trigger) occurred
False = position capture (trigger) pending or disabled
position compare occurred True = position compare (breakpoint) occurred
False = position compare (breakpoint) pending or disabled
forward limit active True = forward limit active
False = forward limit inactive
reverse limit active True = reverse limit active
False = reverse limit inactive
forward software limit active True = forward software limit active
False = forward software limit inactive
reverse software limit active True = reverse software limit active
False = reverse software limit inactive
home input active True = Home input active
False = Home input inactive
home found True = home position found
False = home position not found
index found True = index position found
False = index position not found
reference found True = reference position found
False = reference position not found