03-18-2006 12:24 PM
I'm working on a temperature control labview simulation that works with an external temperature device and I have my labview stimulation set up so that I can turn a external light on or off (which is in a chamber) and the temperature is measured inside that chamber and I displayed versus time in the labview x-y graph. I can internally turn the heat source (the light) on or off and see the waveform change. Now the information that is being displayed on the waveform is also being saved to a data file. And I noticed that as soon as I run the stimulation of the circuit on the first input into the labview while loop is from the data file. now the first execution of the simulation will start as soon as the data files sends an input into the while loop and the second execution of the labview loop will happen the next time the data file inputs something into the while loop of labview. Now, by using circuitry inside the while loop, how can I record the actual time of the initial input (into the while loop) along with the time of the second input into the loop so that I can determine how long it take for one execution in labview will take.
03-18-2006 02:55 PM
03-20-2006 02:59 AM
Hi There,
I too had the similar problem, so I used the Tick Count to measure the execution of the while loop. Just put the tick count and it's control at the first frame of the sequence and put another at the last frame of the sequence and then subtract the first tick count value from secong tick count value, this gives your loop duration in milli seconds.
-Mohan
03-20-2006 04:54 PM
03-21-2006 08:07 AM
"
One thing to keep in mind about the Tick Count VI. It uses the ms clock from the CPU which rolls over back to zero after it reaches an upper limit. You might end up getting very large negative values if you subtract the current value from the last value.
"
Once every 39 (?) days that can happen but are you sure abou the large negative thing?
I seem to remember Rolf saying that the math takes care of itself. A quick experiment confirms that memory.
Ben
03-21-2006 09:35 AM
03-21-2006 09:38 AM - edited 03-21-2006 09:38 AM
"People have always warned me about the roll over. "
That is a good note if we are comparing magnitudes.
Ben
BTW: Is that Point Park in Pgh?
I am in McMurray PA
Message Edited by Ben on 03-21-2006 09:40 AM