Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Timers in CVI

How i can excess menubar and command buttons while timer function running?
0 Kudos
Message 1 of 2
(2,922 Views)
Vishnu,

What you are describing is the User Interface becoming unresponsive because a callback is executing for a long time (if I understand you correctly).

What you need to do is change the design of your software slightly. You need to use multi-threading. This means you execute different parts of your code in separate threads and Windows will switch between them every few 10's of milliseconds. So, you put your call to RunUserInterface() in the main thread, and your timer callback executes in a different thread.

If your application is simple you can replace your current callback timer with an asynchronous timer (see the multithreading libraries in the utilities section). This works much the same as a standard callback timer, with the difference being that the callback function does not execute in the main thread.

Hope this is enough to get you started.

Jamie Fraser
0 Kudos
Message 2 of 2
(2,915 Views)