🚧 Under construction — VoTechWorks is being built. A free tech program — complimentary, as our commitment to get America working.
voTechWorksGrade 13 · a vocational technology learning center, by urbanicity
newSchoolWorks.com › VoTechWorks › Manufacturing & Marine › Robotics / Mechatronics › Programmable Logic Controllers for Mechatronics › Lesson 4
MFG-MECH15-02 · Lesson 4 · 16 clock hours · lab

Ladder Diagram Programming — Fundamentals

Objective. Students will write and download ladder diagram programs that use examine-if-closed (XIC), examine-if-open (XIO), output coil (OTE), set (OTL), and reset (OTU) instructions to control a three-rung seal-in starter circuit and a latched output.

⚠ Pending professional review

This lesson, its worked examples and its practice questions has not yet been verified by a licensed engineer or certified journey-level tradesperson or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.

VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.

What Is a Ladder Diagram?

A ladder diagram (LD) is one of the five IEC 61131-3 PLC programming languages. Its name comes from its visual shape: two vertical rails (like the sides of a ladder) connected by horizontal rungs. Each rung is a logic circuit. The PLC scans all rungs from top to bottom, left to right, in a continuous loop called the scan cycle. On each scan the processor reads all physical inputs, solves the logic, and updates all physical outputs.

Ladder diagrams were designed to look like the relay-logic drawings electricians already knew, making them the most common starting point for learning PLC programming in manufacturing and mechatronics.

Core Instructions

XIC — Examine If Closed. Passes power (logic continuity) when the tag it references is TRUE (bit = 1). On a motor starter, the Start pushbutton input tag uses an XIC so that logic flows only when someone presses the button.

XIO — Examine If Open. Passes power when the tag it references is FALSE (bit = 0). The Stop pushbutton is wired normally-closed (NC) in hardware, so its input tag is normally TRUE; in the program a matching XIC passes power at rest. Alternatively, a normally-open Stop button can be wired and its tag referenced with XIO — power passes only while the button is NOT pressed. Either wiring scheme is valid; know which one your trainer uses before programming.

OTE — Output Energize. The standard output coil. When the rung goes TRUE the output bit is set to 1; when the rung goes FALSE the bit resets to 0. Suitable for momentary control.

OTL — Output Latch. A retentive set instruction. Once the rung goes TRUE, the output bit stays at 1 even if the rung later goes FALSE. Only an OTU on a separate rung can reset it.

OTU — Output Unlatch. The retentive reset instruction paired with OTL. When its rung goes TRUE the bit resets to 0 and stays there until OTL fires again.

The Seal-In (Memory) Circuit

A motor starter needs to keep running after the operator releases the Start button. The classic three-rung approach uses a seal-in (holding) contact:

A second rung (overload) and a third rung (indicator light) can be added for a complete three-rung program, but the seal-in logic lives in that first rung.

The Latched Output Circuit

For a pilot light that must stay on independently of any button, use OTL/OTU:

Pressing the Latch pushbutton fires OTL and the light stays on. Pressing the Unlatch pushbutton fires OTU and the light goes off. This is useful for alarms, mode indicators, and any condition that must be acknowledged before resetting.

Online Monitoring and Debugging

After downloading your program, go online with the PLC. The software shows green (highlighted) contacts when their bits are TRUE and gray contacts when FALSE. This lets you trace logic flow rung by rung without a voltmeter — but a DMM is still your primary tool for confirming actual wire voltage at terminals.

When debugging, work systematically:

1. Check the online view first — which contact is not passing when you expect it to?

2. If the input contact shows no highlight even when the field device is actuated, suspect wiring or the wrong tag address.

3. Confirm input voltage with a DMM at the input terminal (check that voltage is within spec for the input module — typically 24 V DC on training hardware).

4. If the output coil shows TRUE but the device does not energize, suspect output wiring or a blown fuse on the output module.

Safety: Lock Out Before You Touch Hardware

Before connecting or disconnecting any wiring on the PLC trainer, you must follow OSHA 29 CFR 1910.147 (Control of Hazardous Energy). Apply your personal lock to the energy-isolation device, verify stored energy is released, and verify absence of voltage with a meter before touching terminals. NFPA 70E requires you to verify the absence of voltage with a properly rated and tested meter — never assume a circuit is dead because the software shows outputs as OFF. The PLC can re-energize an output the instant a scan completes.

Inspect all terminal connections for bare conductors that could create a shock or arc hazard. Wear safety glasses whenever the trainer is energized. Machine guarding requirements (OSHA 1910.212) apply once actual motor loads are running — keep hands clear of any rotating parts during tests.

