LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display the Elapsed Time

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

0 Kudos
Message 1 of 3
(2,565 Views)

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.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 3
(2,538 Views)

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!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 3
(2,535 Views)