Sunil Saharan

PLC Ladder Logic Simulator (Online)

Build a ladder diagram, press Run, press the inputs and watch the rungs light up. Includes timers (TON, TOF, TP), up, down and up-down counters, compare contacts and add / subtract blocks, a live timing chart, and small machines (tank, motor, conveyor, lamps) that react to your outputs. Start from the examples: motor start-stop, traffic light, tank level, conveyor batch counter, car park. Files open and save in the same .plclab.json format as the PLC & Circuit Lab in the Sunil Saharan app, so you can continue on your phone.

Loading the tool…

Everything runs in your browser. What you type, and any file you choose, is not sent to the server.

Formulas used

  • Scan cycle: read inputs, solve rungs top to bottom, write outputs (one scan = 10 ms of simulated time)
  • Seal-in: (START or MOTOR) and not STOP -> MOTOR
  • TON: output Q turns on after the input has been on for the preset time
  • Counter: CV counts rising edges; Q is on when CV >= preset (a down counter: when CV reaches 0)
  • Math block: result = A + B or A - B while its rung has power

Frequently asked questions

Is this a real PLC?

No. It is a classroom simulator with a deterministic scan cycle and simulated time, so every run of a program gives the same result. It teaches ladder logic that you can then write on a real PLC in its own software.

Which instructions are supported?

Normally open and normally closed contacts, rising and falling edge contacts, compare contacts (>, >=, <, <=, =, <>) on timer, counter and math words, output, set and reset coils, TON, TOF and TP timers, up, down and up-down counters, and add and subtract blocks.

Can I open my project in the app and the other way round?

Yes. Use Save file to download a .plclab.json file and open it in the PLC & Circuit Lab in the Sunil Saharan app, or open a file from the app here. Circuit projects are not supported in the browser.

Is my program sent to the server?

No. Everything runs in your browser. The program is kept in your browser's local storage so it is still there when you come back.