From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
SnowForest

Parameter editor and nodes

parameter_system.jpg

In large application there are huge amount of parameters. If there is a lot of parameters usually there is also lot of parameter handling code in block diagram. This code can be moved to away if there is ready mayde parameter handling system. Here are my basic needs\ideas to this kind of system: 

 

- Parameter values are read from e.g. CSV-file when there is a first call 

- Parameter value must be changeable during code execution

- When value is changed new value must be updated to e.g. CSV-file

- User can change parameter name from project view. The new name is updated to all block diagrams (compare to shared variables)

- New parameters can be created from project view

- All parameter values can be changed and read from block diagram by using proper VIs

- Parameter library settings e.g CSV-file format and name can be set in project view

 

Is there any one else who needs this kind of system?

5 Comments
tst
Knight of NI Knight of NI
Knight of NI

The implementation you're suggesting is very close to global variables:

 

- The values can be changed during execution (which is actually the biggest problem with them).

- The name is updated automatically if you change it

- Each variable has a strict data type.

- You can easily save and load them by opening a reference to the global VI's FP, iterating over the Controls[] array and using the Label.Text and Value properties.

 

The biggest problem with both of those are that they are unsafe. Globals could be made safer if writing to them would be restricted to VIs which are inside their library.

 

The second issue is getting a convenient UI for these (presumably you want the end user to have a convenient and safe GUI for editing the values and you might wish to change some of the parameters from other areas in the code, but you don't want to have to write specific code for each parameter). For globals, this can actually be somewhat alleviated if you place the global FP in a subpanel and allow the user to edit the controls directly, but this has the disadvantage that you lose the ability to have special code which might be needed for some of the parameters.


___________________
Try to take over the world!
JackDunaway
Trusted Enthusiast
I think you want what tst has suggested - Adding CONSTs to LabVIEW. After revisiting his idea today, I gave it Kudos.
Message Edited by JackDunaway (mechelecengr) on 11-11-2009 09:35 AM
tst
Knight of NI Knight of NI
Knight of NI

Actually, the two ideas have one distinctive difference - the CONSTs, as the name suggests, are constants. Parameters can be loaded, saved and changed at run-time and that you can already do today with globals.

 

I agree that it would be useful if there was a standard and practical UI for handling parameters in LabVIEW. This idea, however, does not fulfill the features I feel that such an addition needs to have.


___________________
Try to take over the world!
G-Money
NI Employee (retired)

Since both ideas are close enough that the questions would be raised if R&D ever decided to look into this, I am going to close this one as duplicate since the other idea has 51 kudos currently and this one has 0.

G-Money
NI Employee (retired)