LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cluster of booleans to array, Labview

I have a cluster containing
1) 1 waveform chart
2) Another cluster containing a 5 Booleans.
I want to get out point 2 as an array of Boolean.
Later on, I want to use to array to set which of the 5 plots in the chart there is visible
How do I get out the Booleans array?

 

snip.png

mkoppelgaard_0-1588570686714.png

 

0 Kudos
Message 1 of 7
(3,043 Views)

Hi mkoppelgaard,

 


@mkoppelgaard wrote:

2) Another cluster containing a 5 Booleans.
I want to get out point 2 as an array of Boolean.
Later on, I want to use to array to set which of the 5 plots in the chart there is visible
How do I get out the Booleans array?


As the cluster in your image only contains 4 booleans:

To "get out elements" from your array you use basic array functions like IndexArray…

(Or use an autoindexing FOR loop to set the corresponding plot property.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(3,026 Views)

Hi GerdW
I already tried that :

mkoppelgaard_0-1588573269728.png

 

0 Kudos
Message 3 of 7
(3,016 Views)

Hi mkoppelgaard,

 


@mkoppelgaard wrote:

I already tried that :


You already attached this image to your first message…

Why don't you use AutoCleanup, atleast to show straight wires?

Why do you read the references of the controls inside the cluster? (Which should be references to those boolean controls!?)

 

Edit: Now I see: you placed the chart with this other cluster inside another bigger cluster… What's the point of this step?

And why don't you use the visibility option in the plot legend???

 

To read the content of the referenced cluster you either need to convert the reference to a specific (strict) typed cluster reference (you used a generic one) - or convert the variant data to a boolean array…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(3,004 Views)

Hi GerdW
I tried to follow some of you advices. I don't know what you think? Now at least it’s working as I intended it to do 🙂 

snip.png

0 Kudos
Message 5 of 7
(2,970 Views)

Seems to be 4 Booleans in that cluster (not 5)?

0 Kudos
Message 6 of 7
(2,952 Views)

Year 4 not 5. My mistake

 

0 Kudos
Message 7 of 7
(2,939 Views)