04-24-2014 11:49 AM
So in my main VI I basically have a cluster of a dozen indicators that display current, temperature, etc of some DUTs. This cluster of indicators is on display in the front panel.. and I want to be able to update these indicator values from a subVI. The tricky thing is, i want to be able to update only a few of the indicators at a time.(for example if only one of the DUTs is enabled I want to update only the indicators pertaining to that DUT).
I've found the follwing solution to update an indicator of a main vi within a subvi using refnum and property node to write...but wondering, how do you handle it with a cluster, especially when you only want to update some of the indicators in a cluster?
I've gotten to this point so far. I'm not too familiar with working with refnums/property nodes so not sure how exactly to change only one or few of the elements in a cluster this way. Thanks in advnce for any help!
04-24-2014 12:05 PM - edited 04-24-2014 12:08 PM
Read the current value wire it to a bundle by name center terminal, bundle the changed values into the cluster you read, write the updated cluster value back to a p-node
04-24-2014 03:56 PM
You can right click on an element of a cluster and make a reference of that specific element.
04-25-2014 07:20 AM
Generally, it isn't really a good idea to update GUI values from a subVI. When writing to a poperty node, it causes a thread swap, causing your code to get really slow. You are better off passing your value out of your subVI and letting the main VI handle the change in the value.
Or, what I much prefer, is use a User Event to pass the new value to the Event Structure on your GUI VI. You can then write directly to the terminal that way. In your case, you would want to keep the cluster value in a shift register and just use the Bundle By Name to update the value. Write to the cluster terminal outside of the Event Structure (but inside of the loop the Event Structure is in).