LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why is the does indicator cluster values reset to zero after execution?

I'm using a cluster to contain a selection of indicator. Each indicator has a propery node, the value being sent to the node is the output from a color box constant. A terminal gets associated with the indicator cluster. When I run the program the values get routed to the indicator but quickly reset to zero. If I remove an indicator from the cluster and run the program the indicator stores the value. Why is the indicator values resetting when placed in a cluster?
0 Kudos
Message 1 of 3
(2,358 Views)
I've answered this question some hour ago but I see it's still unanswered, so something went wrong.
I think you are bumping against a race condition i.e. you read a value of a control or indicator and change it inside the same loop, LV does not accept it.
If your cluster is an indicator you can create its local variable, change it to read mode, unboundle, change the values of the indicators you want, boundle them back and in the next loop you can set the new value of the cluster (you should use a shift register).
You can use an alternative method that lets you change the values you want of the indicators in your cluster in the same loop. It is based on the property nodes of the cluster, see sample vi attached.For a description of the property node used open the help
window.

Hope it helped.

altek@tin.it
0 Kudos
Message 2 of 3
(2,358 Views)
Thanks for your help! The suggestion solution works.

Mark
0 Kudos
Message 3 of 3
(2,358 Views)