Skip to Content

PLC Solution Library · Process plant simulator

Start a turbine or a pump step by step, and stop it safely

A small hydro unit and a pumping station follow the same pattern. The PLC checks the start conditions, runs one step at a time, watches level, flow and vibration, and stops the unit in a known way. In this simulator, one Raspberry PLC 42 runs that sequence.

Start the unit, wear a bearing, block a valve or cut the water. You see every step, every interlock and every alarm.

Choose your plant

Choose a scenario

08:00:00 Free mode · press Start or choose a scenario Simulated values
STOPPEDunit
-step
0 %forebay level
0 %flow, % of rated
0.3vibration, mm/s
0 %speed, % of rated

Start conditions

Event log

    Commands

    In a real plant, the emergency stop is a hardwired safety circuit. The PLC only reads its state.

    About this panel

    Example plant to test the sequence logic. The thresholds are examples. The times are short, so you can follow each step.

    Flow is in % of the rated flow of the turbine or the pump. Vibration is in mm/s RMS. Speed is in % of the rated speed.

    Use x5 to speed up time. The faults and the inflow slider work in every scenario.

    All values are simulated.

    Start sequence

    Each step sends a command, waits for a feedback signal and has a timeout.

      Stop sequence

        Process conditions

        60 %

        Faults to test

        Simulation

        Interlocks and trips

        SignalConditionActionNow

        Example thresholds. You set yours from the machine supplier, your process and the standards that apply to your plant.

        Alarm list

        TimeTagTypeMessageState

        Active: the condition is still there. Acknowledged: an operator has seen it. A trip stays latched until you acknowledge it, clear its cause and press Reset. FIRST OUT marks the first trip of an event.

        What does a PLC check before it starts a turbine or a pump?

        It checks the start conditions, also called permissives. For a small hydro unit: enough water in the forebay (headwater level), the inlet valve and the guide vanes closed, the breaker open, no trip latched and the emergency stop chain closed. For a pump: enough water in the well, the discharge valve closed and the motor stopped. If one condition is missing, the PLC does not start, and it tells you which one is missing.

        After the start, the PLC runs one step at a time. Each step sends a command, waits for a feedback signal, such as a limit switch, a pressure or a speed, and has a timeout. If the feedback does not come in time, the PLC stops the sequence, raises a fault and runs the stop sequence.

        Run the Step timeout scenario and watch the timer of step 3.

        Permissive, interlock, trip: three different jobs

        • Permissive. A condition that must be true before a step can start. It blocks the step. It does not stop a unit that already runs. Example: a pressure difference under 5% across the inlet valve before it opens.
        • Interlock. A condition that the PLC watches while the unit runs. It raises an alarm or starts a normal stop. Example: a low forebay level.
        • Trip. A condition that stops the unit at once and stays latched. You acknowledge it, clear its cause and reset it before a new start. Example: vibration high-high.

        The PLC marks the first trip of an event as FIRST OUT. The alarms that come after it are often consequences of the first one, so the first out tells you where to look.

        The architecture in short

        One Raspberry PLC 42 runs the sequence as a state machine: one state per step, each with its command, its feedback and its timer. The transmitters send 4-20 mA signals: level (LT), flow (FT), vibration (VT) and pressure (PT). Limit switches, the speed pickup (ST) and the breaker contacts go to digital inputs. The commands to the valves, the guide vanes and the breaker leave on digital and analog outputs.

        The PLC sends states and alarms to an HMI or a SCADA, for example over Modbus TCP or MQTT, and keeps an alarm log with time stamps. You write the sequence in Python, Node-RED or C/C++ on the Debian system of the PLC. For a remote site, one optional board adds 4G or LoRa.

        Case studies

        Real projects

        Read the case studies on these applications:

        • Small hydro plant: Raspberry PLC 21 FLEX controllers with a CAN board run the turbine, and a Raspberry PLC 42 in a second cabinet reads the plant signals, such as the forebay level. The logic has the same three stages as this simulator: start, level control and safe stop. Read the case study
        • Water network telecontrol: at each pumping station, an ESP32 PLC 21 starts and stops the pumps on the well level and reports over LoRaWAN. At the treatment plant, a Raspberry PLC 42 reads the 4-20 mA transmitters and the Modbus devices. Read the case study

        What you see in this simulator is a general pattern. The thresholds, the times and the I/O list are examples, not the design of a real plant.

        Design choices you make

        1. Feedback, not timers

        Each step waits for a real signal: a limit switch, a pressure, a speed or a contact. A timer alone only proves that the command left the PLC. Use the timer as a timeout on top of the feedback.

        2. Step timeouts and the way back

        Set each timeout from the real travel time or ramp time, plus a margin. For every step, decide what the PLC does on a timeout. In this simulator, it latches a fault and runs the normal stop sequence.

        3. Normal stop and quick stop

        In a normal stop, the hydro unit unloads before the breaker opens. In a quick stop after a mechanical trip, such as high vibration, the guide vanes close along the fast ramp, the breaker opens near zero load and the inlet valve closes after the vanes. When the grid or the protection relay opens the breaker with load, the speed rises until the guide vanes close: that is a load rejection. Try it with the Grid trip fault. The closing speed of guide vanes and valves is limited by water hammer in the penstock. Your turbine supplier gives these limits.

        A pump closes its discharge valve slowly before the motor stops. On a trip, the motor stops at once and the check valve stops the reverse flow. The surge protection of the pipe is part of the hydraulic design. The pump keeps pumping while the valve closes, so set the stop level with a margin for the closing time.

        4. Protections that stay outside the sequence

        The PLC sequence is process logic. The emergency stop is a hardwired safety circuit. The overspeed protection of a turbine, the generator protection relay and the motor protection of a pump work on their own. The PLC reads their state, runs the stop sequence and logs the event. It does not replace them.

        5. Synchronization

        With a synchronous generator, the voltage regulator (AVR) excites the generator near the rated speed. Then an automatic synchronizer, or a protection relay with a synchronism check, sends raise and lower pulses to the PLC speed loop and to the AVR, matches voltage, frequency and phase, and closes the breaker. The PLC enables it and waits for the breaker closed contact. With an induction generator, the breaker closes near synchronous speed and there is no synchronizer.

        6. Vibration thresholds

        4.5 and 7.1 mm/s are example values. Take your alarm and trip values from the machine supplier and from the ISO 20816 series, for example ISO 20816-5 for machine sets in hydro plants. Add a delay to the trip, so a short peak does not stop the unit.

        7. 4-20 mA signals on 0-10 V inputs

        The analog inputs of the Raspberry PLC 42 measure 0-10 V. For a 4-20 mA transmitter, add a precision shunt resistor: 500 Ω gives 2-10 V. To also see the high fault (21 mA or more, NAMUR NE 43), use a lower value such as 470 Ω. Check that your loop supply still gives the transmitter its minimum voltage. A reading of 3.6 mA or less means a broken wire or a failed transmitter. Treat it as a fault, not as a low level.

        Example I/O list for one unit

        This list follows the simulator. Your plant may need more signals, for example bearing temperatures or a second pump.

        SignalI/O typeSmall hydroPumping station
        Level, flow and vibration transmitters (LT, FT, VT)I/O type: Analog input, 4-20 mA with a shuntSmall hydro: 3Pumping station: 3
        Pressure before and after the inlet valve (PT)I/O type: Analog inputSmall hydro: 2Pumping station: -
        Guide vane positionI/O type: Analog inputSmall hydro: 1Pumping station: -
        Speed pickup (ST)I/O type: Digital input with interruptSmall hydro: 1Pumping station: -
        Valve limit switches (OPEN, CLOSED)I/O type: Digital inputSmall hydro: 3Pumping station: 2
        Breaker closed, protection relay tripI/O type: Digital inputSmall hydro: 2Pumping station: -
        Synchronizer raise and lower pulsesI/O type: Digital inputSmall hydro: 2Pumping station: -
        Motor running, motor protection faultI/O type: Digital inputSmall hydro: -Pumping station: 2
        E-stop chain state, reset buttonI/O type: Digital inputSmall hydro: 2Pumping station: 2
        Valve open and close commandsI/O type: Digital outputSmall hydro: 3Pumping station: 2
        Synchronizer enable, breaker open commandI/O type: Digital outputSmall hydro: 2Pumping station: -
        Excitation enableI/O type: Digital outputSmall hydro: 1Pumping station: -
        Motor start commandI/O type: Digital outputSmall hydro: -Pumping station: 1
        Alarm lamp and hornI/O type: Digital outputSmall hydro: 2Pumping station: 2
        Guide vane set pointI/O type: Analog output, 0-10 VSmall hydro: 1Pumping station: -
        Total usedI/O type: Analog in · digital in · digital out · analog outSmall hydro: 6 · 10 · 8 · 1Pumping station: 3 · 6 · 5 · 0

        One Raspberry PLC 42 has 12 analog inputs, 14 digital inputs, 10 digital outputs and 6 analog outputs, so one unit leaves spare I/O. For more units or more signals, add remote I/O over Modbus RTU on one of the two RS-485 ports. Check the input frequency of your speed pickup and the ratings of your loads in the datasheet. The outputs are transistor outputs: drive the breaker coil, the valve actuators and the motor contactor through interposing relays.

        Raspberry PLC 42: the specs that matter here

        Inputs26: 12 analog/digital (0-10 V, 12-bit) and 14 digital optoisolated, 5 to 24 Vdc, 4 with interrupt
        Outputs16: 6 analog/digital/PWM (0-10 V, 12-bit) and 10 digital optoisolated, 5 to 24 Vdc. No relay outputs.
        ComputerRaspberry Pi 4, quad core 64-bit, Debian 64-bit preinstalled
        Network1 x Gigabit and 1 x 10/100 Ethernet, Wi-Fi, Bluetooth LE
        Serial2 x RS-485 half duplex with 120 Ω termination, TTL serial, I2C, SPI
        ReliabilityUPS with supercapacitors for a safe shutdown, real-time clock with battery
        Power supply12 to 24 Vdc with polarity protection
        MountingDIN rail TS35, IP20, inside a cabinet, 0 to 50 °C
        ExpansionOne optional board: CAN, LoRa or 4G

        Full specs: Raspberry PLC 42 · Raspberry PLC family datasheet · all Raspberry Pi based devices.

        Learn the building blocks

        These examples cover parts of this pattern. Some use an ESP32 PLC: the logic is the same.

        More examples: PLC Solution Library · all simulators.

        FAQ

        What is a start permissive in a PLC sequence?

        A permissive is a condition that must be true before the PLC starts a unit or a step. Examples: enough water level, a valve in its closed position, no trip latched. If a permissive is missing, the PLC blocks the start and shows which condition is missing. A permissive does not stop a unit that already runs. Interlocks and trips do that.

        What is the difference between an interlock and a trip?

        An interlock watches a condition while the unit runs and raises an alarm or starts a normal stop, for example on low water level. A trip stops the unit at once, for example on high-high vibration, and stays latched. Before a new start, you acknowledge the trip, clear its cause and reset it.

        Why does a small hydro unit open a bypass valve before the inlet valve?

        To fill the turbine side and equalize the pressure across the inlet valve. A large valve that opens against the full pressure difference sees high forces and wear. The PLC waits for a pressure difference under a set value, 5% in this simulator, and then opens the inlet valve.

        Why does a centrifugal pump start against a closed discharge valve?

        A centrifugal pump needs the least power at zero flow. A start against a closed valve limits the starting load, and a slow opening limits pressure surges in the pipe. Check it on your pump curve: some pumps, such as axial flow pumps, need the opposite. Keep that time short: a centrifugal pump must not run for long below its minimum continuous flow, or the water heats up and the pump vibrates. That is why the valve opening has a timeout and why the PLC trips on low flow. Some stations add a minimum flow recirculation line.

        Which vibration values should trigger an alarm and a trip?

        It depends on the machine. The values in this simulator, 4.5 mm/s for the alarm and 7.1 mm/s for the trip, are examples. Use the values of your machine supplier and the ISO 20816 series for your machine type (ISO 20816-5 covers machine sets in hydro and pump-storage plants), and add a delay to the trip so a short peak does not stop the unit.

        Which signals does the PLC need to run this sequence?

        For one unit in this simulator: level, flow, vibration and pressure as 4-20 mA signals, the limit switches of each valve, and the contacts of the breaker or the motor. The example I/O list above counts them: 6 analog inputs, 10 digital inputs, 8 digital outputs and 1 analog output for the small hydro unit, and fewer for the pumping station. All of them fit on one Raspberry PLC 42. To wire a 4-20 mA transmitter to a 0-10 V input, see the 4-20 mA level sensor example.

        Do I need to be a programmer to build this?

        The sequence is a list of steps, conditions and timeouts, like the one in this simulator. On the Raspberry PLC 42 you can write it in Node-RED with flow blocks, or in Python or C/C++. The examples linked above cover the I/O parts. If you prefer, an integrator can write the program from your step list and your I/O list.

        Get the I/O list for your plant

        Tell us about your plant: turbines or pumps, signals and protections. Our team replies with a proposed I/O list and start sequence for your case. Your simulator settings go with the request.