LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Headers in Write LVM File Express VI

I’d like to change the headers in the Write Labview Measurement Express VI. Basically I’d just like the headers to be just an updated current time and date. I have seen here a way to change them, but it seems rather complicated. I am still rather new at using Labview and would like to keep the Express VI since it easy to use. I was not sure if anyone else has created a VI similar or along these lines. I’m using Labview Express 7. Any help anyone could provide would be much appreciated.

Thanks…

e-mail at: haffey811@aol.com
Using Labview 7.0 and 2010 SP1 with Windows XP and 7.
0 Kudos
Message 1 of 18
(3,564 Views)
The express VI's are designed to be simple and easy to use. The trade-off for this benefit is lost flexibility. I'm afraid there's no way of manually configuring the header without modifying the express VI itself, as outlined in the KB Programmatically Define the Description Terminal of a LabVIEW Measurement (LVM) File, which I assume you are referring to.

If you want more flexibility with file I/O, I suggest you use the lower-level file I/O functions and the file I/O palette rather than the LVM Express VI. They are not much more difficult or complicated to use, depending on what you are doing. There are numerous examples in the Example Finder illustrating different techniques for saving data to disk.
Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 2 of 18
(3,549 Views)
Thanks for replying. I figured that I would ahve to use th eother saving options. Would you mind showing me how I could do this? All I really need I think is to have headers that include a current (and updated) time and date, this information would also need to be in the file name possibly also, and the files would be eiher saved or not saved depending on the stat eof a boolean button on the front panel. I can attach a portion of my vi if you need anything on my side. I only ask this because I have tried using the other options before, but I didn't have much luck with getting the headers to work correctly. I'm not too sure what I was doing wrong.

Thanks for your help....

email at: haffey811@aol.com
Using Labview 7.0 and 2010 SP1 with Windows XP and 7.
0 Kudos
Message 3 of 18
(3,541 Views)
Go ahead and post your code so I have a better idea of what you are trying to accomplish and can make the appropriate suggestions. What kind of data are you saving? How are you going to be reading this back? Exactly what format do you want it in? For the header information, you just want the date and time the file was written? You also want this information in the file name?
Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 4 of 18
(3,532 Views)
I've attached a zip file that contains three pictures of part of my code with the saving part of the code that has the Express vi for saving. The data I'm saving are spectrum from a spectrometer. At a later time the data will be processed using Excel or some other time of spreadsheet program, so I'd need the file to be a text file. I'd also like the option of appending the file or being able to save it at the press of button, as I have in one of my programs now. Another option that goes along with this would be to add comments as a header besides the date and time I mentioned earlier.

Let me know if you have any trouble with my code and/or attachments.

Thanks again for your help and response.
Using Labview 7.0 and 2010 SP1 with Windows XP and 7.
0 Kudos
Message 5 of 18
(3,517 Views)
There is an example that ships with LabVIEW called "Using Spreadsheet Format.vi". I made some slight modifications to this example to match your 2D array data and add the header and attached it below. Please let me know if this works for you, or if you are looking for something different.
Robert Mortensen
Software Engineer
National Instruments
Message 6 of 18
(3,505 Views)
I've tried that out briefly and it's close to what I need. However, there are still a few things I'd like to try and add and still have questions and need help on. I'm not sure how to add the updated and correct date and time stamp as a header and in the file name. Also I'd like the option to save data when I want to via a boolean button like I had with the LVM. I only want this because this suits great for the application that I will use my vi's in. Also when the data is imported to a spreadsheet program it runs across in one row, not in a column like I had in the LVM, I'm not sure if this is just a matter of a string constant somewhere.

I'm not sure if what I mentioned above is able to be handled by the other functions or not. In the LVM my main concern dealt with the data and time. For some reason it wasn't being displayed in a normal format like xx/xx/xx or hh:mm:ss for example. It was all in a decimal form. I used Axum to import my LVM files and the date and time headers were not being displayed right, however in Excel it seemed to be. I'm not sure what might cause this problem. I'd still like to remove those other headers though. And the timestamp in the file name seemed to update very fast not on normal time (pc clock time or any regular clock time). If I saved multiple files in a minute they file names didn't reflect this, it updated the names as if minutes had gone by. I wasn't sure if this could be fixed in the manner I had found earlier. If so I'd need some guidance on how to fix these issues in the "new" LVM.

Thanks for your help, I'll keep working at the code and see if I can get things to work.
Using Labview 7.0 and 2010 SP1 with Windows XP and 7.
0 Kudos
Message 7 of 18
(3,491 Views)
Here's a modified version of the VI. You can specify whatever format you want for the date and time; you can even add it to every line of data if you want. Is this any closer?
Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 8 of 18
(3,485 Views)
Thanks a lot. That's pretty close to what I need. I'm making some slight modifications and changes elsewhere. I still have one question though. Before the data was displayed going down, now when I import it to Excel for example it is displayed going acorss. Is there a way to fix this in Labview. Also I had an x column that provided channel numbers for example and this doesn't seem to show up now whne I save the data as opposed to it did before with the LVM. Any suggestions how to fix that also?


Thanks for all of your help, I really appreciate it.
Using Labview 7.0 and 2010 SP1 with Windows XP and 7.
0 Kudos
Message 9 of 18
(3,473 Views)
I appended integers to the front of the data for the channel names (you'll have to mess with the strings if you want this in any other format). To change the direction of the data in the spreadsheet I simply transposed the 2D array before converting it to string.
Robert Mortensen
Software Engineer
National Instruments
Message 10 of 18
(3,469 Views)