Download and Verify Procedure

1. Verify your tags match the physical I/O map on the trainer label.

2. Save your project file before going online.

3. Put the PLC in Program mode, download, then switch to Run mode.

4. Test each pushbutton in sequence; confirm the online view matches your expectation.

5. Log the results — observed behavior, any faults found, corrective action taken — in your lab log and have the instructor initial it.

Key terms9

XIC (Examine If Closed)A ladder diagram input instruction that passes logic continuity (is TRUE) when the referenced bit is 1; equivalent to a normally-open contact in relay logic.
XIO (Examine If Open)A ladder diagram input instruction that passes logic continuity when the referenced bit is 0; equivalent to a normally-closed contact in relay logic.
OTE (Output Energize)A non-retentive output coil instruction; the bit is 1 only while the rung is TRUE, and resets to 0 as soon as the rung goes FALSE.
OTL (Output Latch)A retentive set instruction; once the rung goes TRUE the output bit stays at 1 until an OTU instruction on another rung resets it.
OTU (Output Unlatch)A retentive reset instruction paired with OTL; when its rung goes TRUE the output bit is forced to 0 and remains there until OTL fires again.
Seal-in contactAn XIC instruction that references the motor-run output bit and is wired in parallel with the Start contact; it holds the rung TRUE after the Start button is released, keeping the motor running.
Scan cycleThe continuous loop in which the PLC reads all input states, solves all program logic, and updates all output states; typically completes in a few milliseconds.
Online monitoringA mode in PLC programming software where the live bit states of tags are displayed on the ladder diagram in real time, allowing technicians to trace logic flow for troubleshooting.
Tag addressThe unique name or memory address assigned to an I/O point or internal variable in the PLC program; an incorrect tag address is a common programming fault.
In class: Guided programming: instructor demonstrates a motor seal-in circuit (Start/Stop pushbutton + holding contact) on-screen; students replicate the rung on their own workstation from memory, download, and operate physical pushbuttons to verify start, run, and stop functions. · Latched output exercise: students write a two-rung program using OTL/OTU to latch a pilot light on with one button and unlatch with another; run in simulation first, then test on the hardware trainer; capture a screen recording or screenshot of the working online view for the lab log. · Debugging drill: instructor introduces three pre-seeded faults (wrong tag address, missing seal-in contact, shorted input wiring); students must find and document each fault using the online monitoring view and DMM within 20 minutes.
Materials: PLC programming software, PLC trainer, pushbuttons, pilot lights, DMM, USB/Ethernet programming cable, pre-seeded fault list (instructor copy), lab log
Check: Seal-in and latched-output programs both operate correctly on hardware (demonstrated to instructor); all three faults identified and documented with correct root-cause explanation; lab log entry initialed by instructor.

Practice check8

Answer each question, then check it. Nothing is recorded; this is your own practice.

Programmable Logic Controllers
1. An XIC instruction referencing a Stop pushbutton tag passes logic continuity when the tag value is:
Programmable Logic Controllers
2. In a motor seal-in circuit, what is the purpose of placing an XIC(Motor_Run) contact in parallel with the XIC(Start) contact?
Programmable Logic Controllers
3. A pilot light controlled by OTL is lit. The PLC loses power and then restores it. What is the state of the pilot light output bit after the PLC returns to Run mode?
Programmable Logic Controllers
4. During online monitoring, the XIC(Start) contact highlights green when the Start button is pressed, but the OTE(Motor_Run) coil never turns ON. The most likely cause is:
Safety and Compliance
5. Before connecting new wiring to the PLC trainer terminals, a student must follow which OSHA standard for controlling hazardous energy?
Programmable Logic Controllers
6. A student writes a two-rung latch program. Rung A: XIC(Btn_Latch) → OTL(Light). Rung B: XIC(Btn_Unlatch) → OTU(Light). Both buttons are pressed simultaneously during a test. According to PLC scan order, what is the final state of the Light bit?
Safety and Compliance
7. NFPA 70E requires a technician to verify the absence of voltage before touching de-energized conductors. The correct tool for this verification is:
Programmable Logic Controllers
8. A student's seal-in program runs correctly in simulation but the motor does not start during hardware testing. The online view shows the Motor_Run output bit IS turning ON. The most appropriate next diagnostic step is:
Record this lesson on my transcript. Sign in with your key and enrollment email to record lessons (enroll free if you have no key). This page stays open to read and practise.