Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Deploy Database to Local System

Is there any way to deploy an XNET database (ldf or dbc or xml) to a local system? For executables, it seems the only way to get the system to recognize the database alias is to install the entire LabVIEW IDE and 'browse for database' on the database constant drop-down... OR, if you change the location of the database on your local drive, you must do this AGAIN. Is there any way to dynamically deploy databases from a filepath with recognizeable aliases? I see theres a 'deploy' function, but it says thats for RT targets... Does something similar exist for local computer?

Dan Haugen
Certified LabVIEW Developer
CLD Instructor
0 Kudos
Message 1 of 7
(3,471 Views)

You don't need the full IDE, but you do need XNet to be installed, but I think you need more than just the runtime install for some functionality.  When the full XNet is installed you will have the Database Editor in your start menu.  Now various functions like Add Alias (from the palette) will work within your EXE and can select a DBC file then use that added database.  When you are building an installer for your application, under the Additional Installers, Only display runtime installers, and select XNet (not the runtime) to include in your installer.  Now when you install it everything required should come along too.  Otherwise you can do 

0 Kudos
Message 2 of 7
(3,456 Views)

The XNET API does not like adding aliases at runtime... Ive tried to 'add alias', that is, add a database alias into memory, and then edit the frames contained in that database's cluster (assuming just 1 cluster) via frame property node, but get an error shot back at me (out of the frame property node) saying 'the alias is empty or incorrect. Please select an alias'. If I select the database alias through the database constant drop-down before-hand, it plays very nicely with the frames property node.

Dan Haugen
Certified LabVIEW Developer
CLD Instructor
0 Kudos
Message 3 of 7
(3,452 Views)

I've deployed applications to many computers without the LabVIEW IDE which allow a user to select a DBC file from disk, which adds the alias, gives it a unique name, and then allows the operator to select signals to read and write.  I assure you this is possible.  Lets see some code, or the errors you were seeing.

0 Kudos
Message 4 of 7
(3,446 Views)

"Error -1074384560 occurred at Property Node (arg 1) in CAN.lvclass:Read CAN Configuration.vi->CAN.lvclass:Start CAN.vi
Property: DefaultPayload

Possible reason(s):

NI-XNET: (Hex 0xBFF63150) Alias name passed to a function is not defined. Solution: Define the alias before calling the function."

 

 image.png

...

image.png

when I pass one of the frames loaded from this database to the property node here, it throws the above error.

Do I have to also explicitly add the database alias into local memory via the path, and also all the frames inside the database?

Dan Haugen
Certified LabVIEW Developer
CLD Instructor
0 Kudos
Message 5 of 7
(3,443 Views)

@dhaugen92 wrote:

 

Do I have to also explicitly add the database alias into local memory via the path, and also all the frames inside the database?


You add the database using the "XNet Database Add Alias.vi" that I referred to earlier found on the palette.  You give an alias string name to be used as the database name, and the path to a DBC.  From that point on you refer to the database by the string name you provided.

0 Kudos
Message 6 of 7
(3,428 Views)

How do I refer to the database as the string? The output to the 'add alias' doesnt output the xnet database.. how do i get the actual string/xnet database data type on the block diagram once I've added the alias?

Dan Haugen
Certified LabVIEW Developer
CLD Instructor
0 Kudos
Message 7 of 7
(3,415 Views)