LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How record exact time and data

Now I have labview and DAQ card E6251, I want to get data and exact time together and then write them to file. Would you like to give me some sample VI or suggestion?
 
Thanks,
0 Kudos
Message 1 of 7
(5,922 Views)
If you use the DAQ Assistant, then the default data type returned includes a time stamp. If you use the lower level DAQmx functions, then you just have to make sure that the data type you request is a waveform. This includes a timestamp as well. Using The Write LabVIEW Measurement File or Export Waveforms fot Spreadsheet File are just a couple of the ways to save data. Both will write the time data to the file though in slightley different formats. The place to start is with the shipping examples.
0 Kudos
Message 2 of 7
(5,909 Views)

Thanks. Now I need to calculate velocity with acquisition data. my velocity is on the order of magnititude of  ms.  the resolution can be guranteed? According to data written to file, the interval time is equal. Actually it is possible?

and I can get absolute time stamp?

 

Thanks,

 

Sean

0 Kudos
Message 3 of 7
(5,888 Views)
The interval in the lvm file is equal to the dt that you use with the DAQ Assistant. I just did a quick test to verify and the dt was reported with us resolution using the Write to LabVIEW Measurement File function. You have no posted your code or details on how you are using the DAQ Assistant. To get reliable timing from the DAQ you should be using hardware timing. The Write LabVIEW Measurement File places the absolute start time in the header. The Export Waveforms to Spreadsheet File places the absolute times in a column. I believe that there is a modification to one of the subVIs needed in order to get ms resolution. You can also create your own file write function if you don't like the way the high level functions work.
0 Kudos
Message 4 of 7
(5,866 Views)
If you need good accuracy in your time increment, you probably want to avoid any text file formats that you have not specified the format. You can very easily lose resolution.  Try one of the binary formats (e.g. TDMS or HWS) instead.  You will get better performance, as well.  However, you will not be able to trivially read it into Excel or some other spreadsheet.
0 Kudos
Message 5 of 7
(5,835 Views)
Hello,
 
I am newcomer. also I am new to Labview. Now I need to use it. So I want to know how to use hardware timing to get the exact time.
 
 
Thanks,
 
Sean
0 Kudos
Message 6 of 7
(5,693 Views)
 Hi Sean,

 The place to start with data acquisition and LabVIEW is the NI Example Finder.

 This can be found by the following method:
   1. Run Labview
   2. Click the Help menu button
   3. Click the Find Examples button
   4. On the right hand side; Click Hardware Input/Output->DAQmx->Analog Measurement->Voltage->Cont Acq&Graph Voltage - Write Data to File (TDMS).VI

When this example runs, click the Physical Channel drop down menu near the upper left hand corner on the front panel, select your
   physical channels to sample.
Click the Run button to begin acquiring data, a dialog box will prompt you to enter a filename and location for saving the TDMS file.

When you stop the acquisition the TDMS File Viewer will open the file for examination.

After playing with this example for a bit, please re-read the comments that Dennis K. and others have made earlier in this thread, everything will make more sense at that point.

Please post back to this thread if you do have further questions regarding your application.

Best regards,

MatthewW
Applications Engineer
National Instruments


Message Edited by Matthew W on 08-29-2007 09:20 PM

0 Kudos
Message 7 of 7
(5,650 Views)