Dear LabView community,
I've finally managed to create an executable that incorporates a VI on PC level and a RT target (CompactRIO). However, the executable only works on the computer with the LabView environment installed, but not on a labtop with only the NI Runtime Engine installed. Only the VI on PC level seems to work on that laptop. Being not very versed in all this I'm asking myself a lot of questions:
I suppose the variety of these questions pretty much reflects how lost I am in the dark. Any ideas and suggestions which bring a little light in the dark would be most appreciated. By the way, I'm using LabView 8.5 on Windows XP. Thank you!
Solved! Go to Solution.
Since there are different ways to use a cRIO which of the following setup do you have:
- Host Executable communicating via ethernet (TCP, UDP, SVE, ..) to a Realtime Executable interfacing the FPGA bifile.
- Host Executable directly interfaceing the FPGA bitfile.
- Host Executable communicating via ethernet to a Realtime vi, interfacing the FPGA bitfile
It pretty much depends on this setup what answers you will get to 1-4.
Thank you very much for your reply. To answer your question, I'd say the latter. To be on the safe side, though, I'd like to describe my setup in my own words: The executable (basically a data acquistion programme to read in sensor data) that I'd like to create is going to run on a laptop with only the NI Runtime engine installed. The laptop is connected via ethernet to a CompactRIO which, in turn, communicates with the FPGA that my sensors are connected to via the modules. I've created three VIs (PC level, CompactRIO, and FPGA) in LabView - see Figure. I hope this makes sense.
Please find my answers in bold below.
1. Did I make a mistake when building my application (executable) by specifying wrong directories? For example, should libraries be included in the *.rtexe or 'same as caller' or support directory?
I didn't see an executable in your project, neither at the Windows site nor at the realtime site. When creating an executable there are some things to consider, like the appearence, how you stop it (exit), path's and for sure dependencies like dynamic called VIs or other files. If you don't have dynamic files to load, there is nothing special to include.
When using shared variables for the network communication between the Windows .exe and the .rtexe you need to edit the aliases file which is getting created along with the .exe.
2. Are network settings on my laptop possibly the problem? I'm connecting my laptop with the CompactRIO via a cross-over cable.
I still don't know the exact problem, just that something doesn't work as it should. But compare the IP settings with your development machine where the setup seem to work. Check the aliases file when you're using shared variables. You might wan't do remote debugging of the executable if you don't get any errors explaining what's going on.
3. Is the NI Runtime engine which is installed on my laptop the problem? It's supposed to be the 'full version' but maybe I need a NI-RIO module?
The runtime engine must be of the exactly same version like the one of your development machine. If you just do ethernet communication with the .rtexe you don't need to have something else to be installed.
4. Do I need to create a 'source distribution' first before I build my application?
No. Source Distribution is used to pass you project's source files to other developers, or to save all the contents as a backup, or to port them to another machine.
Thanky you very much again for your comments and suggestions.
I probably took the screenshot before I built my applications. I definitely have created an application on PC level and one for the CompactRIO.
Good advice on the aliases file! I wasn't aware of that at all, and since I do use shared variables I have to take care of this. However, having changed the IP address of the host computer (my laptop in this case) in the startup.aliases file still leaves my PC level application dead, meaning the front panel opens but there is no data transfer from the CompactRIO/FPGA.
At least I can exclude Source Distribution from my list of possibilities - thank you very much for the clarification!
There are a few things that I've noticed and that make me suspicious:
Anyway, I'll keep digging...
From the last two points you mentioned it seems that you are interfacing the FPGA directly from the host VI, so the executable running on Windows.
The component it is searching for (NiRioSrv.dll) is part of NI RIO driver. I thought you just do Shared Variable communication?
Btw, here is a KB talking about the error you see.
It looks like you've given me the critical hints - thank you very much for that!
I still have to sort out a few IP address and subnet mask issues (I still haven't figured out how to get the CompactRIO working on two different subnets using a cross-over ethernet cable without having to reconfigure it each time I swap over), however, this should be pretty much straight forward from here on. Thank you very much again!