LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I need a control which allows a user to choose from specific values (which I specify), NOT 0, 1, 2 etc. [I KNOW I can let him enter 0, 1,2 fro

m a listbox, and then change the value on the block diagram, but what I want is that on the subvi node itself he can enter the actual values, say 1, 10, 200. Does anyone know how to do this, creatively, since currently a control like this is not available.I need a control in Labview which allows a user to choose from specific values (which I specify), NOT 0, 1, 2 etc. [I KNOW I can let him enter 0, 1,2 from a listbox, and then change the value on the block diagram, but what I want is that on the subvi node itself he can enter the actual values, say 1, 10, 200. Does anyone know how to do this, creatively, since currently a con
trol like this is not available.
0 Kudos
Message 1 of 3
(2,493 Views)
m a listbox, and then change the value on the block diagram, but what I want is that on the subvi node itself he can enter the actual values, say 1, 10, 200. Does anyone know how to do this, creatively, since currently a control like this is not available.> I need a control which allows a user to choose from specific values
> (which I specify), NOT 0, 1, 2 etc. [I KNOW I can let him enter 0, 1,2
> from a listbox, and then change the value on the block diagram, but
> what I want is that on the subvi node itself he can enter the actual
> values, say 1, 10, 200. Does anyone know how to do this, creatively,
> since currently a control like this is not available.
>

One way of doing this is to use either a ring or enum where the strings
presented to the user are "1", "10", or whatever you like. On the
diagram, the values will be 0, 1, 2, in a compact counting sequence.
Then do an array index into a constant. If this is done more than one
place, make the control a typedef so you can keep them consistent an
d
make the index be done in a subVI. Then whenever you need this, you
drop the control and the subVI, out comes the integer, float, or
whatever it is you want to index.

Greg McKaskle
Message 2 of 3
(2,493 Views)
m a listbox, and then change the value on the block diagram, but what I want is that on the subvi node itself he can enter the actual values, say 1, 10, 200. Does anyone know how to do this, creatively, since currently a control like this is not available.Hi,

I am including a vi which reads the element from a list box as selected by user.

Hope this helps. If you are looking something else, get back to me.

Best Regards,
Nirmal Sharma
India
0 Kudos
Message 3 of 3
(2,493 Views)