From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to manually save lvm file

Solved!
Go to solution

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

0 Kudos
Message 1 of 8
(3,514 Views)

Hi CamW,

 

how did you create that erranous LVM file?

 

Can you show the VI that you used for?

Seems more helpful to debug that VI instead of correcting some headers afterwards…

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(3,500 Views)

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!

 

Text Formatter.png

0 Kudos
Message 3 of 8
(3,473 Views)

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

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(3,467 Views)

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

0 Kudos
Message 5 of 8
(3,460 Views)

Hio CamW,

 

like this:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 8
(3,455 Views)
Solution
Accepted by topic author CamW

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

0 Kudos
Message 7 of 8
(3,440 Views)

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

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 8
(3,434 Views)