LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stand-alone RT application

Solved!
Go to solution
Highlighted

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:

 

  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?
  2. Are network settings on my laptop possibly the problem? I'm connecting my laptop with the CompactRIO via a cross-over cable.
  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?
  4. Do I need to create a 'source distribution' first before I build my application?

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!

 

TomBu

0 Kudos
Message 1 of 7
(1,209 Views)
Highlighted

Hey Tom,

 

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.

 

 

Thanks,

Christian

 

0 Kudos
Message 2 of 7
(1,202 Views)
Highlighted

Hi Christian,

 

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.

 

Figure1.gif

 

Thank you,

 

TomBu

0 Kudos
Message 3 of 7
(1,199 Views)
Highlighted

Hey,

 

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.

 

 

Christian

0 Kudos
Message 4 of 7
(1,195 Views)
Highlighted

Hi Christian,

 

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:

 

  1. When I start the stand-alone executable on my laptop, the Runtime engine or whatever NI application is starting up can't find the file niriosrv.dll and I have to point to it manually.
  2. Building an Installer doesn't work either. (Do I have to include the NI-RIO module when building an installer for the communication with a CompactRIO? At any rate, that module is not installed in my LabView environment, but obviously the stand-alone application works on this computer.)

Anyway, I'll keep digging...

 

TomBu

 

 

0 Kudos
Message 5 of 7
(1,183 Views)
Highlighted
Solution
Accepted by topic author TomBu

Hey Tom,

 

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.

 

 

Thanks,

Christian

Message 6 of 7
(1,171 Views)
Highlighted

Hi Christian,

 

It looks like you've given me the critical hints - thank you very much for that!

 

  1. I wasn't aware that the NiRIO-driver had to be installed on the stand-alone computer; I thought the 'full' version of the NI Runtime Engine would do and that all required files would be packed into the executable and associated libraries automatically.
  2. I also wasn't aware of the need to change the IP addresses in the respective aliases files.

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!

 

TomBu

0 Kudos
Message 7 of 7
(1,150 Views)