Hello
It might be better to use the async timer for this rather than the UI timer. The UI timer runs in the same thread as the the UI so if there is alot of stuff happening in that one thread, you might start skipping timer events. It would be better to use the async timer, which also provides timer functionality, but runs in another thread. Depends on what you need.
Having said that, check out the "Programming with Timer Controls" section in the CVI help. The UI timer event callback provides you with parameters that give you data like timer elapsed since the last timer callback and the current time.
Or if you want to check out the async timer, you can go to ..\cvi\samples\toolbox\asyncdem.cws.
This is what the documentation states for the callback of the
async timer.
int CVICALLBACK FunctionName(int reserved, int timerId, int event, void *callbackData, int eventData1, int eventData2);
The first parameter of the event function is reserved. timerId is the timer that caused the callback. The types of events generated are EVENT_TIMER_TICK and EVENT_DISCARD. eventData1 is a pointer to a double that represents the current time in seconds and is relative to the start of the first timer event. eventData2 is a pointer to a double that represents the time that has elapsed since the last call to the timer callback. The elapsed time is set to zero if the callback has not been called previously. Callback data defined by the user also is passed to the event function.
i hope this helps
Bilal Durrani
NI
Bilal Durrani
NI