01-24-2014 06:12 AM
Hi everyone, I've been using this forum for a while, but so far have never had a question I couldn't find an answer to.
My question is, how do I go about manually saving my data to an lvm file so that it can be properly read by labview?
I have looked through this guide and have attempted to correctly format my file. However, I just can't get it to work, I always get this error when I try to read the file;
"Error 100: File contains erroneous data. This normally is a user data file."
If I copy and paste the header from a functioning file, the file can be read, so the header is the problem.
My header is as follows:
LabVIEW Measurement
Description VI Test
Writer_Version 2
Decimal_Separator .
Time_Pref Absolute
Operator User
Date 2014/01/24
Time 12:03:14.2892
***End_of_Header***
***Start_Special***
Microphone S/N: ABCDEF00
Radial Accelerometer S/N: ABCDEF00
Axial Accelerometer S/N: ABCDEF00
Tangential Accelerometer S/N: ABCDEF00
Pressure Sensor S/N: ABCDEF00
***End_Special***
Channels 6
Samples 12500 12500 12500 12500 12500 12500
Date 2014/01/24 2014/01/24 2014/01/24 2014/01/24 2014/01/24 2014/01/24
Time 12:03:14.2892 12:03:14.2892 12:03:14.2892 12:03:14.2892 12:03:14.2892 12:03:14.2892
Y_Dimension Volts
Y_Unit_Label Volts Volts Volts Volts Volts Volts
Delta_X 0.00002 0.00002 0.00002 0.00002 0.00002 0.00002
***End_of_Header***
Does anyone know where I might be going wrong?
Cam
Solved! Go to Solution.
01-24-2014 06:54 AM
01-27-2014 02:01 AM - edited 01-27-2014 02:04 AM
Hi GerdW,
I tried producing the data using the attached subVI, which creates a single concatenated string, or by copying the data from a functional lvm file into a single string constant, and neither seem to work for me.
If there is a better way to do it, I would be very interested, my way is quite convoluted!
01-27-2014 02:06 AM
Hi CamW,
to create LVM files you should use the appropriate functions.
Creating the file "manually by concatenating strings" will fail without proper understanding of the file format!
Btw. all those big ConcatString functions can be replaced by FormatIntoString with some proper format string...
01-27-2014 02:28 AM
Hi GerdW,
Thanks for your help, could you give me an example of how I could format the string to save space?
I am not sure how to insert tabs or returns into the format string, and without that I don't see how I can simplify it.
Also, you say that the proper functions should be used, could you give an example of which functions you mean?
Cheers,
Cam
01-27-2014 02:33 AM
01-27-2014 06:16 AM
Hi GerdW,
Thanks for that, you would think that the backslash formatting codes would be listed on the FormatIntoString help page.
It turns out I had missed out the 'X0' line from the original header, as adding that, along with using FormatIntoString has fixed my problem and made my lvm files readable.
Cheers,
Cam
01-27-2014 07:08 AM
Hi Cam,
as the "\-Code" is a property of the string constant (and not the FormatIntoString function) you find the explanation in the help for the string constant…