LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Ivi_UnlockSession lockup

I found a weirdness with an Ivi driver that I'm writing:
When finished, during the xxx_close routine, the driver locked up on the Ivi_Dispose(vi) call. More disturbingly, the LabWindows/CVI force-break and force-termination wouldn't work. Turns out that I had a call to Ivi_UnlockSession  just before Ivi_Dispose, but had not initially called Ivi_LockSession first. When I put in the IviLockSession call things worked properly. Huh?
0 Kudos
Message 1 of 2
(2,814 Views)

Hi pblase,

This is expected behavior.
If you do not have a LockSession paired with the UnlockSession, the UnlockSession will continue to block the critical section - the Dispose() function. 

In fact, this pair is required as specified in the CVI Help Required Instrument Driver Functions.

Nestor
0 Kudos
Message 2 of 2
(2,795 Views)