skinny.

Latest / Factory Field Notes

Ep. 23 | AOIs and UDTs: When to Use Them, When to Avoid Them, and When They Become a Monstrosity [Q&A]

AOIs and UDTs are the fastest way to make a PLC program maintainable and the fastest way to make it impossible to troubleshoot. This episode works through where that line sits, plus four more questions from r/PLC.

Subscribe for weekly industrial automation discussions built from the most upvoted questions in the community.

Learn more at Joltek:

- OT Networking Fundamentals, the full course: https://www.joltek.com/education/ot-networking-fundamentals

- Rockwell PLC Lifecycle and Migration Guide: https://www.joltek.com/blog/rockwell-plc-lifecycle-migration-guide

- Safety in Industrial…

Read the full description

Automation: https://www.joltek.com/blog/safety-industrial-automation-manufacturing

The meme that started this puts a beginner being told to learn how to code next to a veteran recognising his own Add On Instruction in a dozen places. Both ends of that bell curve are real, and the middle is where the damage happens. An AOI is syntactic sugar, a wrapper around logic you would otherwise copy, the same idea as a function in Python or C++. It feels harder because of the interface, not the concept. A function written in ladder logic is genuinely unusual if you learned to program anywhere else.

The rule of thumb I use is to avoid AOIs and UDTs until you are replicating and editing the same code often enough that changing every instance by hand is the larger risk. At that point pair them, because the UDT carries the data and the AOI carries the execution. The failure mode is version sprawl. Tank version 1.3, tank 1.4, tank 2.7 and tank 2.8 in one project is not an AOI any more. It is four programs wearing the same name, and it defeats the reason you created it.

Nesting deserves its own warning. In traditional software a pipeline runs tests and tells you what broke when an inner function changes. On the plant floor that safety net does not exist, so a change two levels down surfaces as a machine behaving strangely at 2 AM.

On reverse engineering, the drawings are worth more than people assume. A 60 year old pipe bender that still bends 80 millimetre tube with a 10 millimetre wall is usually better built than its replacement. Start from the schematic, then talk to the operators, because the undocumented changes made over decades are what the drawings will not tell you. The SIMATIC 505 in that project began as a Texas Instruments product, moved to Siemens, was discontinued, and is built today by Control Technology Inc.

The 5069 question has a clean diagnostic order. When the backplane shows one slot and the rest flash, stop trying to flash the analog module and flash the controller first. Then pull every card, seat one module with no field wiring attached, confirm it appears in RSLinx, and add the next.

The career question closes it out. Hands on electrical troubleshooting is an advantage over a pure software background, not a gap to apologise for, because this field sits between the physical and the software and you have lived the half that cannot be simulated. Average controls engineer compensation reached $119,682 in 2025 and 38% of manufacturers name the skilled worker shortage as a top threat.

Timestamps

0:00 Intro and what this series is

0:53 A home PLC training rig, and what to add next

3:36 Managed switches, Stratix and Moxa on a learning bench

5:24 Safety circuits you troubleshoot but never design

6:17 Build an IPC or a spare PC to run Ignition and Node RED

8:08 The AOI love hate meme from r/PLC

10:26 Why an AOI is syntactic sugar

11:01 When an AOI and UDT pair earns its place

13:21 The AOI bell curve across a career

15:01 Tank version 1.3, 1.4, 2.7: when it stops being an AOI

15:30 Nesting AOIs, and why no test pipeline catches it

16:43 Converting a 60 year old pipe bender from relays

19:30 The SIMATIC 505, from Texas Instruments to CTI

21:22 Why you still talk to the operators

22:36 A used washer and dryer, and the schematic in the lid

24:34 A 5069 IF8 card and a backplane that sees one slot

26:48 Flash the controller first, not the analog module

28:01 Strip the rack to one card and build back up

30:45 From industrial electrician to PLC progr

Log in to save or queue this episode.

Short listen plan

No short plan yet. We need saved quotes in chapters with known start and end times, backed by a timed transcript.

The skinny

The skinny isn't ready yet — notes appear once the transcript is processed.