Skip to main content

Allen-Bradley Overview

The ALLEN_BRADLEY route enables communication with Rockwell Automation PLCs using native protocols. It supports ControlLogix, CompactLogix, PLC5, SLC500, Micro800, and MicroLogix families with TAG-based addressing and bidirectional communication.
Allen-Bradley PLCs use tag-based programming. Access PLC tags directly by their symbolic names for the most intuitive configuration.

Basic Syntax

DEFINE ROUTE AllenBradleyPLC WITH TYPE ALLEN_BRADLEY
    ADD ALLEN_BRADLEY_CONFIG
        WITH IP "192.168.1.100"
        WITH DEVICE_FAMILY '0'
        WITH SLOT '0'
    ADD MAPPING ProcessData
        WITH EVERY 500 MILLISECONDS
        ADD TAG Temperature
            WITH ADDRESS "MainProgram:Temperature"
            WITH DATA_TYPE "REAL"
            WITH SOURCE_TOPIC "plc/temperature"

Supported Device Families

Device FamilyParameter ValueDescription
ControlLogix0ControlLogix 5000 series
PLC51PLC/5 processors
SLC5002SLC 500 processors
ControlLogix PLC53PLC5 emulation on ControlLogix
Micro8004Micro800 series
MicroLogix5MicroLogix 1100/1400
Omron6Omron NJ/NX (CIP compatible)
ControlLogix (0) is the most common setting for modern Allen-Bradley systems including CompactLogix and ControlLogix PLCs.

Connection Configuration

ALLEN_BRADLEY_CONFIG Parameters

IP
string
required
PLC IP address.
DEVICE_FAMILY
integer
Device family type (0-6, see table above). Default: 0 (ControlLogix).
PORT
integer
Communication port. Default: 44818.
SLOT
integer
CPU slot number in chassis. Default: 0.
PATH
string
Routing path for accessing PLCs through network infrastructure. Format: port,slot pairs separated by commas.
TIMEOUT
integer
Connection timeout in milliseconds. Default: 5000.

Connection Examples

Direct connection to ControlLogix or CompactLogix:
ADD ALLEN_BRADLEY_CONFIG
    WITH IP "192.168.1.100"
    WITH DEVICE_FAMILY '0'
    WITH SLOT '0'
    WITH TIMEOUT '5000'

Tag Addressing

Allen-Bradley uses symbolic tag names. The address format depends on the tag scope:
ScopeFormatExample
ControllerTagNameTemperature
ProgramProgram:TagNameMainProgram:Counter
Array elementTagName[index]Temperatures[0]
UDT memberTagName.MemberMotor1.Speed

Data Types

Data TypeLogix TypeSizeDescription
BOOLBOOL1 bitBoolean value
SINTSINT8 bitsSigned 8-bit integer
INTINT16 bitsSigned 16-bit integer
DINTDINT32 bitsSigned 32-bit integer
LINTLINT64 bitsSigned 64-bit integer
USINTUSINT8 bitsUnsigned 8-bit integer
UINTUINT16 bitsUnsigned 16-bit integer
UDINTUDINT32 bitsUnsigned 32-bit integer
ULINTULINT64 bitsUnsigned 64-bit integer
REALREAL32 bits32-bit floating point
LREALLREAL64 bits64-bit floating point
STRINGSTRINGVariableASCII string

TAG Configuration

Complete TAG Example

ADD TAG MotorSpeed
    WITH ADDRESS "Motor1.ActualSpeed"
    WITH ADDRESS_TYPE "SYMBOL"
    WITH DATA_TYPE "REAL"
    WITH SOURCE_TOPIC "plc/motor1/speed"
    WITH SCALING "1"
    WITH OFFSET "0"
    WITH UNIT "RPM"
    WITH DECIMAL_PLACES "2"
    WITH MIN_VALUE "0"
    WITH MAX_VALUE "3600"
    WITH DEADBAND "10"
    WITH PUBLISH_MODE "JSON"
    WITH WRITABLE "false"
    WITH DESCRIPTION "Motor 1 actual speed in RPM"

TAG Parameters

ADDRESS
string
required
Tag name in PLC (e.g., MainProgram:Temperature, Motor1.Speed, Temperatures[0]).
ADDRESS_TYPE
string
Address type: SYMBOL (default) or PATH.
DATA_TYPE
string
required
Logix data type: BOOL, SINT, INT, DINT, LINT, USINT, UINT, UDINT, ULINT, REAL, LREAL, STRING.
SCALING
double
Multiplier for value transformation. Default: 1.0.
OFFSET
double
Offset added after scaling. Default: 0.0.
DECIMAL_PLACES
integer
Decimal places in output. Default: 2.
MIN_VALUE
double
Minimum allowed value.
MAX_VALUE
double
Maximum allowed value.
DEADBAND
double
Minimum change to trigger publish. Default: 0.0.
SOURCE_TOPIC
string
required
MQTT topic for read values.
DESTINATION_TOPIC
string
MQTT topic for write commands.
PUBLISH_MODE
string
Output format: VALUE_ONLY or JSON. Default: VALUE_ONLY.
UNIT
string
Engineering unit for documentation.
DESCRIPTION
string
Human-readable description.
WRITABLE
boolean
Allow writing to this tag. Default: false.

Event-Based Operations

For on-demand operations:
ADD EVENT ReadOnDemand
    WITH SOURCE_TOPIC "ab/commands/read"
    WITH DESTINATION_TOPIC "ab/responses/read"
    WITH QUERY '{"operation": "READ", "variable": "MainProgram:Counter", "data_type": "DINT"}'

Complete Examples

Read controller-scoped tags:
DEFINE ROUTE ControlLogixBasic WITH TYPE ALLEN_BRADLEY
    ADD ALLEN_BRADLEY_CONFIG
        WITH IP "192.168.1.100"
        WITH DEVICE_FAMILY '0'
        WITH SLOT '0'
    ADD MAPPING ProcessTags
        WITH EVERY 500 MILLISECONDS
        ADD TAG Temperature
            WITH ADDRESS "Temperature"
            WITH DATA_TYPE "REAL"
            WITH SOURCE_TOPIC "plc/temperature"
            WITH UNIT "°F"
        ADD TAG Pressure
            WITH ADDRESS "Pressure"
            WITH DATA_TYPE "REAL"
            WITH SOURCE_TOPIC "plc/pressure"
            WITH UNIT "PSI"
        ADD TAG Running
            WITH ADDRESS "SystemRunning"
            WITH DATA_TYPE "BOOL"
            WITH SOURCE_TOPIC "plc/running"

Troubleshooting

  • Verify IP address is correct
  • Check DEVICE_FAMILY matches your PLC type
  • Ensure SLOT is correct (usually 0 for CompactLogix)
  • Verify firewall allows port 44818
  • Check PLC is in Run mode
  • Verify tag name matches exactly (case-sensitive)
  • For program-scoped tags, include program name: MainProgram:TagName
  • Check tag exists in PLC project
  • Ensure tag is not local to a routine
  • Verify PATH format: port,slot pairs
  • Check network modules are configured correctly
  • For IP in path, use: port,slot,port,IP,port,slot
  • Increase TIMEOUT for multi-hop routes
  • Ensure WRITABLE is set to “true”
  • Verify PLC is in Remote Run mode
  • Check tag is not constant or read-only
  • Verify value is within data type range
  • Verify DATA_TYPE matches PLC tag definition
  • REAL for floating point, DINT for 32-bit integers
  • Check array vs. single value configuration

Next Steps