08-05-2016 12:36 PM
...
Or you could add another control which is a cluster of booleans that will let the caller specify which values in the cluster should be touched.
Ben
08-05-2016 07:46 PM
Here's one way to fix this so that it does "what you want' rather than "what you say". Let's assume the Cluster has an element called "Number", and you want to update this element to "New Number". Write a sub-VI called "Update Number" with "Cluster In" and "Cluster Out" terminals, and a second Input terminal called "New Number". Use New Number to Bundle by Name the Number component of Cluster In, passing the result to Cluster Out. Here's what I mean:
This will preserve all the existing elements of your Cluster, updating only Number. Keep this Cluster in a Shift Register and update the elements one at a time, as you get the new values.
Note that I also included a seemingly-useless Error In/Error Out terminal -- this is often a good thing to put into your sub-VIs as it gives you an easy way to determine the order different sub-VIs will execute (by serially connecting the Error Lines in the order you wish). Also notice the black triangles in the upper-left corner of the Cluster In/Out controls/indicators -- this indicates that these come from a TypeDef, something you should (almost) always create for your Clusters.
Bob Schor