10-21-2018 10:08 PM
Hi,
I am not very familiar with LabVIEW. I have to collect data for a certain time. As for many softwares, when we put a certain time for a data collection session like 2 minutes for example, we have a feedback of the remaining time (numerical, slider,...) when the VI is running. The first problem is that if I want to collect data with the finit sample mode, we do not have any feedback of the data untill the collection data is finished. So, I did that with the continuous mode, but I still feel that it can be done in a better way. The second problem is to display the remaining time when the DAQ VI is running. In my example the displayed time is shorter than what is supposed to be.
If you have other solutions I will be thankfull,
Hakim
10-22-2018 01:13 AM
If your need to acquire data in the interval of two seconds, use Elapsed timer with target of 2 Minutes (Read the data whenerver the time elapse) reset the elapsed timer when the data is being read.
10-22-2018 01:53 AM - edited 10-22-2018 01:55 AM
Hi Hakim,
when we put a certain time for a data collection session like 2 minutes for example, we have a feedback of the remaining time (numerical, slider,...) when the VI is running.
Some notes:
- When reading data for a certain amount of time you should set a sample rate for your DAQmx task and read the required numbers of samples. Your DAQmx hardware works much more accurate than your Windows PC timer. (Example: with a sample rate of 10Hz you want to acquire 10S/s*60s/min*2min=1200 samples.)
- To display a time you could split your 2min data acquisition into 240× 0.5s intervals: now you can easily use the loop counter as a "time display". (Don't forget: you can easily set the display format to relative time!)