Appearance
Common Ladder Patterns
Last updated
License feature: Ladder LogicB_…, N_… and F_… are Program Tags; tags with a path are Device Tags.
Start/stop seal-in
- XIC
Start_PBwith a parallel branch holding XICLine1/Motor_Cmd→ XIOStop_PB→ XICOverload_OK→ OTELine1/Motor_Cmd
Pressing Start energizes the motor command; the branch contact on the command itself keeps the rung true after Start is released, until Stop or the overload breaks it. Because it is an OTE, the command drops when the task stops if When the task is stopped is Switch outputs off.
Start/stop with a latch
The same circuit with latch and unlatch rungs, useful when the run state must survive a restart:
Rung 1: ─┤ Start_PB ├──────────────(L) B_Motor_Run
Rung 2: ─┤/ Stop_PB_NC ├───────────(U) B_Motor_Run
Rung 3: ─┤/ Overload_OK ├──────────(U) B_Motor_Run
Rung 4: ─┤ B_Motor_Run ├───────────( ) Line1/Motor_Cmd- Rung 1: XIC
Start_PB→ OTLB_Motor_Run. - Rung 2: XIO
Stop_PB_NC(a normally-closed stop button is on while not pressed) → OTUB_Motor_Run. - Rung 3: XIO
Overload_OK→ OTUB_Motor_Run. - Rung 4: XIC
B_Motor_Run→ OTELine1/Motor_Cmdon Local Tags.
Because the unlatch rungs come after the latch rung, Stop wins if both buttons are pressed. The run bit is retentive: after a restart the motor command comes back on if it was on — add a rung that unlatches it on start-up if that is not acceptable.
OR logic
Put the conditions on parallel branches: XIC Door1_Open with a branch XIC Door2_Open → OTE B_AnyDoorOpen.
Without branches, give each condition its own latch rung, then one unlatch rung with all conditions false:
- Rung 1: XIC
Door1_Open→ OTLB_AnyDoorOpen - Rung 2: XIC
Door2_Open→ OTLB_AnyDoorOpen - Rung 3: XIO
Door1_Open→ XIODoor2_Open→ OTUB_AnyDoorOpen
For numeric 0/1 values an OR block also works: OR N_Door1 with N_Door2 into N_Any, then NEQ N_Any ≠ 0.
Safety interlock chain (for HMI permissive only)
- XIC
EStop_OK→ XICGuard_Closed→ XICAir_Pressure_OK→ OTELine1/Ready - Any contact going false drops Ready. This is an indication for operators, not a safety function — the real interlock belongs in safety-rated hardware.
Latched alarm with acknowledge
- Rung 1: GRT
Furnace/Temp> Literal450→ OTLFurnace/HighTempAlarm(Local Tags) - Rung 2: XIC
Furnace/AckPB→ LESFurnace/Temp< Literal440→ OTUFurnace/HighTempAlarm
The second compare stops an acknowledge from clearing the alarm while the temperature is still high, and gives 10 °C of hysteresis.
Resettable batch counter
- Rung 1: XIC
Infeed/PartSensor→ CTU AddressC5:0, Preset 50 - Rung 2: XIC
C5:0/DN→ OTELine1/BatchComplete - Rung 3: MOV Source
C5:0.ACC→Line1/PartCount(Local Tags) - Rung 4: XIC
Line1/BatchResetPB→ RESC5:0
The Local Tags count is only written when it changes. The same with integer math:
- Rung 1: OSR
Infeed/PartSensor→ ADD Source AN_Parts+ Literal1→ DestinationN_Parts→ MOVN_Parts→Line1/PartCount(Local Tags) - Rung 2: GEQ
N_Parts≥ Literal50→ OTELine1/BatchComplete - Rung 3: XIC
Line1/BatchResetPB→ CLRN_Parts→ MOV Literal0→Line1/PartCount
The OSR makes the ADD happen once per part, and the MOV to Local Tags runs only when the count changes — not every scan.
Run-hour meter
An RTO with an address accumulates while the spindle runs and RES clears it after a service: RTO T4:1 (Preset large, e.g. 1800000000 ms), then GEQ T4:1.ACC ≥ Literal 1800000000 → OTE Spindle/ServiceDue, and XIC Spindle/ServiceDonePB → RES T4:1.
Or make a self-resetting one-minute pulse and count the pulses:
- Rung 1: XIO
B_Pulse→ XICSpindle/Running→ TON Preset (ms) 60000 → OTEB_Pulse - Rung 2: XIC
B_Pulse→ ADD Source AN_RunMinutes+ Literal1→ DestinationN_RunMinutes - Rung 3: GEQ
N_RunMinutes≥ Literal30000(500 h) → OTESpindle/ServiceDue(Local Tags) - Rung 4: XIC
Spindle/ServiceDonePB→ CLRN_RunMinutes
On the scan the TON finishes, B_Pulse turns on and rung 2 adds a minute; on the next scan the XIO opens, the TON resets and B_Pulse turns off. Each minute lasts one scan longer than 60 s, which is negligible. If the spindle stops part-way through a minute, that part-minute is lost. N_RunMinutes is saved every 10 s.
Debounced input
- XIC
Tank/LevelSwitch→ TON Preset (ms) 2000 → OTEB_LevelHigh_Debounced
The output only turns on after the switch has been on continuously for 2 s, and drops as soon as it opens. For an off-delay too, follow with a TOF.
Analog scaling and a threshold
- Rung 1: SCP Input
Boiler/Pressure_Raw, Input 6400–32000, Output 0–10, DestinationF_PressureBar - Rung 2: GRT
F_PressureBar> Literal8.5→ OTEB_PressureHigh - Rung 3: OSR
B_PressureHigh→ OTLBoiler/PressureHigh(Local Tags) - Rung 4: OSF
B_PressureHigh→ OTUBoiler/PressureHigh
Rungs 3 and 4 write the Local Tags tag only on the scan the internal bit changes, instead of on every scan — the cheap way to publish a result for a dashboard or an alarm.
Timed step sequence (without SFC)
- Rung 1: XIC
B_Step1→ TON Preset (ms) 5000 → OTUB_Step1→ OTLB_Step2 - Rung 2: XIC
B_Step2→ OTEMixer/Agitator(Local Tags)
When the TON finishes, the same rung ends step 1 and starts step 2; on the next scan XIC B_Step1 is false and the timer resets. For more than two or three steps, use an SFC chart.