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
(3,196 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
(3,191 Views)

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

 

Lynn

0 Kudos
Message 3 of 4
(3,190 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 Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 4 of 4
(3,189 Views)