LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help in converting string to numeric array

I am trying to convert a string to a numeric array ... the first # in the string gets cut off, the last three seem to come through. 

 

This may be fairly simple, but I really haven't worked with the string functions all that much.

 

Help would be appreciated.

 

Thanks,

0 Kudos
Message 1 of 10
(6,164 Views)

Hi

 

You can use "format into string"function from the string function pallet

0 Kudos
Message 2 of 10
(6,162 Views)

Example_VI_BD.png

=====================
LabVIEW 2012


0 Kudos
Message 3 of 10
(6,152 Views)

oooooooooh

 

I am so sorry, I did not notice the array" in ur post, because I do not have labview right now, I am very sorry for my last silly mistake

 

0 Kudos
Message 4 of 10
(6,145 Views)

try this ...

 

(Of course your numbers seem to be fixed with with leading spaces, so it would be also simple to scan using a fixed width)

0 Kudos
Message 5 of 10
(6,140 Views)

Wow I sure did misinterpret that one! Smiley Very Happy I guess I paid too much attention to the subject line.

 

If you remove the first and last byte from the string using string subset then the read spreadsheet string would probably have worked.

=====================
LabVIEW 2012


0 Kudos
Message 6 of 10
(6,135 Views)

@Steve Chandler wrote:

If you remove the first and last byte from the string using string subset then the read spreadsheet string would probably have worked.



Yup.

0 Kudos
Message 7 of 10
(6,126 Views)

Yet another way... 

 

(since you seem to be dealing with integers, I seleted a more logical representation here. modify as needed)

 

0 Kudos
Message 8 of 10
(6,120 Views)

All My Regexes Live in Texas....

 

RemoveWhitespaceRegex.png

 

Probably don't even need the \h & \v, I just add them as a habit.

Message 9 of 10
(6,114 Views)

Hey guys I appreciate the posts.  I'll try these examples out and see what works with the USB driver.

 

Great feedback.

0 Kudos
Message 10 of 10
(6,105 Views)