05-06-2009 02:11 PM
I made an executable file to control the temperature of a radiant heater. The program asks for a set point. Based on the value the heater either turn on and off. The set-point value changes depending on the application. When building the program, I set the set-point to a default value, let say 300F. When running the program I often change the set-point to 400F or other given value. If I close the program and I re-open it, the set-point will load the default value of 300F. I want the program to save the last value I input and when I open it again start with such value. I do not want to compile a new program everytime I change the set-point. I was wondering if someone has a solution for this problem.
Just to make sure I explained the problem well, What I want is to load the latest set-point value everytime I open my executable file. I have been thinking on how to do this: One possible solution is to create a configuration file external to the host application. The host application should call the configuration file when opens and should save the latest value in the file when closes. This is the best solution I can think of. If someone has a more elegant solution, please drop me a hint.
If my solution is the best way, I would like to know how can I call a configuration file saved in the RT controller (compaqRIO Ni-9073) to my host computer. I believe there are some FTP functions but I couldn't find any valuable examples. Can someone show me some FTP-get-file function examples so I can start working on my solution.
Any help is appreciated.
Thank you.
Luis,
Heavy labview programmer in search for solutions from the experts.
05-06-2009 02:38 PM
I made some progress with the FTP-get-file function in labview. But still having some problems. I saved the configuration.csv file onto my cRIO controller. Then I try to pull the file using FTP-get-file.vi and save it onto my desktop. The file saved has some empty raws which were not in the original file. I do not know how to prevent that. I'm attaching the program and the configuration files I used. This may help to get to the solution faster.
Thanks
Luis
05-06-2009 02:46 PM
The ftp problem was easy, it seems that I need to set a false value into the bynary input of the vi. Seems that I'm solving my own problems. I will try to replace the new configuration file on the controller. An example would be much easier to follow, but I will keep working on it.
-Luis
05-07-2009 08:32 AM
Hi Vargas,
The values of shared variables that are deployed on your cRIO will persist across reboots.
So, if you are communicating new setpoints to your controller with SVs, then you are good to go.
Here is an example that implements this:
http://decibel.ni.com/content/docs/DOC-4134
Hope this helps.
Kurt