LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

search string and convert to 32 bit real or 8 bit integer

Solved!
Go to solution

I was hoping to get some advice about how I might search the following string and convert to a real number or integer.  The following data is output as ascii characters from a device and I would like to search for the times in each line (starting with 7699.72 seconds in this case) and convert each to a real number.  Alternatively, I would like to search for the integer values in each line (0 but could be 1,2,10,12, etc) and convert to an 8 bit integer.  I think using the Match Pattern followed by Scan from String VIs would be what I need but am not quite sure how to match in each case. Thanks!!

<CL>  7699.72       0

<CL>  7699.74       0

<CL>  7699.76       0

<CL>  7699.78       0

0 Kudos
Message 1 of 4
(3,150 Views)
Solution
Accepted by jjsword

What characters are in the white space between the <CL> and the numbers?

 

Scan From String can probably do what you want.  Note that in the image whitespace characters include spaces, carriage returns, line feeds, and tabs.

 

Lynn

 

Scan From String.png

Message 2 of 4
(3,138 Views)

I am fairly sure those are spaces.  Appears I made things way more complicated than necessary.  Thank you.

0 Kudos
Message 3 of 4
(3,126 Views)

Thanks are given with kudos and marking solutions as answers to your question.

0 Kudos
Message 4 of 4
(3,070 Views)