Shared ladder program

Ladder logic: 3 rungs with CMP, DIV, CLR

A runnable ladder logic program with 3 rungs using CMP, DIV, CLR, OTE. Open it in the free browser PLC simulator to edit, run and fork it. No install, no account.

Open a blank sandbox
RUNG 1Cycle_Count> 0DIV Avg_Cycle_MsTotal_Ms ÷ Cycle_Co…RUNG 2Cycle_Count≤ 0CLR Avg_Cycle_Ms:= 0RUNG 3Avg_Cycle_Ms> 5000Running_Slow
Static preview of the shared program. The live editor is below.

What's in this program

CMPDIVCLROTE
  • 3 rungs
  • Uses a compare instruction

Instructions used: CMP (compare instruction), DIV (divide two values), CLR (clear a register), OTE (output energise coil).

Edit & run it live

Loading the interactive editor…

More example programs

Want to build your own? Open the free ladder logic sandbox.