LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"VISA Lock Async.vi" returns error as connection is invalid?

Hello,

i have a program where two loops are accessing the same instrument (tcp-ip).

One is a measure-loop and the other is a configure-loop.

Both instrument subvis are surounded with "Visa Lock Async.vi" (timeout 2000ms) and "Visa Unlock" at the end.

But i still get errors at the configure-subvi:

 

VISA: Sperren in VISA Lock Async.vi -> MyInstrumentConfigure.vi:7170002->

TheCallingFile.vi:19000005->

TheCallingFile.vi.ACBRProxyCaller.93B0000E

BFFF00A6

 

Is the bold text anything what is helpful?

The hex errormessage means "the connection for a given session has been lost".

 

Is there any way to recreate a lost session?

The error appears when trying to lock the instrument. Is this the same error when the instrument is still locked by the other loop?

Can i check somehow if the session is currently locked?

 

The program runs several hours and suddenly this error appears.

 

Thanks for help

 

0 Kudos
Message 1 of 2
(2,400 Views)

Hi OnlyOne,

I am not sure about the error message being created, because the other session is still locked. Could you post this part of your code? Or a reduced version where you can reproduce it?

I have some additional suggestions though: you could start working additionally with semaphores to make sure that not only the VISA ressource is locked, but also your code doesn't try to violate that lock.

And one possibility with such type of communications is to unbundle the error code and react to that specific error number by trying to establish a re-connection to your device.

Ciao, Niko

Niko NR
Systems Engineer, National Instruments
0 Kudos
Message 2 of 2
(2,325 Views)