09-28-2023 03:05 AM
Hello,
I am working with the NI-XNET to import a .dbc file and get information from it with the XNET Databse Get DBC Attributes vi (Frame). Besides the standard attributes such as frame name, DLC, ID, comment, the .dbc files I use contains a few custom attributes for example 'category' where a number is assigned to each frame. I can not find those attributes in the XNET Frame node nor in the database editor. Is there a way to include the mentioned informations?
Thank you very much for your support
Solved! Go to Solution.
09-28-2023 07:46 AM
To access these types of things you need to do it through the database, and various property nodes. The easiest way is to open the XNet Database Editor, and then import a DBC, or make one the frames and signals.
Then look at the Database subpalette, it will have all of the things you need to pull that information from the database. Start by dropping the XNet Database property node, and wire a constant that is the name of the database you want to read. Read the Clusters, which is an array. In almost all cases there will only be one Cluster so index out the first element, then wire that to a Cluster Property node. From there you can read an array of frames, each of which has an array of signals under it. All the information you should be looking for is found using that technique.
I should probably make a blog post about this actually.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-28-2023 08:12 AM - edited 09-28-2023 08:21 AM
Hi Hooovahh.
Thanks a lot for you input. I will give it a try and I am looking forward to reading your blog post about this topic.
Best regards
09-29-2023 03:30 AM
Hello everybody,
I tried the approach Hooovahh suggested but unfortunately it did not work for me. There is a broken arrow saying property node contains unwired or bad terminal after the cluster is wired to the cluster property. Here I include the dummy .dbc file with that custom attribute mentioned above. I can see the attribute in vector candb ++ editor but not in the ni xnet database editor. Hope somebody has an idea how to get the attribute.
Thank you very much
09-29-2023 06:22 AM
XNET Database Editor doesn't support DBC attributes.
In XNET API you can read it like this:
09-29-2023 06:28 AM
You can find the VI (Get DBC Attr) in the Database subpalette:
09-29-2023 07:04 AM
Thank you very much!!!
10-16-2023 07:58 AM
@myk91 wrote:
Thanks a lot for you input. I will give it a try and I am looking forward to reading your blog post about this topic.
I know your issue was already resolved here, but I wanted to give an update that I did make a new CAN blog post on the XNet Database stuff, it is Part 16 here.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord