LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing an array to a sub-vi

I see there are some questions posted on this already, but I don't quite get the answers I want.
 
My problem is that I have a top-vi with a package of data for each machine we're operating.
These data are organized into a cluster (for each machine) which is then put into a one dimensional array.
 
The code for manipulating this is quite complex, and I'd like to put it into a sub-vi. The data have a front panel object
 
My first approach would be to just pass this array over, modify it and return it. However, I'd also sometimes like to grey out some data that are not relevant.
 
Next approach would be to pass a reference to the array, and then use this reference to both modify the data and grey out some of the data. However, I don't manage to do this - can anyone give me a receipe for this?
 
Another approach that could have been useful - especially when I have situations where I call the same sub-vi many places - would be for the sub-vi to have its own front panel that is displayed when you add the vi to the block diagram (basically same functionality as lv built in objects. Is this possible to create?
 
Thx
0 Kudos
Message 1 of 2
(2,670 Views)


Rodnebb wrote:
My problem is that I have a top-vi with a package of data for each machine we're operating.
These data are organized into a cluster (for each machine) which is then put into a one dimensional array.
 
My first approach would be to just pass this array over, modify it and return it. However, I'd also sometimes like to grey out some data that are not relevant.

You cannot set the properties for individua array  elements like greying out a particular element of an array.
But, you can do so for the individual elements of a cluster by making use of its Controls[] property.
- Partha ( CLD until Oct 2027 🙂 )
Message 2 of 2
(2,665 Views)