LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -1073807194 VISA: (Hex 0xBFFF00A6) The connection for the given session has been lost. Ethernet and windows 10

We have been changing all of our testers to LabVIEW 2018 and Windows 10.  We have been seeing an issue where after a while they will throw the "VISA: (Hex 0xBFFF00A6) The connection for the given session has been lost." Error.  This LabVIEW code has been running for years on windows 7 pro on versions of LabVIEW at least back to 2012 and up to 2017 with no problems.  We only see it with Ethernet connected instruments, Primarily Keysight 33512 ARBS, N6700 series power supplies, and DSOX3014 scopes.  GPIB instruments work fine.  We had some LabVIEW 2018 windows 7 installations, but I do not know if any of them had Ethernet instruments.  I have not seen an issue with Ethernet/IP connected PLCs, but those are hard coded static IP addresses rather than a VISA Alias session.  That being said, the PLCs will attempt to automatically re-establish the connection, so we may not even see a drop out if the LabVIEW side doesn't throw an error.

 

Flow looks like this:

On product select use MAX visa alias name to initialize instruments.

Run product for several hours.

Close Visa sessions with product end routine.

 

Production tells me that it happens intermittently, but I suspect it is after a period of idle time.  Does windows 10 automatically close out ethernet VISA sessions for inactivity that Windows 7 was more tolerant of?

 

If I close the visa sessions at the end of each DUT and reopen for the next, it adds a significant amount of cycle time.

0 Kudos
Message 1 of 6
(5,577 Views)

Odd,

I saw a similar thing with a Fluke data logger via USB COM. Would simply 'lose' the Port after a few hours of running.

 

Occurs very intermittently.

 

One thing to check is are there other instruments using COM Ports. We did come across a Spectrometer using a COM driver that was pinging every valid COM port on the Computer to 'find' it's device. Of course it would cause problems for the other devices connected and running already.

Regards

Jack

0 Kudos
Message 3 of 6
(5,533 Views)

@MrJackHamilton wrote:

I saw a similar thing with a Fluke data logger via USB COM. Would simply 'lose' the Port after a few hours of running.


That points to the OS turning off the USB hub that you were using.  It is part of a "power saving feature" introduced in Windows 7.  You can go into the device manager and disable that for each of your USB hubs.  I was not aware there was a similar setting for Ethernet adapters.  Yet another thing I need to put into my test system build instructions...


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 6
(5,515 Views)

That was indeed checked, but unchecking it did not solve the issue.  (Being a test system we force them to not go to sleep) I am currently suspecting that I need to set VI_ATTR_TCPIP_KEEPALIVE for the VISA session.  Interesting that we did not need to change it for windows 7.  Did the default switch to false with 2018?  I am trying to bench test this with an instrument on my desk.  I have not yet gotten it to occur on my bench, but it is like clockwork in production, so this makes me wonder about user account settings. 

 

Setting VI_ATTR_TCPIP_KEEPALIVE to true during instrument initialization does not help.  I may need to clarify some of the operation.  System initialization handles the instrument initializations.  We are running a custom executable program with a plugin architecture with separate plugins for System Initialization, Product initialization, test start, test complete and test sequence.  We use the MAX alias name as a handle to instruments rather than a passed through reference.  We close references at system shutdown.

0 Kudos
Message 5 of 6
(5,498 Views)

@crossrulz wrote:

@MrJackHamilton wrote:

I saw a similar thing with a Fluke data logger via USB COM. Would simply 'lose' the Port after a few hours of running.


That points to the OS turning off the USB hub that you were using.  It is part of a "power saving feature" introduced in Windows 7.  You can go into the device manager and disable that for each of your USB hubs.  I was not aware there was a similar setting for Ethernet adapters.  Yet another thing I need to put into my test system build instructions...


That's news to me, too!

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 6
(5,496 Views)