09-15-2014 01:50 AM
Hello all,
Please let me know if anyone knows about this.
Currently I’m using XNET Convert.vi to convert CAN Frames to Physical values. Here, everything is working fine.
As per NI XNET user manual, if CAN Frames are not present for selected Signals then it will displays “Default value” (from DBC File).
But, It could be more helpful, if we can display NULL/NaN (Instead of Default Value).
Because, some CAN signals will output only zero/one (High/Low) so,
For example:
Case-1: If CAN Frames is present --- > Output value : “0” (as per Signal Data)
Case-2: If CAN Frame is not present -- > Output value: “0” (Default Data)
In case-1 & case-2 displaying same value so, we will get confuse.
we have to differentiate both.
Please check this sample code and DBC File:
Here,
09-15-2014 07:47 AM - edited 09-15-2014 07:48 AM
I totally agree, which is why I went and wrote a LVClass wrapper around the conversion routine, which defaults values to NaN if the frame that signal is associated with isn't seen. It isn't too hard just find for all signals, the arbIDs of the frames they belong to. Then after doing the conversion if that frame doesn't exist, replace the value with NaN.
EDIT: Oh and do you need to do the conversion your self? Can you just read signals as XY? Then you get the value of the signal, and the time it was seen.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-15-2014 09:48 AM
Dear Hoovahh,
Thanks for your reply.
Yes, If NI XNET is not working for this then we need do some workground (like you told). I'm also thinking same way, in Array of CAN frames we need to find where Signal ID is matching (Index value) for each Signal then need to replace with NaN.
.................................................................................
EDIT: Oh and do you need to do the conversion your self? Can you just read signals as XY? Then you get the value of the signal, and the time it was seen.
..................................................................................
Yes, I'm doing by my self. I'm converting all Vector files to Physical values. I'm simply displaying Time & Corsponding values. If Signal value is not present then taking prevoius value.