In this article I will explore two different methods by which a PLC programmer can pass information to-from multiple ControlLogix controllers, namely, the producer/consumer messaging model and the explicit messaging model.
While both models will effectively transmit data from one or more controllers to one or more controllers over a network, depending on the requirements of the application, a PLC programmer may be inclined to choose one model over the other.
Producer/Consumer Messaging Model
Produced/Consumed tags provide a mechanism for a processor to provide data to one or more other processors. Therefore, by using the producer/consumer model, data can be transferred between processors without with little to no Ladder Logic at all. As a result, the user can define a “Request Packet Interval (RPI)” for the rate at which data should be updated.
In order for producer/consumer messaging to work, Produced and Consumed tags must be created at the controller scope level. To create a Produced tag, create a new Controller Tag, give it a name and set the data type to Produced.
Click the “Connection” button and set the maximum number of connections this Produced tag can be Consumed by.
Defining the Communication Path
This tutorial assumes you will be using an Industrial Ethernet Network to do the data handshaking between the ControlLogix controllers. A communication path must be configured in both the Producing and Consuming controller so the two endpoint CPU’s are known to each other. Therefore, by defining an Ethernet Bridge in the respective I/O Configuration trees of the Producing and Consuming controllers we can effectively define a path.
You should now see the Remote Ethernet Bridge show up in the Controller Organizer Window’s (COW) I/O Configuration.
To conclude in defining the communication path we are required to add the Remote CPU to the I/O Configuration. Therefore, right click the Remote Ethernet module just added and select “New Module” and choose the correct processor type in the list.
Give the Remote CPU a name and the slot it resides in the remote chassis and it should now appear beneath the I/O Configuration screen as shown.
Creating the Consumed Tag
To complete the configuration we must create the Consumed Tag in the consuming controller. The workflow is very similar to that of the Produced tag, however, instead of choosing “Produced”, choose “Consumed” in the New Tag dialog box.
Once again, click the “Connection” button and configure the dialog as shown.
Finally, download your configurations into both the Producing and Consuming ControlLogix controllers. Go online with both controllers and test that data handshaking by manually putting values into the tag structures.
If everything is configured correctly, your produced values should show up in the respective array in the consuming controller.
Explicit Messaging Model
The producer/consumer messaging model is very efficient for transferring data between processors, however, what if the data transfer does not need to occur at regular
It should be clear that using the producer/consumer messaging model in these instances would make very inefficient use of network bandwidth, and for large connected networks of processors and the machines they control, network bandwidth MUST be considered.
Creating the Message Tags
As with the previous example we will setup a DINT tag of length 10 to use as our data structures for data passing between two controllers. You may call them what you wish.
Since our controllers should already be configured to talk each other (see “Defining the Communication Path” above) let’s get right into the message command logic required.
Message Command Logic
A “Message” instruction (MSG) must be configured to achieve explicit messaging. If you are not familiar with ControlLogix Message instructions I would refer you to the document Logix5000 Controllers Messages.
Assuming you have a basic understand of what a message instruction is, I will be using a timer instruction in my rung logic to trigger the message instruction at some predefined interval that I can control. See below.
Once you click the message ellipsis, configure the instruction as shown.
Next, click on the “Communication” tab to assign the MSG instruction the path to the Remote_CPU.
Click “Apply” and “OK” and that should be all that is required to download your program to the controller.
Once online, test the program by putting values in your data array.
That’s it! If everything is configured correctly you should be passing data to the remote controller of your network…awesome!
I hope you have enjoyed this article, and I do encourage you to become a member of our growing community of professional engineers, technicians and technologists, Register Here!
Also, check out our YouTube Channel to see some great videos…and don’t forget to like and subscribe to our channel!
If you enjoyed this article be sure to check out some of these good reads too:
- How To Become A PLC Programmer
- Best Laptops For PLC Programming
- What Is Industrial Control Systems Security?
- How Much Does A PLC Programmer Make
- PLC Versus Microcontroller – What’s In Your Plant?
- Essential Tools Every PLC Programmer Needs
- Difference Between DCS And PLC
- How To Implement A ControlLogix PID Controller
Lastly, if you run into any problems in your day-to-day engineering activities please be sure to check out our Live and Interactive PLC Forum!
And if you so desire, assist other community members by replying or offering helpful information to the questions or challenges they may be facing right now!
Hi! Fred here, I am the founding member and site moderator here at PLCGurus.NET. I’d like to be the first to welcome you to the site. I have over 20 years in the Industrial Automation and Control Systems field. Be sure to Register Today!