10-22-2009 12:46 PM
Hello
I have a main program where i have event structure and 2 state machines which do DAQ and Video. in a different project i have a pid controlled heater program that will be deployed on compactRIO. how do i program the main VI to auto deploy the heater program to target and get values from there to the main program. (for graph values can i use global varible between realtime program and normal main program)
I am thinking if i use the shared variable that is update by AI of a module on Compactrio in the main program, will it auto deploy it detecting that shared variables belong to target, but i want only the heater part of the program to get deployed not the event strucute, statemachines on the mian program. please help
If i can put a button on main program that when clicked can pop-up the heater program on compact RIO to adjust the PID parameters and close it and run with new values. is this possible?
Thanks in advance
10-22-2009 01:54 PM
Hey,
There is no way to programmatically deploy a VI to a cRIO.
But, you could use the Internet Toolkit to download the VI (and all its dependencies) via ftp to the cRIO and VI Server Functions to run the VI there and exchange the necessary data. However this isn't really a good solution.
I would suggest you to build up your Application that you have your Host.vi as well as the RT.vi running all the time and you just read/write the data from/to the RT.vi when you need it.
Christian
04-05-2010 02:46 PM
How would you go about running a VI that is saved on a cRIO?
Thanks,
Pablo
04-06-2010 01:05 PM - edited 04-06-2010 01:07 PM
Hi freemason,
I'm still a bit unclear on what you need. If you are able to develop your project such that all the VIs are located in thier respective locations (i.e. on the cRIO, RT or Windows Host), and you just want to change controls before running the FPGA vi, we can do that. Essentially, you use a read/write control VI before running the FPGA VI using the Run invoke node. You'll have to make sure to change the FPGA open reference options to not run the VI automatically (right click on it and select "Configure Open FPGA VI Reference...", uncheck the run option).
If you want to look at an example involving PID in the LabVIEW example finder, one that might be of particular interest is called "Template Multichannel PID". You can find this in through Help>Find Examples. Navigate to Hardware Input and Output>CompactRIO>FPGA Fundamentals>Analysis and Control.
You can use the execution of your host VI to start and stop the FPGA vi using the Read/Write Control VI and the Run invoke node. Also, you can use an invoke node to Abort the VI if that is necessary, but creating a stop control in the FPGA VI that allows the Host VI to stop using programming flow is usually more desirable.
I hope these suggestions help, but please clarify your question if you're still confused.
Also, Pablo. Try setting the VI to run as a start up application. A guide of how to do that is here.
04-06-2010 05:37 PM
Hi Verne,
The instructions you gave me are good for a FPGA vi, but the one I'm talking about is not such a vi. Rather, it's a vi that reads text files saved on the cRIO and plots graphs from them. I would like to save this file on the cRIO and have it run from there, as opposed to saving it on the computer, deploying it to the cRIO, then running it.
Is it possible?
Thanks,
Pablo
04-07-2010 12:36 PM
Pablo,
It sounds like you're wanting a standalone, Real Time startup application. If I'm understanding you correctly, you can do this by building a realtime executable or configuring startup VIs with a source distribution. The compactRIO is essentially a Real Time controller mounted to a FPGA backplane. Most articles about Real Time controllers pertain to the cRIO.
Take a look at these links and see if they address what you're trying to accomplish. There are a plethora of articles in our KnowledgeBase and in the LabVIEW Help, be sure to explore those resources as well.
I hope this helps!