LabVIEW allows me to create a cluster object and then place numeric indicator
s within it. This collection of indicators is then fed by one 'wire', as a cluster.
If I want to add another indicator which displays the mean value of the previous set of values (e.g. I have 5 temperature values, and I want to display each along with their mean) then I can add a new indicator, but this then wants a new value.
Saving the cluster as a control
allows me to reuse it easily, but if I have to pass the mean into the cluster each time, then I'm stuck with something like this:
Can I calculate the mean somehow inside the control/should I package this up differently, in order to avoid the middle section here?
This is what subVIs are for. If you think that code is making your diagram look untidy, select the relevant parts and choose Edit > Create SubVI
.
I second MisterEmme's suggestion that you should think about defining your cluster so as to separate the mean from the individual temperature values, so that things don't break if you later have six temperatures, or four, etc. If you make that cluster into a typedef and save it, you can then use Bundle/Unbundle by Name as Khachik suggests, and that gives you further future proofing in that you can add or change things in your cluster definition later on without breaking your existing code.
I don't think In Place Element is appropriate here, this is intended for performance optimisation in speed- or memory-intensive code and while it sometimes looks neater than the normal array operations, it can actually harm performance if used excessively and inappropriately. An XControl or LVOOP would be overkill for the need you have described, but by all means check them out if you want to learn something new.