LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

action on control click

Hello everybody

I have a simple numerical control. When value is changed by click
I would like to take some action. Is there any simple way to
check if the control was changed, I am thinking about some
"elegant" solution, someting like action on press?

regards
PP
0 Kudos
Message 1 of 8
(3,623 Views)
Hi,

What LabVIEW version you use? If you use 6.1, there is Event Structure, that very easy for using. There are examples in LV help.
If you use previous versions of LV, you must check value of control, if it changed.
Another approach is to put ActiveX numcontrol, for example CWNumEdit of NI and use ActiveX event (valuechanged)
Look attached examplewith 2 approaches.
Hope that helps.

Nadav Chernin
nchernin@chiaro.com
0 Kudos
Message 2 of 8
(3,623 Views)
Look this attached zip-file. Attached example in answer is not complete.
0 Kudos
Message 3 of 8
(3,623 Views)
Thank you very much, it helped very much.
best regards
PP
0 Kudos
Message 6 of 8
(3,623 Views)
Hi,
I'm using LV6.01 currently but as far as I know there are some event-driven capabilities in LV6.1 And they allow you to easily check if control value was changed.
Another solution is to use something like state machine - the loop with shift registers connected to your control. So in every iteration you can compare the curent value of control with the previous one obtained from shift register. I've attached the example.

Good luck.

Oleg Chutko.
0 Kudos
Message 4 of 8
(3,623 Views)
Thank you very much, it helped very much.
best regards
PP
0 Kudos
Message 5 of 8
(3,623 Views)
In LV 6.1 you can do some explicit event handling. In older versions you
can't.

For my part I split up an application in a user interface and a processing
VI. Within the User interface I scan that contro repeatedly and send a
notification to the core when some action took place. That works fine and is
rather "elegant".

Oliver Friedrich

"Pawel Pocwiardowski" schrieb im
Newsbeitrag news:3CE20331.96A4D988@poczta.onet.pl...
> Hello everybody
>
> I have a simple numerical control. When value is changed by click
> I would like to take some action. Is there any simple way to
> check if the control was changed, I am thinking about some
> "elegant" solution, someting like action on press?
>
> regards
> PP
0 Kudos
Message 7 of 8
(3,623 Views)
Look this attached zip-file. Attached example in answer is not complete.


numeric_event.zip:
http://forums.ni.com/ni/attachments/ni/170/28338/1/numeric_event.zip
0 Kudos
Message 8 of 8
(3,095 Views)