Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations SSS148 on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scan from String Error 85

Status
Not open for further replies.

YoungTurk

Mechanical
Jul 16, 2004
333
Hi,

I'm trying to use LabView to process some data. The data, although it was collected via labview, has been written out to csv file format. I have been able to successfully open the file and use the search split string function to remove the "header" from the data stream. Now I'm trying to parse the header to extract some pieces of the info that is there. I'm trying to do this with the Scan from String VI.

So far I've been able to retrieve the specimen ID from the first line of the header by setting the format string input of Scan from String as "Specimen ID ,%s", which works just fine. Problem is, when I adjust the format string to include the next piece of data I want, I inevitably get an Error 85, which is a failed scan.

The only differences (so far as I can tell) between the first line and the following lines are 1)I somehow created the file with a space in front of the rest of the labels, i.e. " Test Date" as opposed to "Test Date" and 2) the types of data after each label vary, i.e. after the comma following the " Test Date" label the entry is 5 17 2005 12:21PM, other labels are followed by integers or decimals, or in one case nothing at all.

So, why is the Read from String VI failing me? Is it because the string contains an EOL? Alternative / suggestions are greatly appreciated. Here is an example header, in the interest of completeness:

Specimen ID , 219T1-2
Test Date and Time , 5 25 2005 3:41PM
Dynamic MOE (GPa) , 6.82
Static MOE (GPa) , 0.00
Static Load (N) , 0.00
Static Deflection (mm) , 8.09
Input Properties
Total Length (mm) , 253.70
Clamped Length (mm) , 51.15
Base Width (mm) , 50.53
Thickness (mm) , 2.84
Mass (g) , 39.19
Sample Count , 3000
Set Rate (Hz) , 1000
Actual Sampling Rate (Hz) , 1000
Detected Frequency (Hz) , 28.09

Thanks in advance.
TechTurk
 
Replies continue below

Recommended for you

Are you sure your string contains all the lines of the header or just the first line (specimen ID). You could wire the string to an indicator to see what is in it. EOL could be terminating the string.

Wheels within wheels / In a spiral array
A pattern so grand / And complex
Time after time / We lose sight of the way
Our causes can't see / Their effects.

 
Yeah, I'm sure. I actually did exactly that and then did a copy paste from the indicator to get what you're looking at.
 
You need to include the leading space in the format string. Without it I replicated err85, with it no error but I only got the 1st char of the date/time returned (5) since I didn't use the proper format string.

Wheels within wheels / In a spiral array
A pattern so grand / And complex
Time after time / We lose sight of the way
Our causes can't see / Their effects.

 
Well, analogkid2digitalman, I'm appreciating your help here, but I'm still getting err85 with or without the space. I've gone so far as to create a new VI, paste that header in as a text constant, and then try the Scan VI. As simple as they come, but I get the exact same error.

I just decided to give this a go: Here's my VI, if you're willing to give it a shot directly.

FTP site:

ftp://ftp2.fs.fed.us/incoming/fpl/

login/password are anonymous/password

Folder is Turk, VI is called scan, its very small.
 
YoungTurk:

I can't do FTP through our firewall.
Come over to the DAQ side, try posting at:


You'll have to register some basic info, a very good resource.

Wheels within wheels / In a spiral array
A pattern so grand / And complex
Time after time / We lose sight of the way
Our causes can't see / Their effects.
 
Hey, I didn't realize that there was such a good forum over there. I swear NI must've hidden it when I went looking for LabView forums awhile back.

Õ¿Õ¬
(O)


See you there!

BTW, others feel free to continue to add posts here, I'll keep track of both threads.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor