08-17-2010 06:55 AM
Hi all,
For my application, i would like to feed my LabWindows CVI Test program with data extracted from *.dbc file (created by another team under Vector CANdb++).
These files contains all CAN frame definition
and also some extra information added to :
Message level,
Signal level,
Network Level
These extra information are set by using specific ATTRIBUTE DEFINITIONS - FUNCTIONALITY under Vector CANdb++
The opening of the DataBase works under NI-XNET DataBase Editor as in LabWindows using: nxdbOpenDatabase ( ... )
No attribute seems be displayable under the NI-XNET DataBase Editor (it's not a problem for me)
Now, how, using the NI-XNET API and CVI, be able to extract these specially created attributes ?
Thanks in advance.
PS : In attached picture, a new attribute called Test_NI, connected to a message
08-18-2010
06:42 AM
- last edited on
08-18-2025
10:18 AM
by
Content Cleaner
Hi Damien,
To answer your question on whether the XNET API on LabWindows/CVI allows you to gain access to the custom attributes in a DBC file, this is not a supported feature. The DBC format is proprietary from Vector. Also, custom attributes are different for all customers and manufacturers. Those two put together make it really difficult for NI to access them with an API that will be standard and reliable.
We do support common customer attributes for cyclic frames. This is from page 4-278 in the XNET Hardware and Software Manual :
"If you are using a CANdb (.dbc) database, this property is an optional attribute in the file. If NI-XNET finds an attribute named GenMsgSendType, that attribute is the default value of this property. If the GenMsgSendType attribute begins with cyclic, this property's default value is Cyclic Data; otherwise, it is Event Data. If the CANdb file does not use the GenMsgSendType attribute, this property uses a default value of Event Data, which you can change in your application. "
Link to the manual : https://www.ni.com/docs/en-US/bundle/ni-xnet/page/user-manual-welcome.html
Could you explain us the goal of this attribute, and what you need it on your application.
Thanks,
Christophe S.
Account Manager East of France І Certified LabVIEW Associate Developer І National Instruments France
08-18-2010 12:06 PM
Hi Christophe,
Thanks for the repply.
About the reasons why we have chosen this implementation
My application :
Spy 40 microcontrollers exchanging data through a dual CAN bus (500 kbit/sec) -> by diggest and correlate some 'CAN signal' -> track hardware failure and anormal mode.
I have to feed the test bench with the *.dbc file, else, it's too difficult and time consuming to recopy (especially without error ) maybe more than 1000 messages and maybe more than 10 000 signals.
From this point, we decided to add extra data via specific attribute directely into the *.dbc file.
For example,
in the application,
we have a flag, applied on signal, to define if the current CAN signal have to be diggested by the test bench as a possible failure bit...
We defined an attribute : SIGNAL_USED_BY_TESTBENCH as an: Integer
and for each signal, set 0 or 1 into this attribute.
Another attribute: FAILURE_MESSAGE as STRING
and obviously, the string is filled with diagnostic information
etc etc...
Any idea welcome.
Thanks in advance.
Regards.