cancel
Showing results for 
Search instead for 
Did you mean: 

using scan from string

raghu670
Member

using scan from string

Message contains an attachment

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

19 REPLIES 19
aeastet
Trusted Enthusiast

Re: using scan from string

Do you have an actual string that you can attach?

Tim
GHSP
raghu670
Member

Re: using scan from string

I am reading it from Visa read buffer

aeastet
Trusted Enthusiast

Re: using scan from string

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

Tim
GHSP
raghu670
Member

Re: using scan from string

Yes. I can read and save as an indicator

aeastet
Trusted Enthusiast

Re: using scan from string

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
Knight of NI

Re: using scan from string

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.

raghu670
Member

Re: using scan from string

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

Darin.K
Trusted Enthusiast

Re: using scan from string

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.

raghu670
Member

Re: using scan from string

Message contains an attachment

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