Video - EtherNet/IP Explicit Unconnected Messaging Between Two Productivity3000's
In this video we’ll use Explicit Unconnected messaging to transfer data between two Productivity3000’s. When a Productivity3000 is configured as a target, it can handle both the implicit adapter and explicit server messaging. In fact, it can do both at the same time. So if you’ve already watched the Implicit Adapter video, then you have already seen how to setup the Productivity 3000 as a server. See that video for details, but here is a quick recap: Under Setup – Comm Adapter Config, select EtherNet/IP Adapter. Enable it and select the number of data blocks you need. We’ll use just the one in this example. We’ll set it up as an input only data block – remember, that’s input TO the originator which is this adapters output. Let’s create an array of 8 unsigned bytes. And we’ll make all 8 bytes available to the client. That’s it. These numbers over here are the key. When we did implicit messaging all we cared about was this connection point. In this video we are doing Explicit messaging, so we will need these Class, Instance and Attribute numbers to fill in the blanks in the Client’s Explicit Messaging Instruction. Let’s apply changes and send a copy of these tags to the Dataview. Transfer this to the controller and our adapter is now ready and waiting for or client. So let’s go setup that client. I have a second copy of the Productivity Suite Software running and it’s connected to the client Productivity3000. To set this guy up we just click on hardware config, select the Ethernet IP tab, drag a generic client onto the screen and fill in the blanks. We’ll call this our P3000_Client. We want to use this processors Ethernet port. And this is the address of the Adapter – that guy we just created a minute ago. I’ll add some tags so we can monitor the connection status and that’s it. This stuff down here is only for Connected messaging so we don’t need it in this example. Hit OK. We do want to define these tags but with longer strings. Let’s drop back into the client now that the TAGs have been defined and add those tags to the data view. Now we just add an Explicit Message instruction to send a request to the Productivity3000 server or Adapter – it’s the same thing. We want to use the Client we just created. This is Unconnected messaging – which is our only choice since we haven’t setup any connected clients in this example. And we want to get a single attribute – that 8 byte array we created down on that adapter. Because we chose this Assembly Class Get single attribute the software already knows we want to GET, from the Assembly Class, this attribute. All we have to do is tell it what instance we want. Here is the Adapter’s setup we did earlier in the video. Notice that the Class and attribute are already lined up; all we need to do is tell it we want this instance, 101. If we had wanted the input data from a second data block, or second instance, we would have selected 103. We need a place to put that 8 byte result so we’ll go ahead and create that. Yes we want to define this new TAG. And we want to get all 8 bytes. We’ll use the structure feature here so we only have to type in one tag to monitor the status of the connection and we are done! So all we did was setup the Client under hardware config and then issue a request to the adapter using this explicit message instruction. Let’s hit ok. Yes we want to define these tags but with a longer strings. And let’s go back into that instruction now that the tags are defined and send a copy of all of them to the dataview. We need a control bit to enable this instruction. And transfer the program to the controller. Let’s bring up the dataview for this client and here is the result array where we are going to put results from the adapter. Here is the adapter dataview and here is the array we are monitoring from the client. If we change a number down on the adapter, then execute the instruction on the client to go fetch that data, then we see that the message is complete and successful and we got the data as expected. Easy. The data can change all it wants down here on the adapter. The Client won’t see it until it explicitly asks for it when using this Un-connected messaging. We haven’t done much trouble shooting in these videos so let’s intentionally put an error in here and see what happens and more importantly how to debug it. Let’s go back into the Client configuration and change the IP address. Now remember – this IO address was the IP address of the Adapter we want to talk to. I’m going to change it to the IP Address of this client. So now the client is going to send a message to itself looking for the data that si down on the adapter. Let’s see what happens. Transfer the project. Ok, when we enable the message instruction we see that the message is completed, but there was an error. And in particular that error was a Path Destination Error. In the Productivity Suite Help file, Topic 260 lists all the possible errors. And path destination error tells us that the client couldn’t find the specific class instance or attribute it was looking for. We also notice the Client received the wrong adapter name. Our Adapter name is this. That’s a real good clue we are talking to the wrong device. We’re not getting the data we want back and we’re getting the wrong adapter name. So when you see an EtherNet/IP related error message, check out help topic 260 – it’s a fantastic reference that will usually zero right in on what the issue is. And if you get stuck, contact AutomationDirect’s FREE, Award winning tech support right here just north of Atlanta Georgia. They will be happy to help you out. And use the forums – there are lots of folks there that love to share their years of experience.
Performance Plus Value – That’s Productivity. From Automation Direct.