To reuse a routine in Logix, you don't copy and paste it: you package it as an Add-On Instruction. Define the logic once, give it parameters, and it drops onto the rung like a built-in instruction. Each instance carries its own tag, so a motor AOI works identically on motor 1 or motor 50, and the instances never share state.
The AOI aoi_Motor is defined once at the top, with its interface (Inputs, Outputs) and hidden Local tags. Below, it's instanced on three conveyor motors. Each instance is a separate backing tag (Mtr_1, Mtr_2, Mtr_3): run one and only its state changes. The code is shared and the data is isolated, exactly like a function block instance on other platforms, in Rockwell's own flavour.
Press "Fix a bug": one edit to the definition applies to all three instances at once, because they share the same code. Yet Mtr_1.Runtime never bleeds into Mtr_2. AOIs are also version-stamped and can be source-protected, so a vendor can ship logic you use but can't see.
π₯ Input parameters are the values passed in each scan (Start, Stop, a setpoint). They are copied in when the instruction executes.
π€ Output parameters are the results the AOI produces (Running, Fault, Runtime), and the calling routine can see them.
π Local tags are the AOI's private workspace (seal-in bits, timers). They are hidden from the outside, which gives each instance real encapsulation.
π An InOut parameter is a reference to a tag passed by alias (e.g. a whole UDT), so the AOI works on the caller's data directly.
You fix a bug in aoi_Motor, used as 40 instances. How many places must you edit?