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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Value change event not firing

Solved!
Go to solution

I have a cluster of check-mark boxes that I'm looking for a value change event to be fired off of.  The event structure appears to work for all other linked controls. 

 

I've had this working before and I've also had this mess up before.  I thought the reason I had it messing up was when I had the event structure being overwhelmed with requests.  That is not the case now.  When I put a probe down inside the event case, it is never fired no matter how many times I click on one of the check-mark boxes (changing the value of the cluster in question).  I click on the Exit button and that event fires with no problem.

 

Any suggestions?

 

Thanks,

Mike

0 Kudos
Message 1 of 6
(3,315 Views)
Solution
Accepted by topic author Mike Webster

Does that help?

 


Note  Clusters are the only container objects for which you can generate events. LabVIEW generates Control events for clusters, before it generates events for the objects they contain, except in the case of the Value Change event. The Value Change event generates the event on an element in the cluster, then on the cluster itself. If the Event structure case for a VI event or for a Control event on a container object discards the event, LabVIEW does not generate further events.

 

http://zone.ni.com/reference/en-XX/help/371361G-01/lvconcepts/using_events_in_labview/

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
Message 2 of 6
(3,311 Views)

Does that help?

 


Note  Clusters are the only container objects for which you can generate events. LabVIEW generates Control events for clusters, before it generates events for the objects they contain, except in the case of the Value Change event. The Value Change event generates the event on an element in the cluster, then on the cluster itself. If the Event structure case for a VI event or for a Control event on a container object discards the event, LabVIEW does not generate further events.

 

http://zone.ni.com/reference/en-XX/help/371361G-01/lvconcepts/using_events_in_labview/

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 3 of 6
(3,310 Views)

Do you have the event case tied to the value change of the cluster, or on the individual cluster elements? If it's on the elements do you have an event case for each one?

0 Kudos
Message 4 of 6
(3,302 Views)

That did help.  Not that it's working like it should, but it afforded a workaround.

 

To answer the question from smercurio: I did not have any events fired off of the elements inside the cluster, only the <all elements> part of the cluster itself.

 

The workaround, though lacking a certain grace, was to add each element of the cluster to the event case individually.  Once I did that, it started firing like it should.

0 Kudos
Message 5 of 6
(3,279 Views)

@Mike Webster wrote:

The workaround, though lacking a certain grace, was to add each element of the cluster to the event case individually.  Once I did that, it started firing like it should.


You can also use the array of references to the cluster controls in a dynamic event (see below).   This has the advantage of automatically updating if you change the number of checkboxes.

 

-- James

CheckboxCluster.png

0 Kudos
Message 6 of 6
(3,266 Views)