Updating a LabVIEW GUI from a subVI -
i'm writing program control 2 similar devices in labview. in order avoid copying code use subvis. have piece of code update values on gui inside while loop. i'd know if possible somehow have loop inside subvi , have subvi sending 1 of output parameters after each iteration.
to update gui within subvi can 1 of following:
- create queue or notifier in top level vi , pass reference in subvi. in subvi, send data queue or notifier. in top level vi, have loop waits data on queue or notifier , writes front panel indicator.
- create control reference front panel indicator in top level vi , pass reference subvi. in subvi, use property node write
value
property of indicator.
if @ labview terms in bold you'll find documentation , examples how use them.
of these options, use queue data it's important top level vi receives every data point (e.g. if data being plotted on chart or logged file) or notifier it's necessary user sees latest value. using control references purpose bit 'quick , dirty' , can cause performance issues.
if need update more couple of indicators this, you'll want build cluster containing data send queue/notifier, or containing control references. save cluster typedef can modify contents without breaking code.
Comments
Post a Comment