Reads the state of J1939 communication using an XNET session.
The session to read. This session is selected from the LabVIEW project or returned from XNET Create Session. The session must use a LIN interface.
Error conditions that occur before this node runs. The node responds to this input according to standard error behavior.
Default: No error
An output that is the same as session in, provided for use with subsequent nodes.
An output that returns a LabVIEW cluster containing the communication elements.
A parameter that specifies the J1939 PGN that occurred the last error. You cannot assign a PGN to every error.
A parameter that specifies the source address that occurred the last error. You cannot assign a source address to every error.
A parameter that specifies the destination address that occurred the last error. You cannot assign a destination address to every error or warning.
A parameter that indicates a transmit-related error occurred.
A parameter that indicates a receive-related error occurred.
A parameter that indicates that a fault occurred, and its code is available as fault code.
A parameter that returns a numeric code you can use to obtain a description of the fault. If fault? is false, the fault code is 0.
A fault is an error that occurs asynchronously to the NI-XNET nodes your application calls. The fault cause may be related to CAN communication, but it also can be related to XNET hardware, such as a fault in the onboard processor. Although faults are extremely rare, XNET Read (State J1939 Comm) provides a detection method distinct from the error out of NI-XNET nodes, yet easy to use alongside the common practice of checking the communication state.
To obtain a fault description, wire the fault code into the LabVIEW Simple Error Handler error code input and view the resulting message. You also can bundle the fault code into a LabVIEW error cluster as the code element and use front panel features to view the error description.
Error information. The node produces this output according to standard error behavior.
You can use XNET Read (State J1939 Comm) with any XNET session mode, as long as the session interface is CAN. Because the state reflects the CAN interface, it can apply to multiple sessions.
Your application can use XNET Read (State J1939 Comm) to check for problems on the J1939 network independently from other aspects of your application. For example, you intentionally may introduce noise into the CAN cables to test how your ECU behaves under these conditions. When you do this, you do not want the error out of NI-XNET nodes to return errors, because this may cause your application to stop. Your application can use XNET Read (State J1939 Comm) to read the J1939 network state quickly as data, so it does not introduce errors into the flow of your LabVIEW nodes.
Where This Node Can Run:
Desktop OS: Windows