Shared ladder program

Ladder logic: 3 rungs with rising-edge, CMP, XIC

A runnable ladder logic program with 3 rungs using rising-edge, CMP, XIC, ADD, MOD, OTE. Open it in the free browser PLC simulator to edit, run and fork it. No install, no account.

Open a blank sandbox
RUNG 1PPart_SensorADD Part_IndexPart_Ind… + 1RUNG 2MOD Part_RemainderPart_Ind… mod 5RUNG 3Part_Remainder= 0Part_SensorDivert_Gate
Static preview of the shared program. The live editor is below.

What's in this program

rising-edgeCMPXICADDMODOTE
  • 3 rungs
  • Uses a compare instruction

Instructions used: rising-edge (one-shot rising-edge contact), CMP (compare instruction), XIC (examine-if-closed contact (normally open)), ADD (add two values), MOD, 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.