Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

RT-Exe is much slower than starting the application from LabVIEW

Hello,

 

I'm using LabVIEW 2010 and the cRIO 9073. I initialize most of the memory at the beginning of the application and then some measeurement loops run in parallel.

 

When I start the application from LabVIEW over the run button, the application starts quickly and works fine.

The same application compiled to a real-time exe starts very slowly. I takes about 2 Minutes till the measurement loops will be reached.

 

The application is too complex to attach it.

What could be the reasons for this behavior? I expected, that both versions run similar.

 

Regards

0 Kudos
Message 1 of 11
(4,817 Views)

One possibility is that the OS takes a long time to come up find, load all the drivers, find a network address, etc., before the actual RT EXE is started. In the case of running the VI from the dev environment the cRIO is already running and initialized. Have you measured the amount of time the RT EXE takes from the time it actually starts running (i.e.the beginning of the VI) until the measurment loops are running?

authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
0 Kudos
Message 2 of 11
(4,803 Views)

I'd like to get some more information about the delay you are experiencing.

 

When you have your start up executable, does it take 2 minutes after deploying and rebooting your controller to begin taking measurements? Do you have a front panel running for your RTEXE? How do you know it takes two minutes to take in data? Do you pass data to the host via shared variables?Once your program begins taking in measurements, does it do so in the correct amount of time or is the whole program running slower?

Stephanie A.
Americas Marketing Manager
National Instruments
0 Kudos
Message 3 of 11
(4,801 Views)

Hello,

 

thank you for the answers.

 

My RT-Exe does not have a front panel. I only communicate via TCP/IP (low level and network streams) with a host application and a PLC.

 

Now, the first thing I do is to switch on the user led at the start of my program. It takes 2 Minutes from pressing the reset button on the cRIO to the start of the application (= led turns on).

The application itself runs not slower after the delay of 2 minutes.

 

The time of the initialization I do is short (about 3 seconds = led turns off).

 

Yes it's possible that the OS loads the drivers during this time. But I don't think, that it takes so much time. I only installed the things I need (NI RIO, Network Configuration, VISA Server (only the one part which is needed for NI RIO) and a few other things. No Shared Variable Engine, no DSM driver, no Scan Engine support, ...

0 Kudos
Message 4 of 11
(4,793 Views)

Make sure you are not trying to resolve any domain names in your IP addresses

0 Kudos
Message 5 of 11
(4,787 Views)

As I wrote, the operations before the start of my application take 2 minutes.

In my application I use for example "TCP Connect" with an IP address. I don't know if the IP will be resolved, but that's not the problem, because my application does not run at this time.

0 Kudos
Message 6 of 11
(4,775 Views)

Is your gateway and dns server config set to 0.0.0.0 with static ip address?

0 Kudos
Message 7 of 11
(4,771 Views)

Where can I change these settings?

 

In the cRIO properties, I set a static IP address at the first option.

0 Kudos
Message 8 of 11
(4,754 Views)

"It takes 2 Minutes from pressing the reset button on the cRIO to the start of the application (= led turns on)."

 

If you are hitting the reset button, it is expected to take a bit longer for your entire program to get up and running. Pressing the Reset button resets the processor in the same manner as cycling power so your cRIO is rebooting itself, loading up your program and then starts to run.

 

To address your other question, in MAX, under remote systems you should see your cRIO. If you click on your cRIO, there is a Network Settings Tab. If you are setting your IP address to be static, you should be able to change your gateway and DNS Server address here. If you are setting up a static IP address, I would take a look at this KnowledgeBase article to make sure you are using a recommended address.

Stephanie A.
Americas Marketing Manager
National Instruments
0 Kudos
Message 9 of 11
(4,730 Views)

Thank you!

Then it seems to be normal, that it takes about 2 minutes till the start of the application.

0 Kudos
Message 10 of 11
(4,723 Views)