LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XNET - dynamic CAN frame database population

Hello,

 

I'm using NI-XNET CAN interface.

 

At the beginning of my application I need to import a file from which I get information about the CAN frames, e.g. Name, Identifier, Payload Lenght and so on. Then I need to feed this information into the "XNET Read/Write (Frame CAN)".

 

I cannot find much documentation on the web. Any useful link or ideas?

 

Thanks in advance

 

Loba

0 Kudos
Message 1 of 6
(3,317 Views)

@loba wrote:

Hello,

 

I'm using NI-XNET CAN interface.

 

At the beginning of my application I need to import a file from which I get information about the CAN frames, e.g. Name, Identifier, Payload Lenght and so on. Then I need to feed this information into the "XNET Read/Write (Frame CAN)".

 

I cannot find much documentation on the web. Any useful link or ideas?

 

Thanks in advance

 

Loba


Do you need to extract frame info from the database or you need to build the database starting from information contained in an another file?

0 Kudos
Message 2 of 6
(3,308 Views)

I need to create the database with the information contained in the file (baude rate, identifier, payload lenght etc). 

 

Then i'll feed the XNET Write/Read blocks with that database

0 Kudos
Message 3 of 6
(3,290 Views)

If you use one of the standard CAN database formats that XNET supports for the (e.g. CANdb), then you just need to load that file as an alias.

 

If you need to use a custom file format, you can build the database dynamically using the XNET nodes to create the clusters, frames and signals manually.

 

There are lots of examples built into LabVIEW - go to help -> find examples and type in 'xnet'.

 

These will help:

- Managing Local Databases

- Exploring Database with Tree

- CAN Dynamic Database Creation

- etc. etc.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 6
(3,279 Views)

Thanks, im looking at the  "CAN Dynamic Database Creation".

 

One thing I dont get..the "XNET Database Create.vi" requires a database as an input. Is the input database just a template, and then I set its properties (identifiers, names, baud rate etc) in the rest of the code. Am I getting this right?

0 Kudos
Message 5 of 6
(3,264 Views)
The database input is a reference to alias of the database - you can either reference an existing XNET database (by alias) to add/modify signals in it and load your files into that, or you can specify :memory: to create a temporary database in memory.

LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 6 of 6
(3,258 Views)