LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I want to creat a config file for my VI

Hi there,  I'm using the Visa configure serial port Vi which I call up at the beginning of my state machine diagram in my main Vi. I would like to use the Visa config serial port Vi as a config file which could be amended and saved anywhere when the application is installed on a different PC. The problem I have is that I don't know the appropriate manner to do it. I've tried few things but nothing works. The Vi I posted below uses sequence structures where I first run all the controls in a loop and when the Save & Exit button is pressed I call up an invoke node with the: " make current value default" property but it doesn't work.  Would anyone have a clue about how I could get this working?  Thanks for your help  Regards 
0 Kudos
Message 1 of 2
(2,350 Views)

Never, ever post a VI that is set to run when opened. Smiley Mad

 

Your VI is generating an error and you  should read what it says and read the help for the method. The help clearly says that you cannot use the method when the VI is running. You would have to call the method from a tope level VI. You could also use the config file functions to write to an ini file. This is more typically done than the method since you cannot use the method when you create an exe.

 

Your VI has other flaws. The sequence structure is totally unnecessary. The VI stops if there is an error and you don't have a chance to change anything. For example, your default com port is Com8, Since I do not have Com8, an error was generated and I could not change the port until the VI was stopped. Is that your intent?

0 Kudos
Message 2 of 2
(2,342 Views)