LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

create string element from array

Solved!
Go to solution

Problem... I want to create a single String element. My input is a 1D Integer array of two elements e.g. [10, 5] and the output needs to be a String element in the form of "10,5". Just a single element and not an array. Any tips or ideas?

 

Thanks!

0 Kudos
Message 1 of 4
(1,384 Views)
Solution
Accepted by topic author hannesostergren

Array to Spreadsheet String.

 

You may need to delete the end of line character that would show up.

 

Alternatively, if you know it is always 2 elements.  Index Array, and feed the two outputs to Format Into String with %s,%s format code.

0 Kudos
Message 2 of 4
(1,379 Views)

Use Array to Spreadsheet String from the String palette with the delimiter set to comma.

 

Lynn

0 Kudos
Message 3 of 4
(1,378 Views)

Index Array.vi to get the elements, then Format into String.vi to create the string.  

 

EDIT:  Forgot about Array to Spreadsheet.vi.  Smiley Embarassed  That combines both functions.

LabVIEW 8.5.1 - 2019 Pro Dev
0 Kudos
Message 4 of 4
(1,377 Views)