LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

debug asynctimer

I have a test program that calls my ivi-driver. Inside the Ivi-driver there are two asynctimers one for polling in 10Hz the other is sending in 1Hz. When I have a breakpoint in the test program, it seems that the asynctimer is queueing the instructions that shall be done. Is the test program thread blocking the asynctimer thread? How can I come around this?
0 Kudos
Message 1 of 3
(3,284 Views)
Hello

The async timer will fire events in a thread seperate from the main thread. That common thread is used for all aysnc timers. So even if you have multiple timers, they are happening in that same seperate thread. I wanted to make sure you were aware of that.

Coming back to your main question, when you break into an application, all threads belonging to that process are suspended. This is expected behavior for breaking (effectivly pausing an application). If you running into issues with the different threads, you could use DebugPrintf messages to write out to the debug output window to determine the state of your variables as it runs.

Bilal Durrani
NI
Message 2 of 3
(3,272 Views)
My problem is that i dont really need to debug the asynctimers.
 
The problem is that a test programmer are using my ivi-driver with the timers, and when he is debugging  his program which is using my ivi.dll and the his breakpoint in the test program suspends the async timers in the ivi layer.
 
The 1Hz async timer is used to tell external hardvare that the system is alive, if the signal is not present the power to the system is shut down.
Can I run the ivi layer in a diffrent process so the test program not suspends the asyc timer threads?
0 Kudos
Message 3 of 3
(3,232 Views)