LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing data to a .lvm file

I have an application that creates a file using the �Open/Create/Replace File.vi�. Then it makes a lot of data acquisitions and, when I press a Log botton, it record the three last data to this file already created. I�ll open this file with the DiaDEM, so, I�m using the Express VI �Write LabVIEW Measurement File� that�s creates a .lvm file. The question is: how can I use the path and file name created by �Open/Create/Replace File.vi� to open the Express VI �Write LabVIEW Measurement File�? And taking advantage of this, there is already a VI that creates files with a .tdm extension?

Any help is appreciated.
0 Kudos
Message 1 of 5
(4,098 Views)
- I understand that your application puts out one file that contains data you want to read in DIAdem. In that case, you don't need "Open/create/replace", because "Write LabVIEW Measurement File" does the whole job of opening a file, writing data to it and closing it. Use the configuration dialog of the Express VI to define whether the file is overwritten, renamed, etc. You can also wire a path to the Express VI to determine the target file programmatically.

- LabVIEW 7.1 includes the Storage VIs that write to the TDM file format. Look at the examples in \examples\file\storage.llb for more details.
0 Kudos
Message 2 of 5
(4,098 Views)
Hi Herbert, thanks for your answer.

I know that "Write LabVIEW Measurement File" opens, writes data and closes the file. I used "Open/Create/Replace" cause, in this step we create the file using some standard conditions. If some conditions won't be satisfieds, the file won't be created. This file will be created just one time. So, Write LVM File is another step in the end of the VI and don't depends of "Open/Create/Replace.vi"
0 Kudos
Message 3 of 5
(4,098 Views)
You might want to replace "Open/Create/Replace" with another "Write LabVIEW Measurement File" then. That will create an LVM file with no data in it (as opposed to an empty file). The second Express VI should have not problem appending data to this file. Instead of connecting both VIs with a file refnum (like you would for traditional file IO), just use the same path for both.
0 Kudos
Message 4 of 5
(4,098 Views)
Hi Herbert, thank you again.

OK, but in my VI, the "Default Name" to initialize the "Open/Create/Replace.vi" is created like a string. To initialize the "Write LabVIEW Measurement File" VI it's needed a path in the "File Name". How can I create it, cause I used the Converter "String to Path" to initialize this Express and it didn't work?
0 Kudos
Message 5 of 5
(4,098 Views)