LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

INI Config Files - cRIO

I have a simple question but I have spent nearly two days trying to code it to work....

 

I have a several variables I need to update based on the current part that is running.   

 

I was going to store the variable values in an INI file so I can load them based off the current part.  

 

I am trying to use the GXML to do this, but I have been having problems getting it to save.    

 

Is there a simpler way to do this?      The battle I have been having is to get the initial layout for XML in the file..... I can't get it to save.   (doesn't like the user prompt that comes up)

 

Here is a snapshot of the code....

 

Thanks for any feedback.

 

 

 

 

 

 

 

0 Kudos
Message 1 of 3
(3,027 Views)

The problem is likely the dialog you're trying to use in the code.  Since there is no UI on an RT system you can't pop up a dialog box asking for User input. 

 

Maybe you can just code the path to the .ini file using a relative path.

0 Kudos
Message 2 of 3
(3,008 Views)

You have a misunderstanding of how RT platforms are intended to be used. Don't worry, you're not the first one, and there will be more that come along after you. They should run stand alone and are not intended to have a user interface. You should have an application on your PC that handles all the user interface stuff and communicates with the cRIO via some type of network communication. The user should never be setting control values directly on the cRIO; the ability to do this is purely for development and debugging purposes.

 

What I have done in the past for configuration files is, modify the configuration file on the host and when it is saved, FTP the file down to your RT platform (cRIO). You can do this in your program by having a dialog that allows editing of all config file parameters, and has a save button. When save is pressed, use the FTP VIs to FTP the file.

 

On the cRIO you have a loop that is monitoring a directory. When it sees the file in the directory is new, it reads the file and updates the values in your RT program. Does this make sense?

0 Kudos
Message 3 of 3
(3,001 Views)