LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Compiling a DLL in CVI for use in LabVIEW that dynamically allocates memory


ColeTrain wrote:

Hey KavehV.

 

I did some asking around here and did not come up with anything solid.  Could you offer a few more details on what these custom attributes are that you're refferring to? Are you thinking just free fields that aren't neccessairly tied to any specific message/frame? More along the lines of a traditional database type file?


I'll do you one better.  Here are the lines in the DBC that I'd like access to through the API:

 

 

BA_DEF_ "NetworkName" STRING ;

BA_DEF_ "BusType" STRING ;

BA_DEF_DEF_ "NetworkName" "";

BA_DEF_DEF_ "BusType" "CAN";

 

 

BA_ "BusType" "CAN";
BA_ "NetworkName" "PT";

 

They're defined in any DBC editor as "custom attributes" (we're using Vector's CANdb++ to generate these).  For your XNET api, it should be a simple matter of coming across anything that's a custom attribute and treating it as a key/value pair.  Give APIs for a listing of custom attributes, if a "key" exists, and retreiving the value for that "key".  It should be simple to do with the hash table libraries already available in toolbox.h (disregarding RT compatibility, which is a problem with toolbox.h).  I would do it, but I don't have access to modify XNET source code, so it's something NI is going to have to provide.

 

 

Message Edited by KavehV on 05-18-2010 11:28 AM
0 Kudos
Message 11 of 12
(994 Views)

Kaveh,

 

I realize this thread has gotten old now, but I was recently experimenting with DBC files, attributes, and value tables, and I came across your thread.  I'm not sure how long it has been available, but there is a VI in the LabVIEW XNET API called "XNET Database Get DBC Attribute.vi".  This VI has a couple of different modes, but one of them seems to allow you to read the attributes and values from a DBC file for a cluster, frame, signal, or ECU.  In your example, it seems to successfully find the BusType and NetworkName and their values when I search within the "cluster" object.

 

Obviously, this functionality may or may not be available in CVI.

 

Some other notes:

-the Help states that only one "Mode" is available, but I have had success using all of the modes.

-I had some trouble with value tables associated with multiplexor/multiplexed signals, but R&D seems to have fixed the bug (NI Support Reference # 7330655)

 

Karsten

0 Kudos
Message 12 of 12
(815 Views)