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.
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.
07-30-2012 05:04 AM
Hi guys I tried to chage the selection values of one enum varible to chage depending on another enum varable. LIke a select device will decide the which will operate and depending upon the device selected a set command will apper in another variable....
No clue weather it is possible or not???? 😕
07-30-2012 05:57 AM
07-30-2012 06:55 AM
It is NOT possible to change the item themselfes for enum controls. For enums, you can only change the selected (active) item by simply setting the enum to the requested value. But the dropdown content (selectable items) will not change.
You have three (or more) workarounds:
a) Work with ComboBoxes since those allow to modify items during runtime.
b) Work with disabling items in enums (see attached example).
c) Create different enums and place them above each other. Work with the visibility property to display only the "active selection enum" at a time.
hope this helps,
Norbert
07-30-2012 07:01 AM - edited 07-30-2012 07:05 AM
@Norbert_B wrote:
It is NOT possible to change the item themselfes for enum controls. For enums, you can only change the selected (active) item by simply setting the enum to the requested value. But the dropdown content (selectable items) will not change.
You have three (or more) workarounds:
a) Work with ComboBoxes since those allow to modify items during runtime.
b) Work with disabling items in enums (see attached example).
c) Create different enums and place them above each other. Work with the visibility property to display only the "active selection enum" at a time.
hope this helps,
Norbert
Combo boxes if you want a string output
Ring controls if you want numeric outputs. you can edit the 'strings' and 'string and values' properties during run time
Edit: you said 'command should appear in another variable'. Do you want to update a list of commands in the pull down menu depending on the device selected? Then, combo boxes are better as they can give you string outputs, unlike rings and enums.
07-30-2012 07:38 AM - edited 07-30-2012 07:43 AM
Thanks everybody for their suggestion and I think I have an idea but still I am posting my VI. In the block diagram nothing is their because that still under development but if you see front panel you will find a device select ENUM is present now depending upon what device you select you will different set of commands in command select button...
That is my question that can change is display of a enum variable by changing another
07-30-2012 07:56 AM
05-12-2015 01:04 AM
Hi GerdW, I am new to LV, Can you say how to do the following " use a ring and use it's Strings[] proeprty to set selection strings depending on your device." ?
05-12-2015 01:38 AM
Hi 23,
- A "ring" is a certain front panel ("FP") element. You will find a ring control in the rings & enum palette.
- Each FP element has properties. You can edit the properties using the right-click (aka "context") menu of that control and selecting items like "datatype". And you can also set those properties programmatically using property nodes - you can create them also in the context menu…
One property of a ring control is the array of strings it will show to the user…
As you say you're a newbie I recommend to take all those free online courses offered by NI on their website!