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,753 Views)

Hi

 

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

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

Example_VI_BD.png

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


0 Kudos
Message 3 of 10
(6,741 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,734 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,729 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,724 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,715 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,709 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,703 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,694 Views)