LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic UI in runtime

HI,

 

I need some suggestion in achieving this concept, I am not sure if some thing like is already exist or some one has implemented it. My requirement is like the user will select an item from a Combo box from the front panel, according to the user selection the next screen should be displayed. for example if user selects "Item 1" from combo box, Vi will search the selection in a file and gets the Next UI Configuration like below.

"Display name", "Data Type", "Restriction"

[Item 1]

"Serialno", "Text", "8"

"type", "List", "Internal, external"

"noofcycle", "numeric", 0

 

according to the file I need to place this control on the front panel during runtime. needs your thoughts on this

 

Thanks in advance

 

0 Kudos
Message 1 of 5
(307 Views)

If I understand your question correctly, a few options come to mind. 

 

  • Hide and show controls. You can do this using the "visible" property. This would be easy if the number of controls you need is small
  • Use a table / multicolumn listbox. These can hold string data types and you can convert to/from string depending on your other data types.
  • Insert a subVI into a subpanel. This could work well if you only have a couple of configurations to choose from, each one corresponding to a different subVI.
0 Kudos
Message 2 of 5
(290 Views)

Hi,

 

My requirement is that User is allowed to change the number of parameters in the file for each item and he can a new items also in the file. so my controls on the screen is unknown until user selects. as you said if i make the control invisible and visible, one problem I will end up is like after reading the file only i will know the list of controls to place like string , listbox, numeric or numeric string list. how do I handle this?

 

Thanks in advance

0 Kudos
Message 3 of 5
(269 Views)
In that case, I would go with the multicolumn listbox / table
0 Kudos
Message 4 of 5
(259 Views)

We use table in one of instrument.

Method consists of set of predefined actions, like MoveToSample, Syringe, Delay. Each action has different set of parameters. For example:

- MoveToSample action has X, Y and Z positions

- Syringe has Infuse/Withdraw, Volume and Speed

- Delay has Time.

One action uses one line in the table. Operator can type into table. In case of predefined settings, like any cell in first column, operator makes right click by mouse and gets popup dialog with list "MoveToSample/Syringe/Delay". In case of Syringe action in second row operator gets "Infuse/Withdraw" list. Additionally, application show action's hint.

Method could be saved to/loaded from file and validated.

 

0 Kudos
Message 5 of 5
(251 Views)