LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a timer function that works like a watchdog?

User is allowed to input a set of simple instructions, similar to assembly language. While user executes his instructions, i would like a timer to start at the same time and stop the execution after a certain time. This is to prevent the user from being stuck in an infinite loop.

I have tried using the CVIcallback timer but that only seems to work after user has finish his execution. Is there any other way to solve this?

thanks

cheers
Al
0 Kudos
Message 1 of 4
(3,379 Views)
Timer callbacks, the same as user actions on UIR controls, are processed only if your program does permits this: to do so, you can add ProcessSystemEvents () instruction regularly in your code, so to let the system process all pending events of your application. Look at the on-line help for that function for some more details on this.

Another way of firing events at regular interval can be to use an asyncronous timer, using the AsyncTimer instrument shipped with CVI: this timers are executed in another thread and rely on multimedia timers which have higher priority in the system, so their action is never interrupted.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 4
(3,375 Views)
Thanks,

i'll take a look at the asynchronous timer....

Regards
AL
0 Kudos
Message 3 of 4
(3,343 Views)
I would second the recommendation to use AsyncTimer. It is a much more reliable way to ensure that something will actually occur at the desired interval.
Martin Fredrickson
Test Engineer

Northrop Grumman
Advanced Systems and Products
San Diego, CA 92128
0 Kudos
Message 4 of 4
(3,325 Views)