LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What's the fastest way to signal events from a dll to LabVIEW?

We have a dll that does some number crunching. We would like to signal events without polling from LabVIEW. I've researched three possible solutions: create a windows message and grab from LabVIEW, turn the dll into an ActiveX control and send events, or put the polling in a subvi running in a separate thread. Any comments about speed or pros/cons on the three approaches will be greatly appreciated.
Thanks,
Kurt
0 Kudos
Message 1 of 3
(2,251 Views)
Hi,
sometime ago we worked with dll in LV and we have found the next effect:
we loaded the library into memory with some program (not LV). Dll had global variables and we could change them from this program. If we tried to work with this DLL at the same time with LV we could see the changes of this variables (the changes were made with first program).
I think that windows keeps in the memory only one copy of DLL so you can organize the data exchange between applications using global variables in this DLL. Let your non LV application make some operations and then change variable when the event ocures. And let LV at the same time read this variable from DLL and look if the event has ocured.

Hope it helps, but I'm not sure, because we saw this effect but didn't use i
t.

Oleg Chutko.
0 Kudos
Message 2 of 3
(2,251 Views)
> We have a dll that does some number crunching. We would like to
> signal events without polling from LabVIEW. I've researched three
> possible solutions: create a windows message and grab from LabVIEW,
> turn the dll into an ActiveX control and send events, or put the
> polling in a subvi running in a separate thread. Any comments about
> speed or pros/cons on the three approaches will be greatly
> appreciated.


You might want to search zone.ni.com for something like Setting an
occurrence from a DLL.

Greg McKaskle
0 Kudos
Message 3 of 3
(2,251 Views)