09-07-2017 06:37 PM
I added some code to log all CAN frames using a Frame In Stream XNET Session (I set Intf.BusErrToInStrm? and Intf.EchoTx? to True before the session was initialized to log transmitted frames). My environment is LabVIEW 2015 SP1 with XNET 16.1. In case the hardware used matters, it is a NI-9860 with the CAN HS/FD transceiver (TRC-8542, I believe). All communication with the DUT is currently CAN FD + BRS (with custom baud rates set in the database if it matters; this is ISO CAN FD, so CAN 2.0 and CAN FD without BRS traffic could also be present).
CAN reads correctly come in as "CAN FD+BRS Data" (24). However, echoed transmits report as "CAN Data" (0). I expect that they should also report as "CAN FD+BRS Data" (24).
Solved! Go to Solution.
09-08-2017 08:46 AM
This is a known issue and should be fixed in a future release.
01-22-2018 08:17 AM
Hello Orrt,
Could you please share your VIs? I am developing some Vis on CAN FD and I am getting only error frames. I could use your Vis to debug mine.
Thanks.
01-22-2018 10:35 AM
Hi sivamit,
I am not sure if I can share the VIs, but making a CAN log is fairly simple. You need to have a Frame Input Stream session running in parallel with the rest of your code - I would recommend starting this session after your existing sessions start to avoid interfering with any interface session properties. You will also need to set the following session properties before any sessions start (if you set the baud rate via property, that would be a good location):
Interface:Bus Error Frames to Input Stream -> True
Interface:Echo Transmit -> True
If you are OK with using the tdms format with raw frames (it will not be easily human-readable - you will need one of the example vis to read it), there is a built-in example you can use. In LabVIEW, go to Help -> Find Examples. You can then navigate (Browsing according to task) to Hardware Input and Output -> CAN -> NI-XNET -> Logging and Replay and open CAN Input Stream to TDMS Logfile.vi and Display TDMS Logfile as CAN Frames.vi. Note that the Display vi might work unpredictably if you use a value other than -1 for the number of frames to read, as CAN FD frames can vary in size.