Connect to Rockwell PLCs by Tag Name
TheALLEN_BRADLEY route connects Coreflux to Rockwell Automation PLCs using symbolic tag names over EtherNet/IP (libplctag). Define an ALLEN_BRADLEY_CONFIG block, add TAGs with PLC tag addresses, and publish each data point to its own MQTT topic — with optional scaling, units, deadband, and bidirectional writes.
For explicit CIP paths (
4.100.3.0), use the EtherNet/IP route instead. This route is for symbolic tag-name access; EtherNet/IP is for Class/Instance/Attribute addressing.Route and config aliases
Key capabilities
- Symbolic tag names — controller-scoped, program-scoped, UDT members, and arrays
- Multiple PLC families — ControlLogix, CompactLogix, Micro800, MicroLogix, PLC5, SLC500
- TAG-based polling — per-point MQTT topics with configurable intervals
- Bidirectional writes —
WRITABLEtags withDESTINATION_TOPIC - Engineering units —
SCALING,OFFSET,UNIT,DECIMAL_PLACES, min/max clamping - Publish modes —
VALUE_ONLY(default) orJSONwith quality metadata
Quick Start
- Poll a controller tag
- Read and write
- Micro800
Read a controller-scoped DINT counter every second:
Connection Configuration
ALLEN_BRADLEY_CONFIG Parameters
The config block may be declared as
ADD ALLEN_BRADLEY_CONFIG or ADD AB_CONFIG — both are equivalent.ConnectAsync marks the route ready; libplctag opens a transport per tag read/write. -checkRouteConnection confirms the route is loaded but does not probe the PLC — verify connectivity with polling or a test read.Device Family Codes
Connection Examples
- ControlLogix / CompactLogix
- MicroLogix
- Through backplane
- Micro800
Standard backplane path to CPU in slot 0:
Tag Addressing
Allen-Bradley PLCs use tag-based addressing (not register numbers). Tag names are case-sensitive.Tag naming rules
- Letters, numbers, and underscore only
- Must start with a letter or underscore
- Case-sensitive
- No spaces
Data Types
STRING encoding
Depends onDEVICE_FAMILY:
- ControlLogix / CompactLogix (default): 4-byte DINT length prefix + up to 82 ASCII characters
- Micro800: 1-byte length prefix + characters
STRING_SIZE for the maximum string buffer size when needed.
TIME encoding
Raw value is a signed 32-bit millisecond count. MQTT publishes Allen-Bradley-style duration strings (for exampleT#1h1m1s1ms).
TAG Configuration
Every polled data point is anADD TAG inside an ADD MAPPING block.
Complete TAG Example
TAG Parameters
Address and data type
Address and data type
string
required
PLC tag name — controller-scoped (
MainCounter), program-scoped (Program:MainProgram.Counter), UDT member (Valve1.Status), or array (Temps[0]).string
SYMBOL (default) or PATH.string
required
Logix data type:
BOOL, SINT, INT, DINT, LINT, USINT, UINT, UDINT, ULINT, REAL, LREAL, STRING, TIME, etc.integer
Maximum string buffer size for
STRING tags. Default: 256.Value transformation
Value transformation
Filtering
Filtering
Publishing and writes
Publishing and writes
string
required
MQTT topic where polled values are published.
string
VALUE_ONLY (default) or JSON (value, unit, quality, timestamp, description).boolean
When
"true", subscribe to DESTINATION_TOPIC and write incoming MQTT values to the PLC.string
MQTT topic to receive write commands. Required when
WRITABLE is "true".string
Human-readable description (included in JSON publish mode).
Publish Modes
VALUE_ONLY (default) — publishes just the scaled value:Event-Based Operations
For on-demand tag reads and writes (not continuous polling), add anADD EVENT block. Publish any message to SOURCE_TOPIC to trigger the operation; results appear on DESTINATION_TOPIC.
Query Parameters
Read Example
Write Example
Examples
- Multiple data types
- UDT members
- Array elements
- Control loop
- Scaled analog
Monitor BOOL, DINT, and REAL tags in one mapping:
Best Practices
Choose the correct device family
Choose the correct device family
Use
DEVICE_FAMILY 0 for ControlLogix and CompactLogix (most common), 4 for Micro800, and 5 for MicroLogix. Legacy PLC5/SLC500 families (1/2) only for existing installations.Program scope
Program scope
Controller-scoped tags use the name alone (
GlobalCounter). Program-scoped tags need the full prefix: Program:MainProgram.LocalCounter.PATH vs SLOT
PATH vs SLOT
Set the CPU slot in
PATH ("1,0" for backplane 1, slot 0). SLOT is kept for legacy parity but libplctag routes via PATH.Deadbands and polling
Deadbands and polling
Use
DEADBAND on noisy analog values. Match EVERY to how fast the value changes — 500 ms for critical data, 1–5 s for slow status.Troubleshooting
Connection failed
Connection failed
- Verify IP with
ping - Confirm port 44818 is open
- Ensure PLC is powered on and in RUN mode
- Check
DEVICE_FAMILYmatches your controller type - Increase
TIMEOUTon slow networks - Remember:
-checkRouteConnectiondoes not probe the PLC — use a polling TAG to verify
Tag not found
Tag not found
- Tag names are case-sensitive — match Studio 5000 exactly
- Program-scoped tags need
Program:ProgramName.TagName(notProgramName:Tag) - Verify the tag exists in Controller Tags or Program Tags in Studio 5000
- For UDTs, include the member:
Valve1.StatusnotValve1 - For arrays, include the index:
Temps[0]notTemps
Path errors
Path errors
- Use
PATH "1,0"for standard backplane routing (backplane, slot) - For Micro800, omit
PATHor leave it unset - Multi-hop paths use comma-separated segments:
"1,2,2,1"through bridge modules
Micro800 issues
Micro800 issues
- Set
DEVICE_FAMILY 4 - Use Micro800 I/O tag names (
_IO_EM_DI_00,_IO_EM_AI_00) - STRING uses 1-byte length prefix (not ControlLogix 4-byte format)
Write operations fail
Write operations fail
- Set
WRITABLE "true"and provideDESTINATION_TOPIC - PLC must be in Remote Run mode
- Verify
DATA_TYPEmatches the PLC tag definition - Check value is within
MIN_VALUE/MAX_VALUEif set
Data type mismatch
Data type mismatch
- Match PLC types exactly: DINT →
DINT, REAL →REAL, BOOL →BOOL TIMEtags publish asT#...duration strings on MQTT
Next Steps
EtherNet/IP Route
Explicit CIP Class/Instance/Attribute addressing for assembly objects and legacy devices.
Industrial Routes Overview
Compare OT routes and choose the right protocol for your devices.

