Learning library

Use a ladder logic simulator

A practical workflow for editing a ladder diagram, running virtual inputs, observing outputs and checking the result in PLC Practice Lab.

Start from an observable goal

A ladder logic simulator lets you evaluate a control program using virtual inputs and outputs. In PLC Practice Lab, the diagram, variable table and device feedback describe the same program. Choose a short exercise with a specific rule, such as “Lamp is on only when both buttons are pressed,” rather than beginning with an unrestricted blank project.

The reference solution is already loaded when you open an exercise. Read its goal and I/O assignment first. Run it once before editing so you know what correct behavior looks like. Passing the supplied checks at this point confirms the reference, not that you have independently solved the exercise.

Edit the program

Use Start blank to rebuild the example yourself, or modify the reference one condition at a time. Insert NO or NC contacts, select their variables and choose a coil or supported function block. Series conditions belong on one path; alternative conditions belong on separate parallel branches.

Use the I/O table to distinguish input, output and internal variables. Addresses are virtual training labels. A contact reads its selected variable, while an output writes its target. The editor reports invalid programs, including unsupported duplicate output writers, before execution.

Run and observe transitions

Click Run and operate the device inputs. Compare the input bit with the conducting path and the output. For a latch, check both the initial Start press and its release. For TON, inspect elapsed time and the done output. For CTU, hold Pulse true, release it and press again to separate a level from a rising edge.

Pause freezes simulated time. Single scan advances the logic in one 20 ms step, which is useful for following state changes. A browser animation is not a guarantee of hardware timing; reason from the scan model and observed variables.

Verify and keep your work

Run the automatic exercise cases after editing. They check named input sequences and expected outputs. Read the failed condition and compare it with your predicted behavior instead of changing several unrelated contacts at once. The provided cases cover the exercise specification, not every possible industrial operating condition.

Save stores the program locally in your browser. Export JSON for a file backup or use a share link to send a readable program snapshot. Browser storage is not an account or cloud backup. Load reference restores the supplied program when you want to compare your attempt with a working solution.

Practice this lesson

Each walkthrough includes a reference diagram and a link to its editable simulator. Review the simulation limitations when comparing results with another environment.

Continue learning