LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I call a sub-VI when a user updates an input control?

Hi,

I am using LabView 5.1 and need to perform some input checking at the
time the user changes an input control. For example, if a user
updated a numeric control using the arrows or by pressing enter, I
would like to call another VI at that event. That VI would inspect
the contents of the control to see if it made sense in the current
context. If not, it would alert the user. This sequence could be
likened to LabWindows callback functions.

Any ideas? Thanks,
Brett
0 Kudos
Message 1 of 4
(2,560 Views)
For simple VIs I just put things in a continous while loop and then when
the user wants to execute some action I use something like a mechanical switch
that is set to latch when released that is then wired to a T/F conditional
that executes once you let go of the mouse button. You could also wire this
to the boolean for the while loop so that once the action is completed you
pass out of the loop and on to the rest of the program. For user input strings
I imagine that you could have an enter button so that string is not read
until the user is done typing it into a string control box.

bmoore@door.net (Brett L. Moore) wrote:
>>>Hi,>>I am using LabView 5.1 and need to perform some input checking at
the>time the user changes an input control. For example, if a user>updated
a
numeric control using the arrows or by pressing enter, I>would like to
call another VI at that event. That VI would inspect>the contents of the
control to see if it made sense in the current>context. If not, it would
alert the user. This sequence could be>likened to LabWindows callback functions.>>Any
ideas? Thanks,>Brett>>>
0 Kudos
Message 2 of 4
(2,560 Views)
When I've had to do this I use a shift register. I compare the current
value of an input to the previous value. Using a case structure, if
the input has changed, you handle it with your subvi. If the input
hasn't changed, then do nothing (or whatever). Hope this helps. It's
a pretty simple solution, there may or may not be a simpler (more
elegant) solution out there.

Spencer

In article <3942769f.57900035@news.door.net>,
bmoore@door.net (Brett L. Moore) wrote:
>
>
> Hi,
>
> I am using LabView 5.1 and need to perform some input checking at the
> time the user changes an input control. For example, if a user
> updated a numeric control using the arrows or by pressing enter, I
> would like to call another VI at that event. That VI would inspect
> the contents of t
he control to see if it made sense in the current
> context. If not, it would alert the user. This sequence could be
> likened to LabWindows callback functions.
>
> Any ideas? Thanks,
> Brett
>
>


Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 3 of 4
(2,560 Views)
I think you haven't got to reinvent the wheel, you can use
change.llb VI set from
brian.renken.com/LabVIEW/downloads.htm
Hope this helps
Gorka


* Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful
0 Kudos
Message 4 of 4
(2,560 Views)