LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

save data continuously in a certain format

Hi,

I'm new to labview and I have two questions at the moment...

1). I'm trying to save a continuous time history data at certain interval (let say every 30 minutes or 1 hour). How can I do that?.

2). Another thing, I'm trying to create a vi so that I can choose the type of data to be saved (like a pull down menu for the user to choose from.. eg. ascii, binary, text etc...). Is is possible to do this?...

Thank you in advance...

Zainah
0 Kudos
Message 1 of 5
(2,965 Views)
1) inside a loop use:
- Get Date/Time String.VI to obtain the date and time
- Concatenate Strings.VI to add separators (for example End Of Line after TIME and a space between DATE and TIME)
- Write Characters To File.VI to save obtained string (use APPEND = true)
- Wait.VI or Wait Until Next ms Multiple.VI (more accurate) for your delay
- do not forget the end condition for the loop

2) it is possible ... use a Menu Ring Control wired to a CASE structure and insert different file related operations in each CASE according with selected item in menu. Also, you might want to put the menu ring inside a loop (block diagram) in order to be able to decide the moment of saving data to file

Finally, take a look in lv folder\examples\general and \examples\file\
to have some guidelines.
good luck
Message 2 of 5
(2,965 Views)
Hi,

Thanks Lab Viewer... for your suggestions... I'll try them... (in the process now..)

Thanks again...
0 Kudos
Message 4 of 5
(2,965 Views)
Regarding your 2nd question, I can mention an alternative method I use these days. I had the same problem some weeks ago and Brian Vibert solved my problem with a very nice VI!!! I modified it to fit my needs and I attached it to this message.

Run the Test.vi that will call up the SaveAsTypev2.vi which basically is the standard "save as" dialog with a drop-down menu of file formats that you can specify your self.

Hope this helps. /Mikael
Download All
Message 3 of 5
(2,965 Views)
Hi,

Thanks Mikael....
0 Kudos
Message 5 of 5
(2,965 Views)