Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

NI XNET database editor missing custom frame attributes

Solved!
Go to solution

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 

0 Kudos
Message 1 of 8
(1,778 Views)

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.

Message 2 of 8
(1,733 Views)

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

0 Kudos
Message 3 of 8
(1,720 Views)

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 

vector.PNG

ni-xnet.PNG

ni-xnet-bsp.png

0 Kudos
Message 4 of 8
(1,696 Views)
Solution
Accepted by topic author myk91

XNET Database Editor doesn't support DBC attributes.

In XNET API you can read it like this:

WaldemarM_0-1695986480103.png

 

Message 5 of 8
(1,688 Views)
Solution
Accepted by topic author myk91

You can find the VI (Get DBC Attr) in the Database subpalette:

 

WaldemarM_0-1695986774346.png

 

 

Message 6 of 8
(1,686 Views)

Thank you very much!!!

0 Kudos
Message 7 of 8
(1,679 Views)

@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.

Message 8 of 8
(1,484 Views)