LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

update cluster on front panel

Hello,

Im working on labview program that needs to control 6 devices. For each device it should be possible to set target values and see measurements on the front panel. At first I worked with separate controls and indicators, but as each device has 4 controls and 8 indicators my block diagram was getting very cluttered.
So I wanted to use clusters. For each device I created a cluster with the controls and indicators and I used the (un)bundle by name function to read or set the controls or indicators.
However the problem is when I change something, this is not displayed on the front panel. I can create an indicator of the struct, but then I can't use the controls anymore.
Another option would be to write the new struct after bundeling back to itself with a local variable (like in the picture).
That works, but the problem is that I want to put the structs in an Array, and go trough them with a for loop. But when Im in the for loop, I would need to connect to a different local variable each time. I could do that with a for loop, but I don't like that very much because it becomes a lot more work to add a device later on.



0 Kudos
Message 1 of 3
(2,542 Views)
oh and when I say struct of course I mean cluster Smiley Happy
0 Kudos
Message 2 of 3
(2,534 Views)
Can you use two clusters, one of controls and one of indicators, for each device? Then you can use the bundle and unbundle primitives. I think arrays could then work. Using the (Un)Bundle by name primitives helps the program be somewhat self-documenting. Also making the clusters into typedefs has advantages in placing multiple copies and handling changes.

Lynn
0 Kudos
Message 3 of 3
(2,525 Views)