03-22-2010 08:45 PM
Hi, everyone. I would like to ask a question. During execution of program, which includes connection with devices through USB cable, data has to be transferred to the program for users' data operations. However, if the data comes and disappears too fast, we can't see execution of the program and thus we add a time delay to the program.
I am trying to obtain time signals from a GPS receiver, are there way(s) to cancel out the effect due to the additional time delay I had put into the program to facilitate the operation of the program? I had thought of putting a defined "counter" to count number of times the program operates, and trying to multiply readings of counter with time delay set, which then adds back to the displayed time to weigh out the effect. Is this a possible solution? If not, can any one make suggestions to me? Thank you for all your help.
Regards,
yukfai88
03-23-2010 11:50 AM
03-26-2010 06:52 AM
Hi Yuk,
I think i sort of know what you are after. If you post what you have so far i can take a look and better answer your question.
Lucither
03-26-2010 10:06 AM
Hi, Michelle and Lucither.
My program includes a while loop to continuously send data to my computer from the GPS receiver, as attached in the vi. Currently, I find that when i don't put time delay to the program, by checking the indicator (called Byte Waiting) output, there is no byte waiting to be transmitted to the algorithm.
But, when I add a time delay of 100ms, the indicator starts to display values like 25 bytes and it will eventually drops down to zero for some time, again and again. This indicates that there are once bytes delayed inside the property node. As there are bytes delayed in the node, the effect of my adding of time delay of 100ms can not be cancelled. As seen from my program, are there ways to spot out the effect of the time delay from the program, and monitor its real-time value by working on, for example, the Byte Waiting?
Thanks a lot. I have been persecuted by the approach to do this for a long time already...
Best Regards,
yukfai88
03-26-2010 10:54 AM
Hi yukfai,
to measure execution time you usually make a (flat) sequence around your part of code to be measured. In the frame before you take a timestamp, in the frame after too and the calc the difference to get the execution time. You can do this at every interesting part of code...