From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Remote front panel: loading VI into controller memory

Hi everyone,
 
I am currently using LabVIEW 7.1 and need some expert help.
 
I have a VI (which also include more than 80 sub VIs) that controls a system through compact Field Point module controllers. Currently, all these VIs are stored in a server computer.
 
At this stage, I am capable of creating a remote front panel, which allows me to control the system from a client computer other than the server computer. Instead of using the server computer to control the system, I would really rather to use my field point controller to do the job, and I have the following questions:
 
1. In the server computer, VI can be loaded to memory by opening the VI, how do you do it if you were to use the cFP-2015 controller as a server?
 
2. I created a "startup.exe" and the "htm" files for my program and stored them in my controller and set it to launch application at boot-up. For once, I can access to my controller from the web. But once I close my browser, and re-access the web, the memory in my controller seems to be lost and I got an error message saying VI was not loaded in server memory. Is it possible to store the VI in the memory of my controller for a long time??
 
Many many thanks in advance.
 
 
Tak
0 Kudos
Message 1 of 9
(3,535 Views)

Hello Tak.

"For once, I can access to my controller from the web. But once I close my browser, and re-access the web, the memory in my controller seems to be lost and I got an error message saying VI was not loaded in server memory." This sounds as if you were exiting your application using the browser. Are you sure that your application on the FieldPoint-Controller is still executing and in memory after you closed your browser? You should check this by adding some code to your application that flashes one of the cFP-LEDs as long as your application runs.  
When your application exits, all VIs are removed from memory and this would match your error description.

"For once, I can access to my controller from the web." I did not understand what this means exactly.
Does this mean that you see the remote panel in your browser correctly after a (re)start of the FieldPoint-Controller?

BR, Guenter

Message 2 of 9
(3,530 Views)
Hello Guenter,
 
Thanks for your explanation. I think your description match very well with my observation. Your suggestion of flashing the LED while my program is running is a good idea.
 
 
Sorry that I didn't describe what happend well enough, here is what happened to me.
 
I embedded the program which simply turn on and off one of the LED on my cFP controller for 20 times.
I re-boot my controller and wait some time, I then see the LED turns on and off.
Before my program finish, I can access to my remote front panel page for multiple times even after I closed my browser while the program is still running.
If I request control over the controller, I can manually stop the program, and then re-start it.
However, after I re-start the program remotely, if I closed the browser even while the program is still running. The program stops as soon as the browser is closed. When I re-open my browser, it says the requested VI is not loaded in the memory on the server computer.
 
 
So, correct me if I am wrong, it sounds like embedding my program as exe file, download to my controller, and set it to launch the application at boot-up is the only way to load the VI into controller's memory. Is there any other way?
 
 
So, having said that, I have to re-boot my controller every time when I want to start my application file that is sitting in my controller, is that correct?
 
 
Many thanks again.
 
 
Tak
0 Kudos
Message 3 of 9
(3,519 Views)

Hello Kai.

If I understand correctly you you the main-VI of your application as a remote panel and access it through a web browser. You stop the VI (e.g. by applying the "abort"-button) and start it again.

Why are you doing so on a RT system? These systems are expected to power up and run until they are powered down.

To reconfigure aspects of your application you could use a sub-VI as a remote panel. Place all of the configuration controls on this panel and configure your RT system at run time.
This is smarter than starting and stopping the main-VI    and   easily circumvents your "VI loss". 

BR, Guenter

0 Kudos
Message 4 of 9
(3,512 Views)

Hi Guenter,

Under normal condition, we do want the system to start and then just carry out the entire experiment until the end of it. However, we also afraid if something go wrong during the middle of the experiment and we would like to find a way to take over the control and stop the experiment within a short time.

Your suggestion about creating a sub VI and it to start and stop the main VI is interesting. I have to think about how to do it with the setup of my current program. But thank you very much for your suggestion.

 

tak

0 Kudos
Message 5 of 9
(3,500 Views)

Hi tak,

to avoid any missunderstanding: I did not mean that you should stop and start the main-VI. Run the main-VI (mode: forever) and tell it what to do. Or in other words: Create an application that runs forever and tell it (e.g. via the network) what to do.

BR, Guenter

0 Kudos
Message 6 of 9
(3,488 Views)

Hi Guenter,

I think this idea to have the main VI to run forever would be a great suggestion. However, I have to think about whether it is possible for my program due to its nature...

My application is a bit more complicated. I will tell you more about our experiment, maybe you can come up some great idea for me. Basically, we are trying to extract CO2 gas from the atmosphere and put them into a small glass tube and seal it. The entire experiment consists of 8 identical runs, and each run lasts about an hour. During the experiment, we want the system to run from start to finish without stopping. Initially, we are running this on a computer, however, we can not guarantee the computer won't freeze in the middle of the experiment. That's why we take the approach of embedding it to the controller and let it run until completion.

However, after the 8th run, we do want the system to stop because there are some maintenance work we have to do manually. After that, we would then want the system to re-start the entire process again and let it run to stop until another 8 runs are completed.

 

Having said that, the ideal solution for me would be able to store these VIs or the application in the controller memory. Then, I can remotely tell the controller to start whenver I want it to or stop, if it is needed.

 

tak

 

0 Kudos
Message 7 of 9
(3,479 Views)

Hello tak,

what you describe is a typical engineering application and there is no need to worry about the different states your software must consider. As I take from your words, a "state machine" should be an appropriate framework for your application.

You can search for articles dealing with state machines e.g. on the NI web page. Some of them especially focus on LabVIEW.

LabVIEW ships with several Framworks as starting points for application. There are also state machines available. Furthermore, many of the examples shipped with LabVIEW behave like state machines.

BR, Guenter

0 Kudos
Message 8 of 9
(3,463 Views)
Hi Guenter,

Thanks for your suggestion. I will look more into this state machine. Thanks.

tak
0 Kudos
Message 9 of 9
(3,438 Views)