05-25-2010 09:41 AM
2 loops, 1 with IO and 1 with ActiveX.
Both loops are frozen during ActiveX-calls (which are _slow_,200ish ms each) although there's no common ground/functions/varaibles. It seems activeX has priority to break into the IO, causing it to stall and await the activeX, causing timeouts.
I've tried to wrap the ActiveX calls and set them to another execution thread, same with IO, and it's better in the way that it doesn't cause timeout errors, but it's still as slow.
The IO loop runs at (supposedly) 30ms (the system response time is 2-5ms). The ActiveX loop basically runs as fast as it can, meaning around 1 sec (6 functions polled). As soon as the ActiveX loop runs, the other loop synchronizes to 1 sec loops also!
How to fix/work around it?
/Y
05-27-2010 01:12 PM
Correction, both loops has IO, one has dll based vi's that communicates with a pci card, the other uses RS232 through activeX.