LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HOW CAN I CUSTOMISE LVM FILE (PLZ LOOK INTO ATTACHED FILES)

Hi all ,

I would like to customise my lvm file ,with reference to the attached WRITE TO LVMFILE.vi , there are 4 channels are there set p1, set e1, set Nr, set Ng ,similarly i have 4 more channels read p1,read e1, read Nr,read Ng.
if i run the vi it will prompt to save to a file name (say TEST.LVM), Since the TEST.LVM which conatins plenty of unwanted data ,iwant to customise like below format along with colomun headers as below.

LabVIEW Measurement
Writer_Version 0.92
Reader_Version 1
Operator Rajesh
Date 12/8/2004
Time 10:03.0
Channels 4
Test NUM 1
Test Trails 00001

SET P1 READ P1 % ERROR SET E1 READ E2 ERROR SET Nr READ Nr ERROR SET Ng READ Ng ERROR
1 0 -0.01 2 0 -0.02 20 0 -0.2 40 0 -0.4
1 0 -0.01 2 0 -0.02 20 0 -0.2 40 0 -0.4
1 0 -0.01 2 0 -0.02 20 0 -0.2 40 0 -0.4
1 0 -0.01 2 0 -0.02 20 0 -0.2 40 0 -0.4
1 0 -0.01 2 0 -0.02 20 0 -0.2 40 0 -0.4
1 0 -0.01 2 0 -0.02 20 0 -0.2 40 0 -0.4
1 0 -0.01 2 0 -0.02 20 0 -0.2 40 0 -0.4
1 0 -0.01 2 0 -0.02 20 0 -0.2 40 0 -0.4
1 0 -0.01 2 0 -0.02 20 0 -0.2 40 0 -0.4
1 0 -0.01 2 0 -0.02 20 0 -0.2 40 0 -0.4
1 0 -0.01 2 0 -0.02 20 0 -0.2 40 0 -0.4
1 0 -0.01 2 0 -0.02 20 0 -0.2 40 0 -0.4
1 0 -0.01 2 0 -0.02 20 0 -0.2 40 0 -0.4

CAN ANY ONE SUGGEST ME WHAT CHANGES I HAVE TO MAKE IN MY PROGRAMME SO THAT I CAN GET FILE AS ABOVE FORMAT

REGARDS
RAJESH
0 Kudos
Message 1 of 4
(2,994 Views)
You could modify the Write LabVIEW Measurement function. You can right click on it and select Open Front Panel. This will convert it to a regular VI. Then you would have to go in a modify it and a lot of it's subVIs making sure to save everything as a new name. This can be quite a daunting task. The hierarchy is pretty big. Then, wehn you're done, you don't have a "real" lvm file that can be read by the Read LabVIEW Measurements File function. This might only be a problem if you share your new lvm file with a different LabVIEW user. You could also modify Export Waveforms To Spreadsheet File. The simplest thing to do is to forget about the built in lvm function and write your own text file save function. Your header can be created by creating a string with the Format Into String function and passing the result to Write Characterers to File. The data can be created by using Write to Spreadsheet File and appending it to the header. This is the way it was done before NI. There are a lot of shipping examples that use file I/O. You might want to do a search for "file" to see how some of the lower file I/O functions can be used.
Message 2 of 4
(2,962 Views)
Hey Guys!

Great answer by Dennis! To explain a bit further, the LVM Express VIs are intended to be super easy and not necessarily the most customizable for the user. If you have a specific format that you are trying to conform to, the best way would be to use the File I/O VIs in the File I/O functions palette. These functions will allow you to read and write to files in anyway you choose. I've attached an example VI (written in LV 7.0) that will show you how easy it is!

Hope this helps!

Travis H.
Application Engineer
National Instruments
Travis H.
LabVIEW R&D
National Instruments
0 Kudos
Message 3 of 4
(2,939 Views)
Hi TARVS ,

IAM REALLY THANKFUL TO YOU ,AT LAST I BUILT A GOOD FILE WITH ALL HEADERS , THANKS FOR YOUR SUPPORT.

With best Regards

RAjesh
0 Kudos
Message 4 of 4
(2,931 Views)