LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

same VIs with different settings at runtime

is it possible to make the cluster invisible but not the contents of the cluster to make it look like there is no cluster?

Just to be clear - there's a difference between "invisible" and "transparent". If you make a cluster invisible, all things inside it are invisible, and it will not respond to mouse clicks, keys, etc. If you make the border transparent, then you affect the border colors, and background, but all the things inside it are still visible and operable. That's what you want, I think.
Do that with the paintbrush and the "T" color.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 11 of 21
(1,125 Views)
Thanks...that was exactly what I meant (transparency, Setup)

Just read something about the data loggin in the Operate Menue: Is this something compareable to what I want to do (as it says it saves the controls into a datalog file) is this accessible programatically?

I read some things about configuration files, too. Is this something different?
0 Kudos
Message 12 of 21
(1,003 Views)
Just read something about the data loggin in the Operate Menue: Is this something compareable to what I want to do (as it says it saves the controls into a datalog file)

There is a feature that will automatically log any VI to a file. It treats the front panel as a cluster of items, and the datalog file has that format. It logs EVERYTHING on the front panel - buttons, graphs, all of it. It will make a record every run, or you can trigger it programmatically.



is this accessible programatically?
Yes, you can read the files programatically. They're just another datalog file, with the type, matching the front panel order.

I read some things about configuratio
n files, too. Is this something different?

Yes. Those are INI files. They have nothing to do with datalog files, and I wouldn't recommend them for this app.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 13 of 21
(1,003 Views)
how can I trigger this prgramatically?

Is this accessible via VIServer?
0 Kudos
Message 14 of 21
(1,003 Views)
hi.
I found those two files in the File Examples. I saw no difference in the performance compared to the example you gave me. Is there any difference? What could be done better with datalog files? Can I expect any difficulties if I would use the configuration file?
Download All
0 Kudos
Message 15 of 21
(1,003 Views)
1... Your example uses CREATE file, FIVE write files, CLOSE file.
When you add something to the file, you add one more WRITE function.
My way uses OPEN file, ONE write file, CLOSE file.
When you add something to the file, you add it to the cluster, and don't change the code.

2... Your examples write TEXT files. Users will be more tempted to diddle with them outside of LabVIEW.
My way writes BINARY files. The temptation is less.

3... Your examples use TEXT files. When choosing one, the dialog cannot distinguish between "MyFantasticProgramSetup#1.ini" and "SomebodyElsesProgramSetup.ini", even though they are completely incompatible.
My example will not
offer incompatible files for choosing.

4... Your examples are much slower. Just look at all the code behind the scenes. Datalog files are much faster.

5... Your examples will produce smaller files, if the number of items is small. For larger number of items, datalog results in smaller files. This is because there is a fixed-size header for datalog files, typically less than 500 bytes. For a small number of items, the savings of binary over text is exceeded by the header size, not so for larger number.

Those are the pros and cons. You can decide which ones are important to your app, and which are not. For example, if you read a file only in response to a button push, you probably don't care whether it takes 5 mSec or 500. If you read and write a lot of them, you might.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 16 of 21
(1,003 Views)
Thanks for that info. I'll try to use the datalog type. It would be the best to save the different settings for the same VI in different files? Or is it possible to use one file and divide it in different sections?
0 Kudos
Message 17 of 21
(1,003 Views)
I would use one file.

Use a cluster for this, a cluster for that, another cluster for the other.
Wrap them all up in a big cluster, and write it to a file with one function.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 18 of 21
(1,003 Views)
I'm now at the point where I want to include the load/save/reload of settings feature. I don't think that I can use one big Cluster of Clusters. I would have to know in advance how many different settings there will be for one VI. As this should be not limited I would need something where I can write the clusters with my controls consecutively into the one file and keep track of how many clusters (equals the number of settings already available) are already existing. Then for reading I should select a position in the file to reload the settings for the VI with the desired values. Is this possible with the datalog files? I tried already to wire
a control to the "pos mode" but that is not possible as long as a refnum from a datalog file is connected to the write function. If it is not possible I think I have to use different files with one setting each or configuration files?
0 Kudos
Message 19 of 21
(1,003 Views)
I'm not sure what you need but you can put an array in your datalog file somewhere.

An array has unlimited capacity (within reason).

The array can be of any structure - an array of DBL, and array of cluster of ____, etc., etc.

Arrays already know how many elements they contain.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 20 of 21
(1,003 Views)