Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I keep an EthernetIP session registered

I have an application where I'm quering port status from a managed ethernet switch using the LabVIEW EthernetIP Toolkit (v1.3). Right or wrong, this particular switch reboots whenever LabVIEW unregisters the EthernetIP session.  LabVIEW appears to unregister the EthernetIP session automatically when it determines that the session is no longer in use.  This is a problem in my application as this causes the switch to reboot and interrupts network communications for several seconds.

 

I don't think there is anything wrong with the EthernetIP communications between the computer (LabVIEW EthernetIP Toolkit) and the switch.  In case I am doing something dumb,  I've attached a VI snippet and a screenshot of a Wireshark capture for a simple VI which triggers the problem.

 

Until I can resolve the automatic reboot issue with the switch vendor, is there a way to force LabVIEW to hold the EthernetIP session open for the duration of my program?  This effort may be complicated by the fact that my application dynamically loaded the VI which handles EthernetIP communications with each device (one instance per device), and the current design requires me to stop and restart (in a controlled manner!) the instance VI to change it's configuration/operation.  Its the reboots triggered by these instance stops/starts which leads to problems, as it interrupts all other communications for several seconds.

 

Mark

0 Kudos
Message 1 of 2
(5,137 Views)

Hi MarkMoss,

 

I guess by your application dynamically loading the VI which handles EthernetIP communications with each device (one instance per device), you use something like VI server and call EIP fucntions that reside in a SubVI, upon exit of which its resource get recollected by LabVIEW, right?

 

This is a correct behavior by LabVIEW. You need to guarantee that the resource would not be recycled by creating the session outside before the VI server calls it and pass the session refnum to the VI server. In this way, it should prevent LabVIEW from unregister the session.

0 Kudos
Message 2 of 2
(5,106 Views)