Read Motion I/O Data

NI-Motion VI

Read Motion I/O Data

Reads status and data from the motion inputs and outputs.

Details     Remarks

Device Compatibility

DeviceCompatibility
7330
Y
7340
Y
7344
N
7350
Y
7390
Y
NI SoftMotion Controller for CANopen—Accelnet
Y
NI SoftMotion Controller for CANopen—Xenus
Y
attribute is the attribute you want to read. The following are valid attributes:
  • forward limit active—Returns the status to the Boolean element of the data cluster. TRUE indicates that the input is active and FALSE indicates that the input is inactive.
  • reverse limit active—Returns the status to the Boolean element of the data cluster. TRUE indicates that the input is active and FALSE indicates that the input is inactive.
  • forward software limit active—Returns the status to the Boolean element of the data cluster. TRUE indicates that the input is active and FALSE indicates that the input is inactive.
  • reverse software limit active—Returns the status to the Boolean element of the data cluster. TRUE indicates that the input is active and FALSE indicates that the input is inactive.
  • home input active—Returns the status to the Boolean element of the data cluster. TRUE indicates that the input is active and FALSE indicates that the input is inactive.
  • inhibit-in active—Returns the status to the Boolean element of the data cluster. TRUE indicates that the input is active and FALSE indicates that the input is inactive.
  • in-position active—Returns the status to the Boolean element of the data cluster. TRUE indicates that the input is active and FALSE indicates that the input is inactive.
  • drive ready active—Returns the status to the Boolean element of the data cluster. TRUE indicates that the input is active and FALSE indicates that the input is inactive.
  • inhibit-out active—Returns the status to the Boolean element of the data cluster. TRUE indicates that the output is active and FALSE indicates that the output is inactive.
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 you are reading.
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.

Using This VI

Use this VI to read the status and data from the motion inputs and outputs on the motion controller. You can read the status of these motion inputs and outputs at any time, regardless of whether they are enabled. The limit and home input status during a Find Reference move is undefined. Refer to Write Motion I/O Data for more information.

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  The active state of these signals determines if an On state is active high/active closed or active low/active open. Refer to Write Motion I/O Data for more information about active state and general information about the signals.
Note  Refer to VI Execution Times for benchmark timing information about your controller.

Remarks

This section includes information about how the behavior of this VI differs among the controllers that support it.

NI 73xx Controller Considerations

The following list includes considerations you must make when you are using this VI with a 73xx motion controller:

  • The minimum pulse width for the inhibit-in input to be detected is approximately 1 ms.
  • On the NI PCI-7390 controller, the inhibit-in active attribute does not return a valid value unless the inhibit-in signal is enabled.
  • On the NI PCI-7390 controller, the in-position active attribute does not return a valid value unless the in-position signal is enabled.

NI SoftMotion Controller Considerations

The following includes considerations you must make when you are using this VI with the NI SoftMotion Controller:

The NI SoftMotion Controller does not support the in-position active, drive ready active, or inhibit-out active attributes.