LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to open front panel of a VI running in RT.

Hi,
 
I have an application to read the encoder position using the cRIO program. I have made an executable and this application runs as startup application whenever the controller reboots. Right now, i am accessing the VI of the startup exe through Remote Panel connection. This works fine but everytime i close the remote panel , i have to reboot the controller for the next view.
 
So is there any alterntaive to open the front panel of the VI.
I tried using VIServer but ran into errors. (i tried using front panel -open property node.did not work)
Also i do not have any VIs stored on the controller. Only the exe is stored on the ni-rt/startup folder on the RT controller.
Please let me know how to open this VI.
 
Thanks.
0 Kudos
Message 1 of 6
(3,710 Views)

Hi,

You could use shared variables to write the data on the controller and then write a VI that reads from these shared variables on a Windows computer.

http://zone.ni.com/devzone/cda/tut/p/id/4679

KostasB

NIUK Applications Engineering

0 Kudos
Message 2 of 6
(3,706 Views)
Hi
 
Thanks for the info .I will use shared variables in next version of my program,
Right now, i do not want to change the current  application. I am opening the front panel of the top level VI thru Remote Panel connection.
I can see the VI front panel running. There is no problem. But , When I close and agian run the remote panel connection to the VI, I get the error as "Requested VI is not loaded into memory on the Server Computer".
 
How to get over this error. I have disable the firewall connection also
 
Thank you.
0 Kudos
Message 3 of 6
(3,655 Views)

Please post an image of how you are accessing the RT app.

Either the VI is still running and your attempt to re-run a running VI is the issue, or the target VI is leaving memory when you disconnect after the fisrt try.

An image of your code will help us help you.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 6
(3,647 Views)

Hi Ben,

When i close the remote front panel the first time, i am terminating the RT VI which is running on startup.

So i had to reboot everytime to access the remote VI.  I guess that the VI (exe) should be continuosly running when the RT is started up. The remote panel only should be opened and closed. After I close the remote panel , i want a windows VI to be opened up.

I have a Windows VI which programmatically opens connection to the RT server for opening the remote panel. The VI runs. When the user clicks Exit on this RT VI, the VI running is stopped and then another windows VI opens up. This works fine for first time. Since the RT VI is terminated, second time , if I run, it says, VI not in server memory.

Is there a method to close the remote panel programmatically in the RT VI itself. I have a Exit button in this RT VI, so if the user clicks, Exit, the program has to be running, but the remote panel has to close. There is a method called close connection to client , but this does not work in RT , as this requires VI path.. Right now , when the remote panel RT VI is launced, to close the remote panel, i click on the 'close' button on the VI title bar. Again when the remote panel is launched, there is no error. but is there a method to close the remote panel in the server(RT VI itself).   i have attached the VI.

Thank you.

 

0 Kudos
Message 5 of 6
(3,623 Views)
Hi Hema,

I did some quick research, and found a few articles which might interest you in our knowledge base.

How Do I Create a Remote Front Panel for Use on a Real-Time Target Executable?

VI Stops Running on Real-Time Target After Restarting the VI and Closing or Refreshing the Remote Re...

The first article provides a general method for using remote front panels on a real-time controller. Pay particular attention to the first note at the bottom of the article:

"Note: Your executable must be running so that you can connect to it via Remote Front Panels. If you stop your executable, your Remote Front Panel will immediately disappear. Once you stop your executable it is no longer in memory. To reconnect via Remote Front Panels you will have to reboot your RT controller to make sure your startup executable is in running mode again."

So the behavior you are seeing with your remote front panel is normal for the real-time operating system.

The second article goes into more detail on this condition, and mentions a possible workaround.
Asa Kirby
CompactRIO Product Marketing Manager
________________
Sail Fast!
Message 6 of 6
(3,604 Views)