Read Communication Status

NI-Motion VI

Read Communication Status

Reads the communication status register (CSR) which represents the state of the controller.

Details      Remarks

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.
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.
Communications Status Register is the bitmap of communication status from the Communication Status Register:
Ready to Receive—If true, ready to receive a word from the host. If false, not ready to receive (busy).
Return Data Pending—If true, ready to send a word from the RDB to the host. If false, not ready to send (RDB empty).
Command In Process—If true, waiting for more data from the host to compute command. If false, idle.
Packet Error—If true, there is a communications packet error. If false, there is no error.
Power Up Reset—If true, controller is in the power-up state. If false, the power-up state has been cleared.
Error Message—If true, modal error message is pending. If false, there is no error.
Hardware Fail—If true, fatal hardware error occurred. If false, there is no error.
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.
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

On power up, the controller is in a power-up reset state. Refer to Clear Power Up Status for information about clearing the reset condition.

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:

  • This VI performs a direct read of the Communication Status Register (CSR) on the 73xx motion controllers. The CSR is a hardware register containing communication handshaking and error status bits. The NI-Motion software polls this register continuously when sending and receiving packets for handshaking and error checking purposes. Refer to your motion controller documentation for more information about low-level communication protocols and return data packets.
  • You also can call this VI at any time to check the communication and error status. Because the CSR is always up-to-date and directly accessible over the computer bus, executing this VI does not affect the operation of the NI motion controller.

NI SoftMotion Controller Considerations

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

  • If you are using the NI SoftMotion Controller, this VI reads the NI SoftMotion Controller engine service status.
    • Ready to Receive indicates if the NI SoftMotion Controller is running.
  • The NI SoftMotion Controller does not support the following CSR bits:
    • Command In Process
    • Packet Error
    • Hardware Fail
    • Ready to Send
    Note  Although the NI SoftMotion Controller does not support the Packet Error CSR bit, it uses this bit for the device shutdown state.