Motor and valve control blocks

What a reusable equipment block must do: commands from modes, feedback supervision, discrepancy alarms, local/remote, maintenance — the logic behind the FB generator.

One block per equipment type

Plants contain hundreds of motors and valves. Writing their logic once as a function block (a control module) gives identical behaviour, identical HMI faceplates and much less testing.

Motor block — functions

FunctionDetail
Command sourcesAuto (sequence), manual (operator), local (field buttons) — exactly one active
Permissives / interlocks / tripsSee interlocks
Run command outputTo contactor or VFD
Running feedbackContactor auxiliary contact or drive status
Fail to startCommand ON but no feedback within T start → alarm, command off
Unexpected stop / discrepancyFeedback lost while running, or feedback without command
External faultOverload relay, VFD fault
Maintenance / simulationLock-out, simulation of feedback for testing without the plant
StatisticsStarts counter, running hours

Valve block — differences

  • Two feedbacks (open / closed limit switches) or a position signal.
  • Travel time supervision for opening and closing separately.
  • Both limit switches active at once → position error.
  • Safe position on fault depends on the process (fail-open / fail-closed) and on the actuator (spring return).

Design rules

  • Command and feedback are different signals — never use the command as "running" indication.
  • Alarms latch until reset when the cause is gone.
  • Expose a status word for HMI/SCADA (running, fault, mode, interlocked) rather than many separate tags.

Generate a starting point for Siemens, CODESYS, TwinCAT or generic IEC with the Function Block Generator.

Loading the map…

Sources

  1. IEC 61131-3:2025 Programmable controllers — Part 3: Programming languages — IEC
  2. TwinCAT 3 PLC Library Tc2_Standard — Beckhoff Automation

Updated 2026-10-02