03-04-2008 11:33 AM - edited 03-04-2008 11:35 AM
A very flexible way of timing your code is by using a Functional Global Variable which monitors the clock of your operating system. You will first reset it and then you can measure the elapsed time.
Have a look at the attached VI on how you can implement it. Note that the error wires force the execution flow. This example counts the elapsed time between starting and stopping the VI.
KostasB
NI UK
03-04-2008 11:41 AM
03-05-2008 01:38 PM
03-05-2008 01:50 PM
Hi
There is a problem associated with using count time function, we cannot convert millisecond timer value to a real-world time or date.
Can you have a look at the code, when I run it, it shows that it takes 7996339 to complete, does it make sense to you?
03-05-2008 02:07 PM
03-05-2008 02:09 PM
Maryam hosseini wrote:
but because I am not very expert in Labview I could not. I have attached my code that I need to measure the time,
Could you have a look at it see if you can do it.
03-05-2008 02:20 PM - edited 03-05-2008 02:20 PM
Maryam hosseini wrote:
There is a problem associated with using count time function, we cannot convert millisecond timer value to a real-world time or date.
03-05-2008 02:25 PM
The code constantly need to read new time, I do not really need to use while loop because I need to read each set of data once,
I need to measure the time of the whole of the code, I mean the time that it takes the code to read data, and fit it to the model.
This one is measuring only the time of the fitting, isn’t it?
Is the returned value for the time real world value? Let's say if it says 2512 ms does it really mean it take 2512 ms to do the fitting?
03-05-2008 02:59 PM
03-05-2008 02:59 PM
Sorry I forgot to attach. This time it is attached.
Thanks