Allen-Bradley Reference
Free reference guide: Allen-Bradley Reference
About Allen-Bradley Reference
The Allen-Bradley PLC Reference is a searchable quick-reference for Rockwell Automation Allen-Bradley programmable logic controllers, covering the instruction set used in Studio 5000 Logix Designer (formerly RSLogix 5000) for ControlLogix and CompactLogix platforms. It provides instant access to ladder logic instructions, timer and counter blocks, data manipulation commands, Add-On Instructions (AOI), User-Defined Types (UDT), EtherNet/IP communication, PID control, and Sequential Function Chart programming.
This reference organizes Allen-Bradley PLC instructions into six practical categories: Ladder Instructions (XIC, XIO, OTE, OTL/OTU, ONS for relay logic and edge detection), Timers/Counters (TON on-delay, TOF off-delay, RTO retentive, CTU/CTD up/down counters), Data Instructions (MOV, ADD/SUB/MUL/DIV arithmetic, EQU/GRT/LES comparisons, CPT compute, SCP analog scaling, COP array copy), AOI/UDT (Add-On Instructions, User-Defined Types, Controller vs Program tags, Alias tags), Communication (MSG explicit messaging, Produced/Consumed tags, GSV/SSV system values), and Program Control (JSR/SBR/RET subroutines, PIDE enhanced PID, SFC sequential control, Fault routines).
Each entry includes the instruction mnemonic, a description of its behavior and scan-time execution, and a practical code example showing parameter configuration. Whether you are writing a motor start/stop circuit with seal-in logic, configuring TON timers for delay-on sequences, setting up EtherNet/IP Produced/Consumed tag exchange between PLCs, tuning a PIDE temperature loop, or building reusable valve control AOIs, this reference provides the exact syntax and parameter names used in Studio 5000.
Key Features
- Ladder logic instruction reference for XIC (NO contact), XIO (NC contact), OTE (output), OTL/OTU (latch/unlatch), and ONS (one-shot rising edge) with scan-behavior descriptions
- Timer and counter blocks including TON (on-delay), TOF (off-delay), RTO (retentive accumulating), CTU (count up), and CTD (count down) with PRE, ACC, and DN bit explanations
- Data manipulation instructions for MOV, arithmetic (ADD/SUB/MUL/DIV), comparison (EQU/NEQ/GRT/LES/GEQ/LEQ), CPT expression compute, SCP analog scaling, and COP array block copy
- AOI and UDT design patterns with input/output parameter definitions, Controller vs Program tag scoping, and Alias tag I/O mapping examples
- EtherNet/IP communication reference for MSG explicit messaging (CIP Data Table Read/Write), Produced/Consumed implicit tag exchange with RPI settings, and GSV/SSV system value access
- Program control instructions including JSR/SBR/RET subroutine calls with parameter passing, PIDE enhanced PID with KP/KI/KD tuning and CV limits, and SFC step/transition programming
- Fault handling with Major Fault Record access via GSV, fault type/code identification (Type 4 I/O, Type 6 Instruction), and recovery strategies
- Category filtering across Ladder Instructions, Timers/Counters, Data Instructions, AOI/UDT, Communication, and Program Control for targeted lookup
Frequently Asked Questions
What is the difference between XIC and XIO in Allen-Bradley ladder logic?
XIC (Examine If Closed) is a normally-open contact that evaluates True when the addressed bit is 1 (ON). XIO (Examine If Open) is a normally-closed contact that evaluates True when the bit is 0 (OFF). In a motor start/stop circuit, XIC is used for the Start button and XIO for the Stop button: --| |-- Start --|/|-- Stop --( )-- Motor. This creates fail-safe logic where the Stop button defaults to energized.
How do TON, TOF, and RTO timers differ?
TON (Timer On-Delay) starts timing when the enable input goes TRUE and sets the DN bit after the preset (PRE) elapses; it resets when the input goes FALSE. TOF (Timer Off-Delay) keeps the DN bit ON for the preset duration after the input goes FALSE. RTO (Retentive Timer On) accumulates time whenever the input is TRUE and retains the ACC value when the input goes FALSE, requiring a manual RES instruction to reset. Use RTO for total runtime tracking.
What is an Add-On Instruction (AOI) and when should I create one?
An AOI is a user-defined reusable instruction block in Studio 5000 that encapsulates logic with defined input, output, and local parameters. Create AOIs for repeated control patterns like valve control (CmdOpen, CmdClose, FbkOpen, FbkClose inputs; OutOpen, OutClose, Fault outputs) or motor starters. AOIs promote code reuse, standardization across projects, and easier maintenance since updates to the AOI definition propagate to all instances.
How do I exchange data between two ControlLogix PLCs over EtherNet/IP?
Use Produced/Consumed tags for real-time implicit messaging. On the producer PLC, create a Produced tag (e.g., Prod_Data as DINT[10]) with Multicast connection. On the consumer PLC, add the producer as a module in the I/O tree and create a Consumed tag pointing to the remote Produced tag with an appropriate RPI (Requested Packet Interval, e.g., 20 ms). For on-demand data, use the MSG instruction with CIP Data Table Read/Write.
What is the SCP instruction used for?
SCP (Scale with Parameters) performs linear interpolation to convert a raw analog input value to an engineering unit value. You specify InputMin, InputMax, OutputMin, and OutputMax. For example, scaling a 0-27648 raw AI value to 0-100% would use InputMin=0, InputMax=27648, OutputMin=0.0, OutputMax=100.0. This is essential for converting 4-20 mA or 0-10 V analog signals from field transmitters to meaningful process values.
How do I configure a PIDE loop for temperature control?
The PIDE (Enhanced PID) instruction takes PV (process variable from temperature sensor), SP (setpoint), and tuning gains KP, KI, KD. Set CVHLimit and CVLLimit to constrain the control output range (e.g., 0-100% for a heater). The output CV drives the heater. Start with P-only control, then add integral action to eliminate steady-state error. PIDE also supports auto-tuning, anti-windup, and manual/auto transfer modes.
What are Controller Tags vs Program Tags?
Controller Tags are global and accessible from any program, routine, or AOI in the controller. They are typically used for I/O mapping, inter-program data sharing, and HMI communication. Program Tags are local to a specific program and not accessible from other programs, providing encapsulation. Use Controller Tags for shared data (Motor_Speed, System_Ready) and Program Tags for internal logic variables to prevent unintended cross-program access.
How does fault handling work in Allen-Bradley PLCs?
Each program can have a designated Fault Routine that executes when a major fault occurs within that program. Use GSV (Get System Value) with Class=PROGRAM, Attribute=MajorFaultRecord to read fault details into a structure containing Type and Code. Type 4 indicates I/O faults, Type 6 indicates instruction faults. You can clear faults programmatically and implement recovery logic. For controller-level faults, configure a Controller Fault Handler in controller properties.