Language: EN
Request a demo
Solutions

Allen-Bradley EtherNet/IP to MQTT

PLCGateway reads ControlLogix, CompactLogix, GuardLogix and Micro800 controllers by tag name over EtherNet/IP and publishes the values to your MQTT broker.

Logix controllers address data by tag name, and PLCGateway uses the same names: it browses the controller and program tags over EtherNet/IP (CIP), you select the ones to publish, and each becomes an MQTT topic. Nothing is added to the controller program, and no RSLinx or OPC server is needed in between.

Reads are packed into multiple-service requests, members of user-defined types and array elements are addressed directly, and values are published when they change. That keeps the communication load on the controller low.

Connection
EtherNet/IP · TCP 44818
Target
MQTT
Writing
yes

Set it up in five steps

  1. Add an EtherNet/IP device with the IP address of the controller or its Ethernet module.

  2. For ControlLogix enter the route path (for example 1,0 for the CPU in slot 0); Micro800 needs none.

  3. Open the tag browser, select controller or program tags and add them in one step.

  4. Open Gateway → MQTT, enter the broker address, port and login, switch on TLS if the broker requires it, and choose the base topic.

  5. Choose publishing on change or at an interval and the JSON or plain-value format, then check the topics with mosquitto_sub or in your platform.

Example: topics and payloads

A device with the id filler1 and these tags is published as shown below; the lines are what mosquitto_sub -v prints. Names and values are examples.

TagAddressExample value
MotorSpeedMotor_Speed1180.5 rpm
PumpRunningLine1.Pump.Runningtrue
BottleCountProgram:MainProgram.Counter48213

MQTT topics and payloads

plcgateway/status online
plcgateway/filler1/MotorSpeed {"q":"GOOD","t":1794465246839,"u":"rpm","v":1180.5}
plcgateway/filler1/PumpRunning {"q":"GOOD","t":1794465246839,"v":true}
plcgateway/filler1/BottleCount {"q":"GOOD","t":1794465246839,"v":48213}

Topic: base topic / device id / tag name. The JSON payload carries the value (v), the quality (q), the timestamp in milliseconds (t) and the unit (u).

The MQTT publisher in PLCGateway

PLCGateway publishes every tag to your MQTT broker – Mosquitto, EMQX, HiveMQ, AWS IoT Core or a cloud platform behind a bridge – so IT systems subscribe to topics instead of polling the controller. It speaks MQTT 3.1.1 over TCP or TLS, with user name and password.

Values are sent when they change or at a fixed interval, as JSON with quality and timestamp or as the bare value. A retained status topic with a last will tells subscribers whether the gateway is online.

  • One topic per tag: base topic / device / tag, with a base topic of your choice
  • QoS 0 or 1, retained messages, birth message and last will
  • Optional writing: a value published to the tag's /set topic is written to the controller
  • Messages are queued while the broker is unreachable and sent after the reconnect
MQTT publisher settings: broker, TLS, base topic, publish mode and payload format

Questions and answers

Do I need RSLinx or FactoryTalk Linx?

No. PLCGateway talks EtherNet/IP to the controller directly. Only the older PLC-5, SLC 500 and MicroLogix families are connected through RSLinx Classic with the OPC DA client.

Can it read UDTs and arrays?

Yes. Members of user-defined types (Line1.Pump.Running), array elements (Recipe[4]) and single bits of integers (StatusWord.3) are addressed directly.

How do I reach a ControlLogix CPU behind a communication module?

Enter the route path, for example 1,0 for the CPU in slot 0 of the same chassis. Micro800 controllers need no path.

Connect your machines

Tell us which controllers you run; we show you PLCGateway with your own addresses.

Product and model names are trademarks of their owners. They are named only to show which equipment the drivers communicate with; PLCGateway is not affiliated with these companies.

PricingRequest a demo