LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX locks loops

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

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 1 of 2
(2,469 Views)

Correction, both loops has IO, one has dll based vi's that communicates with a pci card, the other uses RS232 through activeX.



Anyone familiar with activeX stopping/affecting parts of code it shouldn't?

I've made a small workaround with waits between the activeX calls, which allows the dll-loop to run at correct speed often enough to avoid timeouts, but the behaviour is strange, annoying and embezzling. It also causes me to pull out what hair i have left.

/Y
G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 2
(2,446 Views)