11-07-2018 09:58 AM - edited 11-07-2018 10:03 AM
Hello,
I'm using the XNET CAN Input Waveform session to collect data. The problem is that, if the DUT is disconnected, the last values are still reported by XNET Read. I want to see 'NaN' instead. I learned about the trigger signals for Single-Point sessions.
http://zone.ni.com/reference/en-XX/help/372841N-01/nixnet/modesignalinputsinglepoint/
What would be the best option for Waveform sessions? I want to avoid changing the session type because a large chunk of the code is based on the Waveform session. It is very convenient to use the Waveform session apart from the stale data detection issue.
I tried opening both Signal Input Waveform and Single-Point sessions but it throws an error (-1074384883) complaining that I tried to open the same frame twice. I tried creating a duplicate CAN database (cluster) in :memory: and initialized the Single-Point session for trigger signals using that temporary database. It didn't help.
Any tips will be appreciated!
11-07-2018 11:27 AM
It seems I better use the Signal Input XY mode that gives you real timestamps for each data point. In that way, I still don't have to loop so much like for Single-Point. I just need to convert XY data into Waveform data with reasonably altered timestamps to keep using the existing code.