LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pb with 2 parallel VIs using same DLL

Hy group!
I have two VI running simultaneously.
The first acess to a DLL every 500 ms.
The second has to use the DLL randomly but can't do this because the DLL
seems to be locked by the first so the second is blocked as long as the
first is running.
I'm very surprised by this behaviour and I suppose there is a solution to
use a same DLL simultaneously by two VI otherwise using DLL in LabView lose
interest.
Does somebody know how to do this?
Thanks!
0 Kudos
Message 1 of 3
(3,604 Views)
> I have two VI running simultaneously.
> The first acess to a DLL every 500 ms.
> The second has to use the DLL randomly but can't do this because the DLL
> seems to be locked by the first so the second is blocked as long as the
> first is running.

First off, make sure that the DLL call, the Call Library Function node,
is marked as being reentrant. Set this by double clicking or popping
up on the node and in the dialog there is a setting for reentrancy.

Nonreentrant DLL calls automatically get protected by LV from parallel calls,
and they are colored orange.

Reentrant DLL calls are allowed to have any number of calls in them at once.
It is up to the DLL to protect globals or any other resources that must
be mutexed. They are drawn in yellow like other nodes on the
diagram.

The same color and reentrancy issues exist for CINs, but the setting for
whether or not they are reentrant isn't in a dialg, but in a callback to
the CIN; so CINs must be recompiled to go from one to the other.

Greg McKaskle
0 Kudos
Message 2 of 3
(3,604 Views)
Hy
Sorry, my application is big now and I had changed the input of a Wait Until
Done of Run VI attribute node to TRUE.

Greg McKaskle a écrit dans le message <37C80716.4577EB34@austin.rr.com>...
>> I have two VI running simultaneously.
>> The first acess to a DLL every 500 ms.
>> The second has to use the DLL randomly but can't do this because the DLL
>> seems to be locked by the first so the second is blocked as long as the
>> first is running.
>
>First off, make sure that the DLL call, the Call Library Function node,
>is marked as being reentrant. Set this by double clicking or popping
>up on the node and in the dialog there is a setting for reentrancy.
>
>Nonreentrant DLL calls automatically get protected by LV from parallel
calls,
>and they are colored o
range.
>
>Reentrant DLL calls are allowed to have any number of calls in them at
once.
>It is up to the DLL to protect globals or any other resources that must
>be mutexed. They are drawn in yellow like other nodes on the diagram.
>
>The same color and reentrancy issues exist for CINs, but the setting for
>whether or not they are reentrant isn't in a dialg, but in a callback to
>the CIN; so CINs must be recompiled to go from one to the other.
>
>Greg McKaskle
0 Kudos
Message 3 of 3
(3,604 Views)