LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

When I move a panel (drag using panel title bar) the programs stops attending ev

When I move the panel, the program stops attending other events such as timers events.  How can I fix this problem?
0 Kudos
Message 1 of 2
(3,068 Views)

Panel move are high impact events, in that they effectively block the system from attending other events. This is -unfortunately- the expected behavior and you can do nothing to alter it, at least remaining in a single-threaded application.

 

Regarding timer events, you could move to the asyncronous timers, which are executed in a separate thread and are not affected by UI events like dragging the panel. This is the easiest way to swich to multithreading, in that the async timer callback has the same structure of UI timer callback so the switch is easy torealize. You can look at \samples\toolbox\asyncdem demo program shipped with CVI for an example of async timer usage and performance.

 

The other alternative you can consider is to develop a multithreaded application by scratch without the use of async timers. Multithreading in CVI is described in an application note that you can find in <bin> directory in your CVI installation directory. I suggest you to read carefully that document since moving to a multithreaded environment requires some precautions to prevent problems in accessing resources from different threads. This applies also to async timer.



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 2
(3,063 Views)