XNET Wait for J1939 Signal Single-Point Session

Updated Jun 27, 2018

Reported In

Driver

  • NI-XNET

Issue Details

  • Is there an XNET wait for transmit complete function that works with Signal Single-Point sessions?
  • What signals the XNET Write function has completed (not just loading the buffer with data to be sent, but that the data was actually sent, and it's ok to then clear the output session?

Solution

Calling XNET clear immediately after a XNET write introduces a race condition. Normally the frame will be transferred to the hardware before the clear command is, however, the frame may not immediately go out on the bus where the clear will begin to execute on the firmware as soon as it is received.

For frame sessions, the XNET Wait (Transmit Complete).vi explicitly waits for confirmation of a frame going out on the bus but we don't offer this functionality for J1939 frames or signal sessions.
  • The J1939 frame is broken up into 4 normal CAN frames and if the session is cleared after the first frame, the receiver will ignore the data. The XNET wait is tricky too if used in this case because the J1939 is a multiframe message.
One possible solution for this is to use a wait function after the XNET write and using the NI-XNET Bus Monitor to see the exact time needed for transmission and hard set a wait time. 
 

Additional Information

Another workaround is using trigger signal capability for the Signal Input Single-Point Mode (but this is only valid on input). With this, you could potentially create an input session in parallel to the output session, configure the echo transmit property to true, and then configure the trigger signal to monitor when the value is updated. 

WAS THIS ARTICLE HELPFUL?

Not Helpful