12-01-2009 03:32 AM
Hello,
I created a vi to control a instrument such rotating mechine. But I had a problem in the storage file. I would like this vi can save the file in the form of *.dat (series files) with automatic. I've tried using the write to measurement file.vi but didn't help. because it can't save files in the form .* dat.
Otherwise, the file name saved not the desired result. like the picture below.
I want to create a file with a name: dd/mm/yyy-00: 00:00.000. dat ....
I would like to leave this instrument until I hit a stop button to turn off the instrument or a full hard drive capacity. (as long as I left the instrument, vi will continue to ssave like a file above).
Sorry if repost. but I can not find the answer from the previous similar post. .
Thank you before,
regard,
angga
12-01-2009 03:46 AM
Hi,
Why do you need to use .dat as file format?
Christian
12-01-2009 03:58 AM
angga,
dat is no predefined file format. So essentially dat could be any file format starting from pure ASCII text file down to binary file. If you do not know the exact make up of the desired file format, you cannot save any data as dat to your advantage.
You can save any file as dat (using the file IO primitives) simply by naming the fileextension "dat".
That being said i doubt that you can manage to save the file in the intended format succesfully by simply "renaming" the file to be *.dat.
hope this helps,
Norbert
12-01-2009 04:44 AM - edited 12-01-2009 04:53 AM
Thanks for answer.
I'm using daqcard_6024E to get Data Acquisition.
I've tried using the datalog function. but, I have no idea, how to create a file with a name: dd/mm/yyy-00: 00:00.000. dat ....
Cause I would like to leave this instrument until I hit a stop button to turn off the instrument or a full hard drive capacity. (as long as I left the instrument, vi will continue to ssave like a file above).
Sorry if I ask basic questions. Coz I newbie.
12-01-2009 04:59 AM
As i wrote before, simply use the file IO primitives and pass a filename with .dat as extension.
But keep in mind that dat is no predefined fileformat, therefore you will need a dedicated (self written) program to read your files!
Norbert
12-01-2009 05:26 AM
Ok. thanks for helping me.. I'll try it.
regard,
angga