From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

enet-232 auto closes sessions on one computer

I have a very strange problem with a Windows XP system. We have three Enet-232/4 operated from three different Windows XP, Version 2002, Service Pack 1. Our applications open the four ports on their according Enet box and intermittingly communicate with the devices connected to it. On one PC the LabVIEW app opens the ports as well and can communicate with the devices fine, but after about 30 seconds of inactivity on any of the 4 ports the port seems to get closed, indicated by the according green LED on the Enet box going out.
I have determined that it is something with the particular Windows computer by trying to access one of the other Enet boxes from it with a simple LabVIEW VI which opens the serial port, and keeps r
unning in a loop. Here the port also gets closed after about 30 seconds. Nothing similar is happening on the other computers.
All computers have NI Serial Device Server 1.0.1 and NI Serial 1.5 installed. The Enet boxes all run Firmware version A1. The only difference between this particular and the other computers is that the others had at one point LabVIEW 7.0 installed. All are in principle running a LabVIEW 7.0 executable however. I went as far as getting LabVIEW 7.1 completely installed on the specific computer too, hoping that it might resolve the problem but alas, no change at all.

I'm at a loss, as to what might cause the serial port driver to auto close the ports after some time of inactivity on a specific port, and VISA definitely can't deal well with this as most attempts of the LabVIEW program to communicate with a serial device after the port went down are simply returning timeout errors or similar.

Rolf
Rolf Kalbermatter
My Blog
Message 1 of 10
(4,119 Views)
In order to prevent ports from being blocked by a non-responsive system, the Enet-232/4 listens for a heartbeat message from the serial driver on the host PC. If a heartbeat is not detected within 30 seconds of the previous heartbeat, the port closes. This heartbeat is sent automatically by the host driver in times of inactivity regardless of the host application type (VISA, LabVIEW, etc.).

It appears that heartbeats are not making it to the port in question. Can you perform your test again, but this time run a "ping -t x.x.x.x" in another window to verify that the network connection isn't being broken for some reason?
Message 2 of 10
(4,117 Views)
Hey Rolf,

I have seen a few cases were the Enet-232 has had problems when connected to a computer that has a Gigabit ethernet card. Some of the new computers today have gigabit (1000) ethernet built in. If this is a problem I would suggest you switch to a standard 10/100 megabit ethernet card.

I hope this helps out.

-Josh
0 Kudos
Message 3 of 10
(4,117 Views)
Thank you this helps greatly. I can't verify it before tomorrow, but I have now a good idea where to look. Most probably it has to do with the network setup of the computer which I did not think to check today.
We use a private network address range behind a network router and I suspect that this computer has still the default DNS network setting enabled which would assign this computer a public IP address and that way the heartbeat messages (probably UDP?) would not make it to the box.

Rolf
Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 10
(4,117 Views)
Thank you. But this computer is a standard low cost desktop with normal network interface.

Thanks anyhow for the suggestion. I will think twice before buying Gigabit Ethernet boxes.

Rolf
Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 10
(4,117 Views)
I believe the messages are TCP, but it would be good to verify that the network connection remains throughout the test.
0 Kudos
Message 6 of 10
(4,117 Views)
I did some tests and alas, nothing helped so far. I verified that the network settings were correct, with the right IP address and subnet mask.

I started ping -t 192.168.0.111 and opened a connection to the box. After almost exactly 60 seconds (I timed it this time) the green LED on the box went out while the ping kept reporting answer times of <1ms.
So I went and downloaded NI-Serial 1.7 and installed it. No change!

Then I looked at the network card which is as far as I can say the only difference to the other computers. While the other computers which work properly have a Broadcom 440x network adapter on board, this particular computer has an Intel Pro 100/VE adapter on board. So I downloaded the newest Intel drivers and installed them on the computer and the according network properties panel has now an abundance of different properties for this adapter with neat explanation of all of them. I tried it again and also did several changes to the network adapter properties such as buffer coalescence, buffer send delay, etc and checked everytime in between and again nothing changed.

The most simple test I did was just looking at the port in MAX and select Open VISA session and then wait for 60 seconds to see the green LED go out. The orange Rx LED does blink in between a few times as if the box would have some network traffic from somewhere (I would assume the host PC) but the problem simply persists no matter what I do.
I'm at the end with my knowledge. It does appear that the driver does for some reason not send the heartbeat message on this machine or in a way which is very different to the other traffic it does to communicate with the box.

I'm short before rewriting the LabVIEW app to open each serial port each time it is needed and then close it again, but this seems like such a stupid workaround to me and one of the devices I use has an intermediate DLL from the manufacturer and here that trick won't work.

Chris can you maybe try to come up with a better idea what might be wrong?

Rolf
Rolf Kalbermatter
My Blog
Message 7 of 10
(4,117 Views)
Hey Rolf,

I am sure it has something to do with the type of chip or driver that is used for the network card. If you take a different type of network card and place it into the computer the problem will go away.

-Josh
0 Kudos
Message 8 of 10
(4,117 Views)
This seems to be a problem in the NI-Serial 1.7 driver when used on newer computer that typically have gigabit ethernet, but may have standard 100 M. The ENET box will close an open COM port if the computer does not request to transmit or receive data within 60 seconds. Expect a fix in the next release of NI-Serial 1.8.

Joshua Prewitt
National Instruments
Message 9 of 10
(3,933 Views)
This has been fixed in NI-Serial 1.8 for Windows. Please download the latest NI-Serial driver if you are having this problem.

Josh Prewitt
National Instruments
0 Kudos
Message 10 of 10
(3,676 Views)