From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Random boolean array into concatenated string

Solved!
Go to solution

I've been stuck on this problem for a while and I think its time for help.

 

My code takes in data values from an external circuit and processes them to meet a certain condition. After the processing I have an array of booleans that could be random, just based upon the circuit.

 

Each index in the array specifies to a certain channel number, for example index 0 is ch1, index 1 is ch2 and so on. What I would like to do is process my random boolean array into a concatenated string.

 

So for example, if my boolean array is FTT, I'd like one string that says "Ch2,Ch3". If its false I don't want to write anything, if its true it should write to its corresponding channel.

 

I am pretty close but my data is getting stored into an array instead of one string. My data gets overwritten if I attempt to store it into one string.

 

Attached is my VI. The lower conditional statements are a part of something else.

0 Kudos
Message 1 of 4
(2,820 Views)
Solution
Accepted by topic author MicahKurtz

You can always... concatenate it into string!

concat string array.png

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 2 of 4
(2,785 Views)

Yes, that was easy. I guess I was much closer then I thought!

Message 3 of 4
(2,779 Views)

You know, I didn't know you could use Concatenate Strings with a single input like that... until I saw it used like that in this forum.  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 4
(2,777 Views)