02-02-2016 04:45 AM
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
02-02-2016 04:51 AM
02-02-2016 04:59 AM
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.
02-02-2016 05:46 AM
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?
02-02-2016 06:36 AM
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
02-02-2016 06:53 AM - edited 02-02-2016 06:55 AM
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.
02-04-2016 06:23 AM
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?
02-04-2016 06:34 AM
If I build an application that doesnt use XNET then everything works fine..
02-04-2016 07:27 AM - edited 02-04-2016 07:27 AM
02-04-2016 11:24 AM - edited 02-04-2016 11:24 AM
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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord