LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Timer Enable&Disable vs. Resume&Suspend?

Hello?
I'm using LabWindows/CVi 6.0.
What is the different between Timer Enable & Resume?
And Disable & Suspend?
Please Help me.
Thank You.
0 Kudos
Message 1 of 4
(3,766 Views)
Hi...
On the face of it, apparently not a lot... I'm assuming that you're referring to the resume/suspend timer callbacks...
Well the only real difference I can see depends on whether or not your code uses callbacks to process events such as the timer. If you don't use callbacks, instead using a GetUserEvent loop, then obviously the resume/suspend timer callback functions won't do a lot... So you could still get the same effect by using the timer enable/disable attributes..
Just an idea...
Message 2 of 4
(3,766 Views)
Enabling/Disabling a timer makes sense when we are talking about the control itself and its ability to generate events at a specified interval. However, resuming/suspending callbacks does not affect the timer itself. Suspending a timer callback only inhibits the ability to call the function associated with the timer, but it does not alter the ongoing schedule of timer intervals. Thus the timer is still generating events even when we suspend timer callbacks.

Hope this clarifies a bit.

Azucena
National Instruments
0 Kudos
Message 3 of 4
(3,766 Views)
As I understand it, the purpose of the SuspendTimerCallbacks() and ResumeTimerCallbacks() is to stop and start all timers that are currently enabled. So if you have multiple timers going, you don't have to go to each on and disable it. Also, I believe that it holds the timers in their current timer state, whereas enable starts the timers over at t=0 seconds. This could cause your code to take a long time to get to some timer events if you had to disable and enable them every time.

Hope this helps.
0 Kudos
Message 4 of 4
(3,766 Views)