LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dating a sample?

Hello,

I would like to date my samples when I store it in a file.
In my process, an iteration is the measurement itself and then the data transfert.
I'm sure that an iteration is done in less than 1s and around 30ms.
To be sure, I set a sample period of 1100 ms between each measurement.

The problem is :
Elapsed time between each sample in the file is not constant. Why?
For example :
Date               hour            min      sec,ms         elapsed time
28/07/2008 17 2 18,671
28/07/2008 17 2 19,765 1,094
28/07/2008 17 2 20,859 1,094
28/07/2008 17 2 21,968 1,109
One time, it's 1,094, the other time, it's 1,109...

I used the VI "wait" as a timer. (I linked 1100 on the input of course)
So, in the same time, a make a request for the measurement and the timer runs. Am I right?

Thank you for your help.

PS : If you don't understand my question, I can translate in french and it could be easier for me to explain 😉


0 Kudos
Message 1 of 6
(3,374 Views)
Yes in French !! There is a special forum for French guy ..
http://forums.ni.com/ni/board?board.id=4170

Anyway, did you try to remplace : wait with wait until next multiple ?
0 Kudos
Message 2 of 6
(3,371 Views)
You are trying to use software timing, so the timing will be off during some iterations regardless of which delay function you use. There is no way around this because it's a fundamental software-timing limitation, and it is not restricted to LabVIEW. If you must have precise timing like that you should be collecting your data using a hardware-based device or use a Real-Time OS.
0 Kudos
Message 3 of 6
(3,363 Views)
My english is so bad? Sorry... Smiley Surprised

I already used this VI but it's the same result.

28/07/2008 17 20 31,109 1,094
28/07/2008 17 20 32,218 1,109
28/07/2008 17 20 33,312 1,094
28/07/2008 17 20 34,421 1,109

0 Kudos
Message 4 of 6
(3,357 Views)
Ton anglais est tres bien.  Cependant, tu ne sembles pas avoir compris ce que smercurio essaie de t'expliquer.  Tu peux nous montrer ton code afin qu'on puisse confirmer ce qui se passe a l'interieur du code.
 
Back to English:
 
Smercurio explained it well.  The results that you see may not be meaningful depending on how you implemented your code and on how precise you want the datestamp to be.
 
Since Labview uses a dataflow model, and executes as soon as data is available, you may have an instance within your code where two portions can execute at the same time (all data is available), so whichever fires first may impact on when the time sample is taken.  Furthermore, the precision of the timestamp is affected by a non-precise OS (windoze).
 
R
0 Kudos
Message 5 of 6
(3,319 Views)
sorry, I had not seen the previous message.
A real-time system like LabView RT or Tornado is too expensive. So, actually, it doesn't matter if my dating is not precise. I'll be able to apply my functions anymore.
Something I noticed : when my sample period is 2s, no problem! Dating is accurate.

Thank you for your help!
0 Kudos
Message 6 of 6
(3,280 Views)