Skip to content

29Industrial patterns

Motors and valves in practice: permissives, feedback and travel time

What every motor and valve block needs on a real project: permissives versus interlocks, run feedback with a timeout for failed-to-start, trip reset, valve travel time and position feedback, and local/remote.

Lesson 29 of 3413 minIEC 61131-3

Permissive or interlock?

The two words get used interchangeably on site, and that is an expensive mistake. The difference is when each one is checked:

Permissive

Interlock

Checked

only at the start command

every scan

Effect

prevents starting

stops what is running

Example

upstream valve is open

thermal overload tripped

If it appears while running

nothing

it stops immediately

Mix them up and you get either a motor that drops out for no reason because a start permissive went away mid-run, or a safety interlock that is ignored because it was only checked at the start. The second one hurts people.

Run feedback, and why it needs a timeout

You commanded the pump. Did it run? A digital output means the PLC asked, not that the shaft turned. Proof of running is run feedback: a contactor auxiliary contact, a flow switch, or a status word from the drive.

The right structure is: commanded, waited a sensible time, no feedback, therefore failed to start.

FbkDly(IN := CmdRun AND NOT RunFbk, PT := T#3s);
IF FbkDly.Q THEN
  FailStart := TRUE;
END_IF;

Three seconds suits a contactor; a large star-delta motor may want 8 to 12. The same timer also catches loss of feedback while running, which is what happens when the overload trips with the run command still on.

Trip reset

A latched fault does not clear itself, and it does not clear from the start button. Reset clears the fault and does not start. One press to clear, a second press on start to run. That means whoever pressed reset looked at the machine before starting it, which is the whole point.

Valves: travel takes time

A valve is not a digital output. You command it and it begins to move, and moving takes one to thirty seconds depending on size and actuator.

  • With position feedback: two limit switches, ZSO and ZSC. The timeout is the stated travel time plus margin, typically 1.5 times. No limit switch at the end means a "failed to open" fault.
  • Without position feedback: do not pretend you know the position. Use a timer as an estimate and name the variable VlvAssumedOpen, not VlvOpen.
  • Impossible states are faults: both limits made means a failed switch or a shorted wire. Neither limit made after the timeout means the valve stuck mid-travel. Those are two separate faults.

Local and remote

The local/remote selector is not decoration, it is the basis of maintenance work. In local, the field station has control, and the PLC must be prevented from starting the motor even if SCADA asks. Interlocks still apply: local grants start authority, never the right to defeat safety.

And remember: a safety stop never goes through the PLC. The mushroom button, the pull-cord and the safety relay are wired into the contactor circuit directly, or into a certified safety controller. The PLC reads that the stop is active so it can display and log it. It is not relied on to do the stopping.

The lamp tells the state

Three states from one lamp: off means stopped, flashing means commanded with no feedback yet, steady means confirmed running. A technician reads that from across the room.

Try it in the lab

The lab runs in your browser: an ST editor, a virtual process that suits the lesson, the same program as a live ladder diagram, a watch table, and export to Siemens SCL.

What to try

  1. Run the program and press START: watch the current fall in star, then a small rise at the change to delta.
  2. Turn on OVERLOAD TRIP: everything stops and Fault latches. Turn it off, then press STOP to reset.
  3. Remove NOT KDelta from the KStar line and NOT KStar from the KDelta line, and use StarTmr.Q instead of GapT.Q: if the two overlap you get a SHORT Y+Δ.
  4. Try PT := T#0s for star: a direct start with a high current trips the overload relay.

Terms in this lesson

People find this lesson by searching

motor control block plc structured textpermissive vs interlock plcrun feedback timeout plcfailed to start fault logicvalve travel time plcvalve position feedback limit switchlocal remote selector plcpump start logic plc

Course outline

  1. 01What is Structured Text, and when to use it instead of ladder
  2. 02How a PLC runs your code: the scan cycle and the process image
  3. 03Program structure: POUs, PROGRAM, FUNCTION and FUNCTION_BLOCK
  4. 04Your first program: starting a pump with seal-in logic
  5. 05Data types: BOOL, INT, REAL, TIME and the rest
  6. 06Declaring variables: VAR, VAR_INPUT and RETAIN
  7. 07Literals and constants: 16#FF, 2#1010 and T#5s
  8. 08Type conversion and scaling a 4-20 mA signal
  9. 09Assignment and arithmetic in ST: := and operator precedence
  10. 10Boolean logic, comparisons and bit operations
  11. 11Standard functions: ABS, SQRT, MIN, MAX, LIMIT, SEL, MUX
  12. 12IF, ELSIF and ELSE: the rules and when to avoid them
  13. 13The CASE statement and your first state machine
  14. 14The FOR loop and the watchdog
  15. 15WHILE, REPEAT, EXIT, CONTINUE and RETURN
  16. 16Edge detection: R_TRIG, F_TRIG and the "it fired every scan" bug
  17. 17Timers: TON, TOF and TP
  18. 18Counters: CTU, CTD and CTUD
  19. 19SR and RS flip-flops: which one wins
  20. 20Writing your own function
  21. 21Writing a function block
  22. 22Arrays in Structured Text
  23. 23Structs and enumerations
  24. 24References and pointers
  25. 25The state machine pattern: a batch sequence that cannot get stuck
  26. 26Alarm management to ISA-18.2: delay, deadband, latch, acknowledge, first-out
  27. 27Analogue signal processing: counts to engineering units, NE43 and filtering
  28. 28Closed-loop control in ST: hysteresis first, then a practical PID
  29. 29Motors and valves in practice: permissives, feedback and travel time
  30. 30The same ST on every platform: SCL, Studio 5000, CODESYS, TwinCAT
  31. 31Testing and debugging ST: the watch table, forcing and simulation
  32. 32An ST style guide: naming, comments, constants and version control
  33. 33Final project: a complete tank station with a state machine and alarms
  34. 3420 interview questions on ST and PLC programming, with answers