01-13-2017 02:37 AM
Hello to all.
I would like to know hoe can open my VI with the same configuration. I mean with every indicators, controls, graphs... are equal than when Labview was closed the las time.
Is it that possible?
I am asking this because I am developing a vision application with vision and motion toolkit. And a ROI is changed every time when I run again Labview in the same position of display.
Thanks a lot.
01-13-2017 02:45 AM
Hi A.,
when you want to have certain default values in your controls (and indicators) you need to set those default values and save the VI!
Or you need to store your settings in a file and load the settings at start of your VI - like any other software does…
01-13-2017 02:49 AM
Thanks for answering.
Yes but I do not want to do that.
Imagine that user put the ROI in x=5 and y=10, close the program and the next day run the program again. I would like that the ROI's position will be x=5 and y=10.
01-13-2017 02:56 AM
Hi A.,
Yes but I do not want to do that.
What exactly don't you want to do?
Imagine that user put the ROI in x=5 and y=10, close the program and the next day run the program again. I would like that the ROI's position will be x=5 and y=10.
Then you want to save the current settings of that control and load them when starting your VI!
Again: as any other software you need to use files to keep settings in a save place…
01-13-2017 03:02 AM
In a file?
What kind of file can I to save control settings?
And how can it be loaded?
or can you show me a link about this please?
Thanks a lot.
01-13-2017 03:21 AM - edited 01-13-2017 03:22 AM
Hi A.,
yes, in a file.
You can use any file type you like: simple text, config aka INI files, XML data in a file, even "binary" files will do! Just pick a file type based on your requirements/wishes…
And how can it be loaded? or can you show me a link about this please?
LabVIEW has a "file functions" palette. You will find functions for saving data (aka Write) as well as loading data (aka Read).
LabVIEW comes with a lot of example VIs: did you check them already?
01-13-2017 03:23 AM
Hello thanks a lot.
I am gonna try what you say!
For future visitors here the links are:
http://zone.ni.com/reference/en-XX/help/371361E-01/glang/configuration_file_vis/
http://digital.ni.com/public.nsf/allkb/49D5A041D89FADE686257213007B7EEC
01-13-2017 11:26 AM
@GerdW wrote:
Hi A.,
yes, in a file.
You can use any file type you like: simple text, config aka INI files, XML data in a file, even "binary" files will do! Just pick a file type based on your requirements/wishes…
And how can it be loaded? or can you show me a link about this please?
LabVIEW has a "file functions" palette. You will find functions for saving data (aka Write) as well as loading data (aka Read).
LabVIEW comes with a lot of example VIs: did you check them already?
Not often I get to jump in and suggest a better alternative than GerdW
Enable Dataloging on the VI
@See the Help file @Here
This feature saves all Front panel data in a binary format and has a built in API for easy storage and retreval of those data records. Its a seldom used feature of LabVIEW but has been around for decades to enable you to do exactly what you are discribing.
Note: I'm no expert on using this feature! thats why I pointed you to the help whith all those "How To" sections.