LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Application builder - NI CAN Interface

Hello LabVIEWers,

 

I designed a Labview software that uses NI CAN Interface 9862. Now I need to build an application, with Application Builder, so that my software can run on other PCs.

 

When I test the application I built on other PC, the application runs but it doesnt recognize the .vi concerning the CAN communication. So the run-time engine isseems working but I cant get the .vi called in the application to be recognized. I think I am not including the correct dll or libraries.

 

I cannot find any documentation that specificly describes building application that use NI hardware.

 

Please any help would be precious

 

 

 

0 Kudos
Message 1 of 12
(3,711 Views)

Hi,

 

did you include the XNet driver in your installer build settings?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 12
(3,705 Views)

yes I included the hardware drivers.

 

The PC recognizes the new hardware and in addition when I open NI MAX on the PC with the run time engine, I can see messages going and coming on the CAN network.

 

 

0 Kudos
Message 3 of 12
(3,697 Views)

Hi loba,

 

the application runs but it doesnt recognize the .vi concerning the CAN communication

What do you mean by "recognize"? What is the error message?

Did you include CAN dbc files (or any other message/signal databases) with your application?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 12
(3,676 Views)

There is no error message, the application runs but it's not able to use the XNET read/write/create session etc blocks. So I cannot read/write CAN messages.

 

with dbc file you mean database? I didnt include any message database file in the application, I thought it was implicitly included. I'll try and let you know,

 

Thanks

0 Kudos
Message 5 of 12
(3,657 Views)

If you are using NI-CAN, you need to include NI-CAN in the installer build specification. If you are using NI-XNET (or parts of it), then you also need to include NI-XNET in your installer. 

 

What are you using it with? You might also need to include the CompactRIO/CompactDAQ drivers.

 

Depending on how you are loading/specifying the database - you will need to make sure that either the database exists on the target PC (look at the XNET database editor) or that the dbc file you are loading is present at the path you have specified.


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

Hi,

 

i am using X-NET, I'm including drivers and runtime engine in the installer.

 

I think I see the problem but I cannot explain it to my self...as I said, the issue is that when I export my application to an other PC, it doesnt read/write CAN messages. All the other functionalities are working fine, it has problem with X-NET vi.

 

What I have seen is that the output of the "Create XNET Session.vi" is: ___xnetSesn#00000001. This is on my PC where I have LabVIEW installed on.

When I build the application on other PC, the output is ___xnetSesn#00000000, and it wont read/write CAN messages. This is the only difference I could see between the working and not-working softwares.

 

What could it be?

0 Kudos
Message 7 of 12
(3,612 Views)

If I build an application that doesnt use XNET then everything works fine..

 

 

0 Kudos
Message 8 of 12
(3,601 Views)

Hi loba,

 

repeating our recommendations from messages above:

Did you include all files needed for XNet communication (driver, databases) with your app?

Are the databases found and loaded correctly by your app?

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 12
(3,588 Views)

Yeah I've made several XNet applications before so it is very possible.  What kind of error handling does your code have?  Do you know where the error is originating from?

 

Most of the time the issue is with configuration.  You are referencing a database by a particular alias or name, but that doesn't exist on the first run of the software.  You need to either include the XML database, and import it (manually or automatically) or create the new database from scratch (manually or automatically).  To better help you we need more information about where the error came from, what is the exact error, and probably code to understand what is happening, project and all.

0 Kudos
Message 10 of 12
(3,574 Views)