LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Chronometer for runtime in one interaction

 

 

I'm working on a VI for data acquisition with DAQmxRead inside a while loop consisting of only one interaction that lasts a few seconds. I would like to insert a chronometer to display the spending runtime on the front panel - how? I have searched for examples but all use the number of samples measured connected in every interaction, with the sampling frequency and a counter initialized to zero to show the time .... But like I said, my application consists of only one interaction lasting a few seconds ... any help would be really appreciable?

Hello!

 

 

/s/

FGF

0 Kudos
Message 1 of 8
(2,826 Views)

You can try using the system clock reading when the read starts & when it finishes. You can initialize it to 00:00:00 before read starts.

0 Kudos
Message 2 of 8
(2,819 Views)

Thank you kekin. I've tried that.

The problem is that it shows the time only after finished the interaction...

And I'd like to see the time running on the front panel during this interaction execution.

Capite? Any sugestion?

0 Kudos
Message 3 of 8
(2,806 Views)

If possible, please send an example vi.... thanks!

0 Kudos
Message 4 of 8
(2,805 Views)

"While"

 

The word "while" is one of those words I look for when reviewing specs because each "While" introduces a potetial parallel task. Each task has to be started and stopped etc. and that adds complexitiy to the application.

 

You are asking for a clock to be updated WHILE the I/O is taking place. This implies having a seperate loop updating the clock WHILE the I/O is active. So you have a need to start the background taks when the I/O starts and stops when the I/O completes. So...

 

Search this site for the design patterns "Maste Slave" or Producer Consumer to gt an idea how to run paralle tasks and communicate between them.

 

If you get stuck, post IMAGE of your code along with the code itself and someone here should be able to offer more suggestions.

 

Just trying to help,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 8
(2,796 Views)

Thanks Ben.

 

If a solution emerges, i'll share here.

anyway still opened to sugestions.

 

FGF

0 Kudos
Message 6 of 8
(2,785 Views)

an other could be to cut your code (if possible) as fine enough <100 ms each step

 

so that the chronometer  looks like independent

 

regards

 

Tinnitus

 

 

 

 

CLAD / Labview 2011, Win Xp
------------------------------------------------------
Mission d'une semaine- à plusieurs mois laissez moi un MP...
RP et Midi-pyrénées .Km+++ si possibilité de télétravail

Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
Don't forget to valid a good answer / pensez à valider une réponse correcte
0 Kudos
Message 7 of 8
(2,769 Views)

Yes Tinnitus, it is a possibility.... i'll try it.

Thanks!

FaFe 

0 Kudos
Message 8 of 8
(2,761 Views)