03-25-2010 09:26 AM
Hi.
I was warned some time ago about using Tick Count as basis for a while structure timeout, since Tick Count overflows every 49 days or so. Since then I've had a bad taste in my mouth about using it, and I wonder what I can do about it. I've tested a bit with comparing the Tick Count value with the wanted timeout and subtracting the timeout value from the Tick Count value if it would cause Tick Count to overflow. But the code gets to be more than a little bit messy, and not very flexible. Just see the attached VI. Does anyone have a good solution on how to get around this problem?
I found this blog article from a guy who made a 32 to 64 bit conversion VI, and it seems to be right up my ally. But I haven't been able to duplicate it since I don't recognize all the symbols (especially the little round one connected to the leftmost case structure).
Solved! Go to Solution.
03-25-2010 09:32 AM
That wanring should be interpreted such that you should not expect the value to be always increasing.
The difference between two ms tick counts will work out even durring the over-folw becuase that is the way the math works out for a U32. So if you subtract the start from teh current you can still compare that difference with another to see if a certain amout of time has passed.
Ben
03-25-2010 09:37 AM - edited 03-25-2010 09:40 AM
ojohnsen a écrit:
I found this blog article from a guy who made a 32 to 64 bit conversion VI, and it seems to be right up my ally. But I haven't been able to duplicate it since I don't recognize all the symbols (especially the little round one connected to the leftmost case structure).
It is First Call ?
You can use Get Date/Time in seconds for applications that must run for a long time.
03-25-2010 09:46 AM
Try this simple exercise.
Do you still see any need for extra code?
03-25-2010 09:51 AM