From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
12-19-2019 03:03 AM
Hello everyone,
I am trying to understand the communication flow of the XNET plugin for LV. I created a databse with two frames
After reading the bus using 'Frame CAN' I trying to decode the frame according to their signals (see picture). How does LV choose which frame to decode? The frame array holds 2 frames and only the last entry will be analyzed. And even this entry is decoded wrong, since only the second signal ('xxx') has the correct value. The signal 'Pre' is always '0,00'.
How can I decode all read frames efficiently?
My idea is to loop over the 'Dataframe' cluster and check for each signal (in a nested loop). But this is not the best solution since the CAN controller can decode this information much faster than the nested loops in LV.
12-22-2019 06:39 AM
You will have a better chance getting a hint if you post XNET related issues on the Automotive and Embedded Networks board.
01-07-2020 06:19 AM
Sorry for the late reply -> Holidays.
Thanks for the tip
01-07-2020 08:59 AM
So XNet has the ability to do the converting and the reading on the hardware. There are several shipped examples that show how to do this. I wrote a series of CAN Blog posts over here, with a few posts focusing on XNet and the various session types it supports. If you do want to read the raw frame values and do the conversion you can use the XNet API which will do the conversion in software calling external libraries, or you might want to look into my custom API completely written in G. It's faster, gives you more control, and can be used with non-XNet hardware. But if you do have XNet hardware it is probably best to have the conversion done on the hardware using the Signal session type.
You probably want Signal In Single Point which will just return to you the value of the signals in the scaled engineering units defined in the database. Oh and there are several examples in Help >> Find Examples if you search for XNet. And in the future as LucianM said the other forum is probably a better place for XNet related questions in the future.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord