Communication over EtherNet between MicroLogix and CompactLogix using MSG
Your objective is to create a data link between two PLCs. The system is used to pass 10 Integers and 32 Boolean values from a MicroLogix 1100 PLC to a CompactLogix PLC.
Hardware
MicroLogix 1100 PLC [1763-L16BWA]
CompactLogix 1100 PLC [1763-L16BWA]
Unmanaged EtherNet Switch
Software
RSLogix 500
Studio 5000 v.30
Components to Resolve
How to read tags from a MicroLogix PLC in Studio 5000.
How to pass 10 Integers and 32 Booleans worth of data.
System Operation
The two PLCs are on the same subnet. For the purpose of this exercise let us assign the IP addresses of 192.168.1.4 to the MicroLogix and 192.168.1.11 to the CompactLogix.
The CompactLogix PLC will read the data every 100ms from the MicroLogix.
The CompactLogix PLC will store the data into a specified array.
Bonus Challenges
[Bonus 1]: Utilize a UDT that will store all the required data.
[Bonus 2]: Create a structure that would receive and send data.
Take Hint #1.
Take Hint #2
Concept Review
Want to quickly review some of the concepts related to this questions?
Step 1 - Establishing Communication to PLCs and Going Online
The first step in our solution is to verify the communication between two PLCs. As we are given the information that both controllers are on the same subnet (192.168.1.xxx), we can verify that they can communicate to each other by pinging their respective IP address.
Before we ping an IP address, we must configure our computer network card to the same network.
Launch “Control Panel”.
Go into “Network and Sharing Center”.
Go into “Change adapter settings”.
Open the Network adapter you’ll be using to connect to the network.
Select “Properties”.
Select “Internet Protocol Version 4 (TCP/IPv4)”.
Select “Properties”.
Set the “IP address” to 192.168.1.aaa where “aaa” is any address that is not utilized by any of the two PLC or other devices on the network. In our case, we’ve set the network adapter to 192.168.1.200
Set the “Subnet mask” to 255.255.255.0
Press “OK” on all prompts.
PLC Programming - Setting IP of Network Card
To verify that a device is present on the network, we can use the “Command Prompt”. Launch the software and use the “ping 192.168.1.4” and “ping 192.168.1.11” commands. The example below illustrates four positive replies from each device. Note that there may be multiple issues that would lead to a fault in these messages.
PLC Programming - Verifying IP address of CompactLogix and MicroLogix PLCs
Step 1.2 - Going Online on RSLogix 500 and Studio 5000
Launch RSLogix 500 and use the current PLC program to go online.
PLC Programming - Going Online with MicroLogix 1100 PLC using RSLogix 500
Launch Studio 5000 and do the same.
PLC Programming - Going Online with CompactLogix PLC using Studio 5000
Step 2 - Building the MSG Data
The instruction used to pass data from a MicroLogix 1100 controller to the CompactLogix one is the “MSG”. This instruction has to be configured to meet the requirement of the problem prompt. Furthermore, since we’re going to retrieve two arrays of data and that RSLogix 500 software does not support a UDT structure, we’re forced to use two MSG instructions.
[Optional] Create a “New Program” on the CompactLogix PLC.
[Optional] Create a “New Routine” under the program.
Assign the program to be the “Main” one to be executed by the program.
PLC Programming - Configuring a Program and Routine in Studio 5000 based PLC
Open “_01_Main” or the routine you have created for this exercise.
Create a new Rung and add a “TON” instruction to it.
Configure the Timer to run on a cycle of 200ms and automatically reset at the end using a conditional XIO instruction.
Create a new Rung and add a “TON” instruction to it.
Configure the second Timer to run on a cycle of 200ms and automatically reset at the end using a conditional XIO instruction.
PLC Programming - Creating and Configuring Two Timer (TON) Instructions in Studio 5000
Create a new Rung and add an XIC and MSG instructions onto it.
PLC Programming - Creating and Configuring an MSG Instruction in Studio 5000
Create a “Controller Scoped” MESSAGE type tag and assign it to the instruction.
PLC Programming - Creating and Configuring an MSG Instruction in Studio 5000
At this point, we need to discuss the MSG structure. In this specific case, we’re going to send data from the MicroLogix 1100 PLC to the CompactLogix PLC. In Studio 5000, the MSG instruction would have to be configured as a “read”. However, before we read the data, we need to create these registers in RSLogix 500. Follow the steps below to create the data on the MicroLogix 1100 PLC.
Go “Offline”
Right-Click “Data Files” and Select “New”.
Create an array of 10 Integers by specifying the variables below. Note that the “File” parameter should be the next available data slot in your program.
PLC Programming - Creating a 10 Integer Array in RSLogix 500
Create a second Data File of 32 booleans per the problem prompt. Note that “Binary” data files are 16 bits each; therefore, we need 2 to satisfy the data requirement.
PLC Programming - Creating a 32 Boolean Array in RSLogix 500
Download the new program to the PLC.
Step 3 - Configuring the MSG Instruction
The MSG instruction needs to be configured to pull the data we’ve established in the MicroLogix 1100 PLC. Based on the requirements, we need to configure one MSG instruction to read 10 integers and the other 32 Booleans. Here is the configuration for each instruction.
Configuration for the 10 Integer Instruction
MSG Instruction Configuration for 10 Integer Array in Studio 5000
Note - The “Destination Element” is an array of 10 Integers.
Communication for the 10 Integer Instruction
MSG Instruction Communication for 10 Integer and 32 Boolean Array in Studio 5000
Configuration for the 32 Boolean Instruction
MSG Instruction Configuration for 32 Boolean Array in Studio 5000
Communication for the 32 Boolean Instruction
The same as the 10 Integer Instruction
Conclusion
We’ve established a communication path from the MicroLogix 1100 PLC to the CompactLogix PLC. A programmer may now send values from one PLC to the other.