PLC Exercises

Practice PLC programming with hands-on exercises spanning digital logic, motor control, timers, math, and sequencing.

1Pick an exercise
Browse the exercises below and choose one that matches your skill level.
2Read the spec
Each exercise describes the inputs, outputs, and expected behavior your solution must satisfy.
3Solve in Rungs Studio
Open the exercise in Studio, write your solution, then click Test in the toolbar to verify your work.
NOT Gate
Implement a logical NOT gate that inverts a boolean input.
beginner
AND Gate
Implement a logical AND gate that outputs true only when both inputs are active.
beginner
LED Control
Control an LED output based on the logical combination of two push-button inputs.
beginner
Find Max Value
Find and output the maximum integer of two provided DINT inputs.
beginner
Constant Pass-Through
Pass an input integer to an output and provide a constant value at a second output.
beginner
Pressure Comparator
Monitor a pressure value against a static threshold to determine if a critical motor state is reached.
beginner
Toggle Output
Toggle a boolean output state on the rising edge of a button input.
beginner
Loop Counter
Increment a count value based on dual-stage counter logic (MicroCount and MacroCount) while enabled.
beginner
Greenhouse Watering System
Control greenhouse sprinklers based on soil moisture levels with hysteresis.
beginner
Nested Loop Control
Perform a nested loop calculation every scan when enabled and report the total iteration count.
intermediate
Coffee Machine Control
Control a coffee machine via a 5-state machine: Idle, Heating, Grinding, Brewing, and Ready.
intermediate
Sandwich Maker
Control a sandwich assembly process based on bread presence and multiple ingredient sensors.
intermediate