Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

NI Ethernet/IP as adaptor using explicit messaging from ControlLogix PLC

I am successfully using a ControlLogix PLC with an implicit i/o connection to a NI9792 WSN Gateway. This I/O connection only communicates control and status of the program on the 9792, however there is a bunch of data (500 bytes) that is collected every few hours that I would like to get from the 9792 with an explicit message using a couple of assemblies. How do I need to set up the MSG instruction in Logix to get this data from the 9792? According to references it should be Service 0x0e, Class 0x04, Instance n, Attribute 0x03 but this gives me an error on the PLC MSG instruction. I have tried a variety of things to get this working but have had no luck, the implicit I/O connection works fine, but the explicit connection return an error code of 0x0005 'Class or instance not supported'. I have tried a couple different assemblies and get the same result. I can however change the MSG instruction to get the identity of the NI driver (Service 0x01, Class 0x01, Instance 1, Attribute 0x00) and this works fine so I know the MSG function is working with the correct path and destination element. In the first attachment, the bottom while loop contains the assembly I'm trying to access via the explicit MSG, the top loop is the implicit I/O connection which works fine. The second attachment is my ControlLogix MSG instruction configuration with the error shown. Thanks, Dave
David Gaylord
Controls Engineer
Howmet Aerospace
Download All
0 Kudos
Message 1 of 7
(6,985 Views)

Hi Dave,

 

I think NI EIP assemblies does support being accessed by explicit message. The shipped examples AccessAssemblyInstanceData(Explicit).vi together with CreateAssemblyInstance.vi can demonstrate such a case.

I'm not familar with Logix usage in this regard, though - to use explicit message to access remote assemlbies.

 

You used  Service 0x0e, Class 0x04, Instance n (130 in your case), Attribute 0x03, which seems to be correct to me as well. I would like  to try this function out in the RSLogix5000 as well but I couldn't find it. Would you please point it out for me so that I could dig into it a bit more?

 

Thanks.

0 Kudos
Message 2 of 7
(6,963 Views)

Unfortunately those examples are for using the Ethernet/IP driver as a scanner which initiates the connection to the PLC.  I am trying to use the driver to act as an adaptor which waits for a PLC to initiate the communication.

 

The MSG instruction is on the Input/Output tab of the instruction toolbar.

 

screenshot.2.jpg

 

Thanks for taking a look

David Gaylord
Controls Engineer
Howmet Aerospace
0 Kudos
Message 3 of 7
(6,960 Views)

Hi Dave, 

 

I'll check that in RSLogix5000 later.

 

But first off I must correct you that the two examples I mentioned above (AccessAssemblyInstanceData(Explicit).vi and CreateAssemblyInstance.vi ) are not what you said them to be.

The 2nd is an adapter (create assembly), and the first is an explicit msg client (access assembly explicitly). NI EIP toolkit can not be used as a scanner, thus it can not initiate I/O communication with a PLC.

0 Kudos
Message 4 of 7
(6,949 Views)

Sorry about that, I think I had too many things going on here at the same time.  I agree that the Create Assembly Instances is working as an adaptor.  Perhaps my terminology is incorrect by calling the other a scanner, it was my impression that by giving it a IP address to communicate with that it was a scanner, as it was making the request for data or setting the data in a remote device.  Either way, I would prefer to keep the system as a simple adaptor so the setup of these systems is easier on our customers.

 

I do see one VI in the example that i forgot about, the Remove Assembly Instance, I'll add that to my vi and see what happens, though I doubt that will cure my problem.  I've seen on the forums that there is a limit to the amount of about 500 bytes per assembly but is there maybe a limit to the amount of assemblies or total bytes used by the EIP toolkit? 

David Gaylord
Controls Engineer
Howmet Aerospace
0 Kudos
Message 5 of 7
(6,932 Views)

Hi dgaylord,

 

Still need time to look into the Logix initiated messagine issue.

 

Some answers to the rest are:

The scanner does need an IP, but the above mentioned two examples do not demonstrate an I/O communication, rather it's an explicit messaginge way, where the client needs to the IP.

 

The upper size limit to an assembly is defined by the PLC side in most of the cases, if not all. RSLogix5000 constrains the size to be around 500 bytes.

You can have as many as 128 assemblies in a VI. The size limit for assemlies on VI side is 1502 bytes.

0 Kudos
Message 6 of 7
(6,922 Views)

Apparently I stumbled onto the solution, although I don't know what the problem was.  I removed the ETHERNET-MODULE from the I/O Configuration in the Logix5000 program, added the module again, then downloaded and put the controller in Run mode.  I then reconfigured the path of the MSG instruction and it now works!  I'm really not sure what was going on since I was previously able to get the identity object which i thought proved that the path was correct.

 

Thanks for your help!

 

Dave

David Gaylord
Controls Engineer
Howmet Aerospace
0 Kudos
Message 7 of 7
(6,909 Views)