LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using scan from string

Hi

 

I am reading a string from an instrument in the format hr:min:sec, 0.000, 0.000, 0.000,0.000

I need to separate each part and add it to an excel file. I have triend scan from string and

string subset. I am unable to use scan from string as the first output is in different format than the others.

I cannot use string subset as the value changes to a negitive value sometimes which makes it difficult to get the right string lenght.

Can someone help me in figuring out the best way to split the string and add to an excel file

 

Thank you in advance

Raghu

0 Kudos
Message 1 of 20
(4,096 Views)

Do you have an actual string that you can attach?

Tim
GHSP
0 Kudos
Message 2 of 20
(4,093 Views)

I am reading it from Visa read buffer

0 Kudos
Message 3 of 20
(4,088 Views)

Can you read one into a string and save it ina control or indicator, Text file etc... ?

Tim
GHSP
0 Kudos
Message 4 of 20
(4,086 Views)

Yes. I can read and save as an indicator

0 Kudos
Message 5 of 20
(4,073 Views)

Save it as an indicator with the default value and post it here and I will see what I can do for you.

Tim
GHSP
0 Kudos
Message 6 of 20
(4,067 Views)

Well, then why don't you do so?

 

Or, run the VI and get a screenshot of the result. Post it. Note: DO NOT UPLOAD BITMAPS, AND DO NOT RENAME BITMAPS TO TRY TO GET AROUND THE BAN ON BITMAPS.

0 Kudos
Message 7 of 20
(4,066 Views)

I could not paste the screen shot.

 

Here is the indicator value

 

12:02:07, 0.002, -.---, -.---, -.---,

 

in  the mean while i am trying to upload screen shot.

 

Thank you

0 Kudos
Message 8 of 20
(4,050 Views)

As much fun as it is to parse strings, Excel is perfectly happy reading comma separated values, and simply appending those strings to a text file should work.  Name it 'whatever.csv' and you should be good to go.

0 Kudos
Message 9 of 20
(4,055 Views)

Here is the screen shot after I ran the vi. Along with copying the data to an excel sheet I need the individual data to use in my program later.That is the reason I wanted to parse the string.

 

Thanks,

Raghu

0 Kudos
Message 10 of 20
(4,020 Views)