Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

Ethernet/IP and a Packed Library Session is Invalid Problem

Hi all,

 

I have a working Ethernet/IP program (class) that communicats via explicit messaging, no problems.  I built that class into a packed library and used it in other programs and I am running into problems.

 

Specifically, I am getting Session is Invalid errors, but in a weird way.  Follow these two examples:

 

Example 1:

Start a new project and specifically add an Ethernet/IP tag read instance from the advanced communication dropdown, hardcode the IP and tag.  

Run project and all works fine.

Add a vi from my packed library which does the same thing.

Run project and all works fine.

 

Example 2:

Start a new project and Add the vi from my packed library above 

Run project and get the dreaded 'session invalid'

Add the Ethernet/IP tag read instance from the advanced communications drop down, hardcode the IP and tag.

Run project and get the dreaded 'session invalid'

 

for some reason when i load the ethernetip.dll from my packed lib first, nothing works.  But when I load the ethernetip.dll from the actually library first, everything works.

 

It has to be something with the way my packed lib was created?  Does anybody have any experience building the EIP driver into a packed lib?

 

0 Kudos
Message 1 of 5
(3,962 Views)

some more info:  If i exclude shared libraries when i build my class, everything works fine later in new projects.

 

Perhaps I am just not allowed to build a packed lib with the Ethernet/IP driver?  Does this mean I need to buy an Ethernet/IP license for each deploy (that would be bad)

 

 

0 Kudos
Message 2 of 5
(3,958 Views)

Hi,

 

I know someone once built a packed lib with the EtherNet/IP driver and was able to use it in his Test Stand machine. So I believe it is allowed though I did not try it myself yet.

--Have you referred to this doc for reference? https://decibel.ni.com/content/docs/DOC-19176

--What do you mean by "excluding shared libraries and everything works fine"?

--Could you share with me the LabVIEW project you used to build the packed library? I want to try a bit.

--Why do you need to build the packed lib in the first place? Could you tell me about your specific user application senario? Then I can advise more.

Thank you.

 

Wendy

 

0 Kudos
Message 3 of 5
(3,931 Views)

thanks for the help!

 

I have seen the packed lib references.  I use packed libs in general because our organization is large, and it helps with distribution, maintenance, etc.  If it turns out that the extra complexity of a packed lib with reference to EIP is a problem, I certainly do not have to go that route.

 

When I say 'exclude shared libs' i mean i select it in the PPL build properties under 'Additional Exclusions'.  I select the option 'Exclude dependent packed libraries' and 'exclude dependent shared libraries'.  When I do this and allow the calling class to create its own dependencies and the funny business goes away!

 

Unfortunately I cant share my project due to company policy, but I am making a new one that shows the same problem!  give me a day or so.

 

 

0 Kudos
Message 4 of 5
(3,920 Views)

Thank you for the reply.

Next time when you give me the new LabVIEW project please provide the step-by-step procedure about how you see the problem. Thank you very much!

 

Wendy

0 Kudos
Message 5 of 5
(3,913 Views)