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: 

How can I convert array of Boolean values to array of text

Solved!
Go to solution

Good evening

Hai I am working on a project in LabVIEW and I am doing a report for all my founded values in the project and now i want all my values in text format that is in TRUE or FALSE but I am done with getting the values as 0 or 1 in a table but failed in getting them in text format 

any help will be appreciated 

Thank you

0 Kudos
Message 1 of 25
(4,815 Views)

I see a lot of broken wires.  I'm assuming that is where the problem is.  You have an array of doubles and are trying to add to that strings.  You can't have different datatypes in an array.

 

Convert the numerics to strings first.  Then add the strings to your array.

0 Kudos
Message 2 of 25
(4,812 Views)

I want to load the greater than output to build array for reading the values into table

0 Kudos
Message 3 of 25
(4,810 Views)

All the broken wires are due to the loading of greater than output to Build array

0 Kudos
Message 4 of 25
(4,807 Views)

Use a FOR loop.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 25
(4,806 Views)

Functions -> Programing -> String -> Array to Spreadsheet String

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 6 of 25
(4,760 Views)

@paul_cardinale wrote:

Functions -> Programing -> String -> Array to Spreadsheet String


I initially tried that, but the Array To Spreadsheet String does not accept an array of Booleans.  It only likes floats, integers, and strings.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 25
(4,749 Views)

Convert the boolean array to num.

Coerce to Type (where type is an array of enums of "False","True")

Then Array to Spreadsheet String.

b.png

"If you weren't supposed to push it, it wouldn't be a button."
Message 8 of 25
(4,737 Views)

Hai Good Morning

The VI you replied is working but it shows error "You have connected two terminals of different types.
The type of the source is string.
The type of the sink is double [64-bit real(~15 digit precision)]" while loading it to build array. help me out for solving this thank you. 

0 Kudos
Message 9 of 25
(4,706 Views)

IMHO You need to go through basic LabVIEW Tutorials, Mainly on data types and Arrays.

 

Array will support for Same Data Type, You are trying to build String with Numeric datatype.

Based on your snippet try building after converting to String Datatype.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 10 of 25
(4,699 Views)