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
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