Type to search, in English or Thai

  1. Home
  2. English lessons
  3. PLC Automation
  4. Ladder Simulator

// Chapter 22.10 · PLC · Ladder Simulator

PLC Ladder Simulator in the Browser: Write Programs, See Power Flow, Timers, Counters and Ready-Made Examples

Open this page and start programming a PLC straight away. Pick an example from the menu, press the inputs on the left, watch the green lines showing how far power flows, then open “Edit the program” to write your own rungs. The program is drawn as ladder for you automatically.

By Ajarn ModUpdated

Simulator

Program syntax

One line is one rung, written as a Boolean equation similar to Structured Text. Text after # or // is a comment (shown beside the rung).

WriteMeaningIn ladder
Q0.0 = I0.1 & I0.2ANDContacts in series → coil
Q0.0 = I0.1 | Q0.0ORContacts in parallel
!I0.2NOTNC contact
S Q0.0 = … / R Q0.0 = …SET / RESETCoil (S) / (R)
P(I0.1) / N(I0.1)Rising / falling edgeContact marked P / N
T1 = TON(I0.0, 5s)TON, TOF, TP timers; time in s or msTON block T1 · use T1 as its Q contact
C1 = CTU(I0.2, I0.3, 6)Up-counter (count, reset, PV)CTU block C1 · use C1 as its Q contact

Variables: I0.0–I1.7 inputs (read-only) · Q0.0–Q1.7 outputs · M0.0–M9.7 memory · T1… C1… · TRUE FALSE · AND OR NOT may be used instead of & | ! · a NOT in front of brackets is distributed with De Morgan's theorem before drawing.

Buttons with a dashed border are NC-wired devices: the input is 1 when not pressed · inputs from the “simulated plant” (water level, part-counting sensor) cannot be pressed; they change with the simulated process.

8 worksheets

1 · Self-holding

DOL example: delete | Q0.0 and load. Explain the result. Then change I0.0 to !I0.0 and explain why the motor will not run at all.

2 · Two-location control

Add STOP2 (I0.3) and START2 (I0.4) buttons to the DOL circuit following the rule STOPs in series, STARTs in parallel (new inputs in the simulator are NO buttons, so write STOP2 as !I0.3).

3 · Interlock

Reversing example: press FWD and REV at the same time (two fingers). Which Q turns on? Delete & !Q0.1 and try again. Explain the risk.

4 · Dead time

Star–delta example: change T2 to 0ms and watch the simulated plant at the changeover. Then delete & !Q0.1 in the Q0.2 rung.

5 · Scan time

Parts-counter example: increase the scan time to 200 ms. Does the counter still count every part? Compare with formula F4.

6 · Flasher

Change it to on 0.2 s, off 0.8 s, then make two lamps flash alternately (Q0.0 and Q0.1).

7 · Night-mode traffic light

Add a switch I0.1 “night mode” that makes the amber lamps in both directions flash and turns all other lamps off.

8 · Tank filling with an alarm

Add a watchdog timer: if the pump runs for more than 20 s without reaching LH, stop the pump and light alarm lamp Q0.3 until RESET (I0.5) is pressed.

Frequently asked questions

Can this simulator replace a real PLC?

It is good for practising logic, scan order, timers and counters, but it does not simulate hardware, communications or brand-specific instructions. Once you understand the basics, continue with the manufacturer's software, which has its own simulator, or with a real PLC in the lab.

Ajarn Mod · Teerawut Savangboon
Lecturer in Electrical Engineering, Dhonburi Rajabhat University, Samut Prakan · Profile