03-09-2022 08:45 AM
For example, in this picture/front panel below I would like to save the names you see when I re-open the block diagram or start a new run. Does anyone know any how this should be accomplished? I explored some property nodes and couldn't find a way to do that.
This below is what I am getting when I re-open LabView:
I also attached a new block diagram just in case someone wants to see what I am working with. I am creating a login page basically.
03-09-2022 08:52 AM
Save the data to a configuration file of some sort (ini, JSON, etc.) when the run is over and/or when something changes. On start up, load up the data from the configuration.
03-09-2022 09:12 AM
Saving them to a simple text file would work in this case.
Take a look at the Read and Write Delimited Spreadsheet vi
03-09-2022 10:02 AM - edited 03-09-2022 10:09 AM
The previous replies are correct. A configuration file as I have come across them means what information do I want to get initialized at load/runtime and what do I want to save off when I'm done if I changed what I initially loaded in.
I will try to work up an example if I can tonight. The first thing that comes to my mind is you have some file your VI will load outside of any looping when it first starts running.
I am partial to .ini files so it would be a file like
[UserNames]
user1=Altenbach
user2=David
user3=Christian
Once you have a filepath that your VI can read in from you can read each name in and assign it to the array indicators before your program does anything else. So it would end up looking like
Start -> Open File Path -> Initialize State -> Read in Names from your file -> Update Indicator Values -> Do Some Stuff -> On Shutdown write current indicator values back to the same file if you want the list to update.
An initialize state that runs first could be a good place to do this.
I hope that helps I haven't got to do much LabVIEW lately so I will have to go tinker with it myself. It is essentially a File I/O question so learning the basics of that will get you most the way there. The specifics of when and where to load, save, and update indicators will depend on how you plan to set everything up and what states you have.
03-09-2022 12:37 PM
They do have some File IO examples in LabVIEW as well as in their online trainings if you have access to those.