LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN Read telemetry using XNET

I'm trying to move from the old CAN driver to the XNET driver. It work well to transmit command frames but so far I'm unable to read a telemetry frame, I attached pictures of the expected result (that I get using the old CAN driver) and of what I get using the XNET driver.

 

And of course I attached the code I'm trying to get working. One strange thing is that the REQ_ID is not inserted in the transmit frame (as seen using I/O Trace) but even when I'm forcing it using bundle by name to the XNET Write vi I'm not reading the telemetry as expected. I'm using the same code (the transmit part) to send commands and it works.

 

Any idea of what I can try?

 

Thanks,

 

Ben64 

0 Kudos
Message 1 of 2
(2,314 Views)

Depending on your timing, the remote device may have:

1. Already sent the response before you started your input session.

2. Not responded yet

 

If the problem is (1), try creating and starting both sessions before you write the data.

If the problem is (2), try using a queued session instead of a single point session and actually wait for the frame to arrive.

 

I actually recommend implementing both solutions - create the sessions first and create the input as a queued session. Then, do a read with a timeout to actually get the response.

0 Kudos
Message 2 of 2
(2,297 Views)