LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to programmatically load an XNET database in LabVIEW Real-Time

Solved!
Go to solution

I checked the forums for this topic but didn't find a match...close, but not the same.

 

I wrote code for Windows to load a CAN .dbc file and do what I needed to do.  I now need to use the same code in LabVIEW RT (cRIO Linux) but it doesn't look like I can load the .dbc file directly...I have to deploy it, then reference the alias for 'XNET Database Create (Cluster).vi"...the rest of my code works fine from there.

 

I'd like to skip the hassle of deploying the .dbc database for each cRIO system (I know I can write code to deploy the database; BTW, the same undeploy/deploy vis are not supported in RT)....deploying the .dbc file with the executable (then loaded on RT) is preferred since the procedure is simple and doesn't require any additional code.

 

Thanks,

 

Todd

0 Kudos
Message 1 of 5
(3,817 Views)
Solution
Accepted by topic author labviewman

AFAIK there still no way to directly load an new CAN or LIN database on a Linux cRIO with XNET. There's no other way than to either deploy the database from your PC (even programmatically) or creating an image of your cRIO with the RAD (Replication and Deployment) Utility and copying that to your next target. In my experience that works too.

 

Perhaps it's also a good idea to vote for this idea.

 

Regards, Jens

Kudos are welcome...
0 Kudos
Message 2 of 5
(3,790 Views)

Thanks Jens, that is what I thought.

 

I'll write code to create a pre-processed cfg file for the RT code to load which is used to create all the messages and signals used in the data collection. Code will be called before the build is started (as configured in the "Pre/Post Build Actions" of the Build Spec).

 

Granted, I am loading a large database where I load all messages (1,321) and signals (6,485)...I just want to see how long it takes and will cut it down significantly once my customer decides what to do, which is 1.5 minutes on RT (dual core 1.33 GHz) and 15 seconds on a PC.

 

Thanks Again,

 

Todd

0 Kudos
Message 3 of 5
(3,777 Views)

Try this with Xnet API in RT code.

 

0 Kudos
Message 4 of 5
(3,464 Views)

XNET Database Add Alias.vi

 

"This VI is supported on Windows only. For LabVIEW RT, you can pass the new alias to the XNET Database Deploy VI to transfer an optimized binary image of the database to the LabVIEW RT target. After deploying the database, you can use the alias name in any VI for the Windows host and the LabVIEW RT target."

 

http://zone.ni.com/reference/en-XX/help/372841W-01/nixnet/xnetdatabaseaddaliasvi/

0 Kudos
Message 5 of 5
(2,702 Views)