You have a ControlLogix PLC and someone just added a Modbus TCP flow meter to your project. Studio 5000 opens, you look for the “Modbus TCP” option in the module tree… and it is not there. Not in the standard modules. Not in the add-on profiles. Not in the Ethernet configuration.
That is because ControlLogix has no native Modbus TCP support. Rockwell is an EtherNet/IP shop. Modbus is technically a competitor’s protocol (originally Modicon, now Schneider). If you want Modbus TCP on a ControlLogix PLC, you have to add it yourself using one of three approaches — and picking the right one matters more than the configuration steps themselves.
This article walks through the three approaches, helps you choose, and then covers step-by-step setup for the two that engineers actually use in the field.
Table of Contents
Three approaches to Modbus TCP on ControlLogix
You have three practical options. Each has different tradeoffs.
| Approach | Cost | Complexity | Best for |
|---|---|---|---|
| 1. Third-party in-rack module (ProSoft MVI56E-MNETC) | Higher hardware cost | Low | Production systems, many devices, minimal PLC code |
| 2. AOI socket messaging (native ControlLogix code) | Free | Medium-High | Budget-conscious, few devices, engineering time available |
| 3. External Modbus TCP gateway | Medium | Medium | Existing gateways, mixed serial/TCP environments |
Approach 3 (external gateway) is really just adding a device on your network — it does not put Modbus TCP “on” the PLC. This article covers approaches 1 and 2 in detail.
Approach 1: ProSoft MVI56E-MNETC (or similar module)
An in-rack module that acts as a Modbus TCP client or server. The PLC sees it as data tags. All Modbus communication happens on the module, not in your ladder logic.
Popular options:
- ProSoft MVI56E-MNETC — Modbus TCP client (most common)
- ProSoft MVI56E-MNETR — Modbus TCP server
- Molex SST-ESR2-CLX-MB — Modbus TCP gateway module
- Real Time Automation 460ETCEIP — external gateway
The MVI56E-MNETC is the standard choice for most engineers. Configuration happens in ProSoft Configuration Builder (PCB), and the module appears in Studio 5000 as I/O data tags.
Pros:
- Minimal PLC code — module handles the protocol
- High device count support (up to 60+ slaves per module)
- Reliable, tested, widely deployed
- Modbus TCP-to-RTU gateway capability on some models
Cons:
- Higher hardware cost than the AOI approach
- Requires ProSoft Configuration Builder software (free but separate)
- Rack slot consumed
- Configuration split between two tools (Studio 5000 + PCB)
Approach 2: AOI socket messaging
Use ControlLogix’s built-in socket services (available on 1756-EN2T/EN2TR/EN3TR modules) with an Add-On Instruction (AOI) that implements the Modbus TCP protocol in ladder logic.
Sample AOI sources:
- Rockwell provides socket messaging sample code that can be adapted for Modbus TCP (not a complete production-ready driver — it demonstrates the socket instructions and needs Modbus protocol logic added around them)
- Community-developed AOIs on PLC forums
- Commercial Modbus TCP AOI libraries from third-party integrators
- Custom-written AOIs
Pros:
- No hardware cost — uses the existing EN2T module
- Full control over communication
- No rack slot consumed
- Familiar Studio 5000 environment for everything
Cons:
- Programming effort required to implement or integrate an AOI
- Debugging is at the socket level — harder than debugging module tags
- Not all EN2T firmware versions support socket services
- Limited to what your AOI implements (function codes, error handling, retry logic)
Prerequisites for AOI approach:
- 1756-EN2T, EN2TR, or EN3TR module (NOT the older ENBT)
- Firmware version supporting socket services (check the module manual)
- ControlLogix 5570/5580 controller (older 5555/5560 have limitations)
- Studio 5000 v20 or later (v24+ preferred)
When to pick which
Practical decision guide:
- You have a big project, many Modbus slaves, and budget → ProSoft module
- You have a few Modbus devices and time to code → AOI socket
- You have to add Modbus RTU serial devices too → ProSoft module (some models include serial gateway)
- You already have Modbus TCP-to-RTU gateways on the network → treat those as Modbus TCP devices; use either approach on the PLC side
- The plant standard is ProSoft → follow the standard, do not fight it
- This is a one-off maintenance task → AOI if you have the code available; module if not
Most large sites standardize on ProSoft. Most small integrations use AOI. Both work — the choice is more about organizational fit than technical merit.
Approach 1 setup: ProSoft MVI56E-MNETC
Step-by-step configuration for the ProSoft Modbus TCP client module.
Hardware installation
- Power down the ControlLogix chassis
- Slide the MVI56E-MNETC into an available rack slot
- Connect the Ethernet cable to the module’s Ethernet port (not the controller’s port)
- Power the chassis back up
- Verify the module’s status LEDs come up green
Add the module in Studio 5000
The module needs to be represented in your Studio 5000 project so ladder logic can access its data.
- Open your project in Studio 5000
- In the Controller Organizer, right-click 1756 Backplane → New Module
- Choose Communication → 1756-MODULE (Generic 1756 Module)
- Configure:
- Name: MVI56E_MNETC_01 (or your convention)
- Slot: the slot number where you installed the module
- Comm Format: Data – INT
- Assembly Instance: Input = 1, Output = 2, Configuration = 4
- Size: Input = 250 (INTs), Output = 248 (INTs), Configuration = 0
- Click OK
Alternatively, if you have the ProSoft Add-On Profile (AOP) installed, add the module directly from ProSoft Technology → MVI56E-MNETC. The AOP handles the assembly instances and sizes automatically.
Configure the module with ProSoft Configuration Builder
The actual Modbus TCP configuration lives in the module, not in Studio 5000. Use ProSoft Configuration Builder (PCB) — free download from ProSoft.
- Open PCB
- Create a new project or open an existing one
- Add a new module: MVI56E-MNETC
- Configure the Ethernet settings:
- IP address
- Subnet mask
- Default gateway
- Configure the Modbus client parameters:
- Command Count — number of Modbus commands the module will send
- Response Timeout — typical 1000 ms
- Retry Count — typical 3
- Build the command list (this is the important part):
For each Modbus slave you need to poll, add a command:
| Field | Example | Notes |
|---|---|---|
| Enabled | Yes | |
| IP Address | 192.168.1.50 | The slave device |
| Slave Node | 1 | Modbus Unit ID |
| Function Code | 3 | Read Holding Registers |
| Data Address | 0 | Starting register (0-based) |
| Data Count | 10 | Number of registers |
| Poll Interval | 1000 ms | How often to poll |
| Internal Address | 100 | Where in module memory to store data |
- Save the configuration
- Download to the module (via Ethernet or serial)
Access data from ladder logic
Once the module is running, Modbus data appears in the module’s input tags. Reference the tags in your ladder logic:
MVI56E_MNETC_01:I.Data[100] // First register you configured to internal address 100
MVI56E_MNETC_01:I.Data[101] // Second register
...
Write commands go into the output tags:
MVI56E_MNETC_01:O.Data[0] // Data to write via Modbus
The module handles all the Modbus TCP protocol — you just move data in and out of the tag arrays.
Approach 2 setup: AOI socket messaging
Step-by-step for the free, native ControlLogix approach.
Verify prerequisites
Before starting, check:
- EN2T/EN2TR module present? — Check the Controller Organizer for a 1756-EN2T, EN2TR, or EN3TR. If you only have an ENBT, this approach will not work — upgrade the module first.
- Firmware supports socket services? — Verify that your EN2T firmware supports socket services. Available features depend on the firmware revision. Right-click the EN2T module → Properties → Internet Protocol tab and look for the socket services option. Older firmware revisions may not include it and can be updated with the appropriate Rockwell firmware package.
- Enable socket services on the EN2T — In the module properties, check Enable Socket Services. Save and download the project.
Import a Modbus TCP AOI
You need an AOI that implements Modbus TCP client behavior. Sample sources:
- Rockwell sample code library and socket messaging examples (samples demonstrate the socket instructions but usually require Modbus protocol logic to be added)
- Community AOIs from PLCS.net, Reddit r/PLC, or GitHub
- Vendor-provided AOIs (some SCADA vendors ship these)
To import an AOI (.L5X file):
- Right-click Add-On Instructions in the Controller Organizer
- Select Import Add-On Instruction
- Browse to the .L5X file and import
- Review the AOI parameters and internal logic
Configure the AOI in your ladder
A typical Modbus TCP client AOI has parameters like:
| Parameter | Description | Example |
|---|---|---|
| Local_Path | Path to the EN2T module | “1, 1” (backplane slot, module slot) |
| Remote_IP | Slave device IP | “192.168.1.50” |
| Remote_Port | Modbus TCP port | 502 |
| Unit_ID | Modbus Unit ID | 1 |
| Function_Code | 1, 2, 3, 4, 5, 6, 15, 16 | 3 |
| Starting_Address | First register | 0 |
| Quantity | Number of registers | 10 |
| Data_In | Response data buffer | Array of INT |
| Data_Out | Data to write buffer | Array of INT |
| Status | AOI execution status | INT |
| Done | Communication complete | BOOL |
| Error | Communication error | BOOL |
| Error_Code | Error details | INT |
Add a rung with the AOI, wire the parameters, and add trigger logic (typically a timer-based poll).
Sample rung structure:
[TON: Poll_Timer, Preset=1000 ms]
[XIC: Poll_Timer.DN] [OTU: Poll_Timer.EN] [Latch AOI trigger]
[AOI: ModbusTCP_Client(Local_Path, Remote_IP=192.168.1.50, ...)]
The AOI internally uses MSG (Message) instructions with socket services to open a TCP connection, send the Modbus request, receive the response, and close the connection. Each poll cycle re-establishes the connection unless the AOI implements connection reuse.
Handle response data
When the AOI’s Done bit sets, the response data is in the Data_In array. Move it into your project’s variables:
[XIC: Done_Bit] [COP: Source=Data_In[0], Dest=Flow_Meter_Registers[0], Length=10]
Handle errors when Error is set:
[XIC: Error_Bit] [OTE: Modbus_Alarm]
[Log: Error_Code]
Byte order and 32-bit values
Modbus registers are 16 bits, but many Modbus devices pack 32-bit floats or integers across two consecutive registers. ControlLogix and Modbus devices may use different byte and word ordering for 32-bit values, depending on the device manufacturer. You often need byte-swap or word-swap logic to interpret the data correctly.
For a 32-bit float from Modbus registers 0 and 1:
// Modbus ABCD (big-endian, big-word):
Real_Value := COP(Registers[0], Real_Value_Buffer, 2) // Copy 2 registers
// Then interpret Real_Value_Buffer as a REAL
// For CDAB (word swap) devices:
COP(Registers[1], Real_Value_Buffer[0], 1) // High word first
COP(Registers[0], Real_Value_Buffer[1], 1) // Then low word
Detailed byte-order patterns are in our Modbus Byte Order and Word Order article — essential reading for any ControlLogix Modbus TCP integration.
Testing your Modbus TCP connection
Once configured (either approach), test with these steps:
Check status LEDs
- ProSoft module: front-panel LEDs show TCP connection status and command execution
- EN2T module with AOI: the module’s network LED shows Ethernet activity; check the AOI Status and Error tags
Use Wireshark
Capture TCP port 502 traffic to see the actual Modbus TCP frames:
- Mirror the switch port carrying Modbus TCP traffic
- Capture with Wireshark filtered on
modbusortcp.port==502 - Verify:
- Requests are going out with correct Unit ID
- Responses are coming back with expected data
- No exception responses (function code + 0x80)
- No TCP retransmissions or resets
See our Wireshark for Modbus TCP guide for setup details.
Use an independent Modbus TCP master
Confirm the target device works with a known-good Modbus master before blaming the ControlLogix setup. Tools like OpenModScan or ModbusMechanic (see our Best Free Modbus Software article) let you talk to the same device directly from a laptop. If the laptop can read the device, the device is fine — the issue is in your ControlLogix configuration.
Verify data in Studio 5000
Open the module tags in Studio 5000 and watch the values:
- ProSoft approach:
MVI56E_MNETC_01:I.Data[100]and following - AOI approach: your Data_In array
Cross-check the raw hex values against what you expect from the Modbus device manual. If the raw bytes look wrong, you likely have a byte-order issue.
Common pitfalls
Real ControlLogix Modbus TCP integrations hit these regularly.
1. Wrong EN2T firmware
Symptom: socket services option not visible, or MSG instructions to sockets fail. Fix: check firmware version and upgrade to a version supporting socket services.
2. Wrong communication module
Symptom: no socket services option at all. Fix: 1756-ENBT does not support socket services. Upgrade to 1756-EN2T, EN2TR, or EN3TR.
3. IP conflict on the network
Symptom: intermittent connection failures. Fix: verify unique IPs across the plant network. Ping tests only tell you what is responding — an IP conflict may respond intermittently as both devices fight for the address.
4. Wrong Unit ID for gateway scenarios
Symptom: Modbus TCP connection succeeds but requests time out. Fix: if talking through a Modbus TCP-to-RTU gateway, the Unit ID must match the target slave’s RS-485 address. See our Modbus Unit Identifier article.
5. Byte order mismatch
Symptom: data reads but values are wrong (huge numbers for a temperature, negative when should be positive). Fix: apply the correct byte and word swap for the target device. Test with a known value.
6. Poll rate too aggressive
Symptom: some responses missed, “Slave Device Busy” (exception 0x06), timeouts. Fix: reduce poll frequency.
7. AOI does not handle exception responses
Symptom: AOI reports success but data is wrong or zero. Fix: check the AOI implementation. Some sample AOIs do not handle Modbus exception responses (function code | 0x80) correctly. Extend the AOI or use a better implementation. See our Modbus Exception Codes Explained article.
8. Forgetting to enable socket services
Symptom: MSG instructions with socket type return errors. Fix: enable socket services in the EN2T module properties, download the project.
9. Mixing up client and server
Symptom: MVI56E-MNETC (client) configured but you actually needed the MVI56E-MNETR (server), or vice versa. Fix: identify whether your PLC is initiating Modbus TCP connections (client role) or responding to them (server role). Different modules for different roles.
10. Ethernet segmentation issues
Symptom: intermittent failures, timeouts under load. Fix: put Modbus TCP traffic on a separate VLAN or physical network from time-critical EtherNet/IP traffic. Modbus TCP flooding can affect EtherNet/IP responsiveness.
Performance considerations
ControlLogix Modbus TCP is not fast compared to EtherNet/IP. Realistic expectations:
| Approach | Typical performance profile | Max devices per module/PLC |
|---|---|---|
| ProSoft MVI56E-MNETC | Handles the Modbus TCP protocol on-module; sustained polling of many slaves with minimal PLC CPU impact | ~60 slaves |
| AOI socket messaging | Performance depends heavily on the AOI implementation, controller CPU, and network conditions. Generally slower per request than a dedicated module because of connection overhead in each poll cycle | Depends on AOI count and CPU load |
For high-frequency data (motor current, position feedback), consider whether Modbus TCP is the right protocol at all. EtherNet/IP or Ethernet Powerlink may fit better for those signals; leave Modbus TCP for slower configuration and status data.
Common questions
Does Allen-Bradley ControlLogix support Modbus TCP?
Not natively. ControlLogix is designed around EtherNet/IP, Rockwell’s own Ethernet protocol. To communicate with Modbus TCP devices from ControlLogix, you need one of three approaches: a third-party in-rack module (typically ProSoft MVI56E-MNETC), Add-On Instructions using socket services on a 1756-EN2T/EN2TR/EN3TR module, or an external Modbus TCP gateway on the network.
Can I do Modbus TCP on ControlLogix without a third-party module?
Yes. Using Add-On Instructions (AOI) with socket services on a 1756-EN2T, EN2TR, or EN3TR Ethernet module, you can implement Modbus TCP client behavior entirely in native ControlLogix code. Sample socket messaging code is available from Rockwell, and community and commercial AOIs are also available. This approach costs nothing but requires programming effort and understanding of the Modbus protocol.
Which ControlLogix modules support socket services?
The 1756-EN2T, 1756-EN2TR, and 1756-EN3TR modules support socket services when running firmware that includes the feature. The older 1756-ENBT does not support socket services and cannot be used for the AOI approach. Available socket features depend on the firmware revision — check the module properties in Studio 5000 and update firmware if needed.
What is the difference between MVI56E-MNETC and MVI56E-MNETR?
Different roles. MVI56E-MNETC is a Modbus TCP client (master) — it initiates requests to Modbus TCP slave devices. MVI56E-MNETR is a Modbus TCP server (slave) — it accepts requests from external Modbus TCP masters and exposes ControlLogix tags as Modbus registers. Pick based on whether your PLC needs to talk to Modbus devices (client) or respond to Modbus queries (server).
Why does my ControlLogix Modbus TCP data look wrong?
Almost always a byte order issue. Modbus devices from different vendors use different byte orders for 32-bit values (floats and long integers) spanning two 16-bit registers. ControlLogix and the Modbus device may store the same 32-bit value in different byte and word arrangements, so you need byte-swap or word-swap logic to interpret the data correctly. Test with a known value first — 1.0 as IEEE 754 float is 0x3F800000, so you can check whether you are reading it correctly.
