LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Value Changed event

I have a button called �My Test� and its �Value Changed� event is handled inside the Event Structure. I have to click the �My Test� button to have the code executed.

Is that possible that I can simulate a button click so the button�s �Value Changed� event handler gets executed automatically?

I need the vi to process three different operations at once automatically that usually need to click on three different buttons.

Thanks.
0 Kudos
Message 1 of 3
(2,752 Views)
There are 2 ways to fire a value change event.
1. Have a front panel action that changes the value. This is what you are currently using I believe.

2. The other way was introduced in LabVIEW 7.0 and is the "Value Signaling" property of the control. If you create a property node from the buttons and select that property every time you write to it the event will fire. Note that when you use this method the value does not actually have to change. For example if a boolean was false and you wired a false to the proerty the event would still fire.

Evan
0 Kudos
Message 2 of 3
(2,751 Views)
Since you want to do multiples at the same time, I believe a "Queued Message Handler" architecture may be useful.

See this link

http://zone.ni.com/devzone/learningcenter.nsf/03f7c60f17aad210862567a90054a26c/338ee44cb1c3450986256c2b007cf8c5?OpenDocument

for a tutorial and discussion.

Summary:

A Queued message Handler will transfer the "work" associated with an event from the UI thread to a parallel process. Since the message handler requests are queued, multiple requests can be submitted at the same time and the execution order of the requests can be controlled and completed without getting in the way of the UI tasks.

Please reply if you have follow-up questions after you have reviewed this link.

Trying to help,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 3
(2,751 Views)