Shared ladder program

Ladder logic: 5 rungs with CMP, SUB, OTE

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

Open a blank sandbox
RUNG 1SUB Parts_RemainingBatch_Ta… − Parts_Ma…RUNG 2Parts_Remaining< 1Batch_CompleteRUNG 3SUB Fill_ErrorFill_Act… − Fill_Tar…RUNG 4ABS Fill_DeviationABS Fill_Err…RUNG 5Fill_Deviation> 25Fill_Out_Of_Spec
Static preview of the shared program. The live editor is below.

What's in this program

CMPSUBOTEABS
  • 5 rungs
  • Uses a compare instruction

Instructions used: CMP (compare instruction), SUB (subtract two values), OTE (output energise coil), ABS.

Edit & run it live

Loading the interactive editor…

More example programs

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