12-06-2013 02:18 AM
Dear All
I create a project in Labview with couple of VI's. I use a modbus tcp ip protocol to read registers from PLC controlers and the tcp open blok . In the main screen i create a Menu with password and username and i want to use this menu for changing the ip adresses of the other VI's. I made this task with global value but when i change the value the other VI work fine but when i close the windows and when i open again the global variable is empty. My question is how can i store the new value ???
Solved! Go to Solution.
12-06-2013 02:46 AM
12-06-2013 03:54 AM
ok thanks but do you know any algoritm for storing values in variables after closing the VI's and the program..... and somethimes when it's needs to change the value with newone and then the new value will store again or there is no such function. Because in C; dotnet and other languages is different. You can store , change variables in any screen,menu etc.
12-06-2013 04:23 AM
Hi Bochev,
as said before: when you want to store values to be available for the next programs run you should use files. LabVIEW provides a full palette of file functions...
And I do think other programming languages will handle ths problem the same way.
12-06-2013 05:01 AM
Dear GerdW
So how can i create variable for example string variable (IP adress)? When I start the project the ip adress is blank. Then i want to configure the ip adress from other VI(i create a system menu for making some change like admin panel). Then I type a new IP adress and close the "admin vi's".After that i open the main program with tcp connection and the ip adress is configured and stored. Then i close the project. In next time when i open the project it must load the last value for ip adress. How can i made this?And is it possible?
12-06-2013 05:06 AM
Hi Bochev,
yes, it's all possible...
Then i want to configure the ip adress from other VI(i create a system menu for making some change like admin panel). Then I type a new IP adress and close the "admin vi's".
In LabVIEW this is called a subVI. You can have in- and outputs of a subVI connected by wires...
After that i open the main program with tcp connection and the ip adress is configured and stored.
As you wrote it: "is stored". You need to store your string in a file...
Then i close the project. In next time when i open the project it must load the last value for ip adress.
As you wrote it: "it must load". You need to load the string from a file...
It seems to me you're beginner in LabVIEW. So I would suggest to take all those free online LabVIEW learning courses offered by NI. And to look at all those example VIs coming with LabVIEW...
12-06-2013 05:15 AM