Skip to content
Ladder logic (PLC) templates

Ladder - Tank Fill on Level Switches

Seven rungs latch the fill valve on the low-level switch and leave the unlatch rung unpowered because the high-level switch has not made, run the 180 s overfill watchdog out to 96 s, and end on a deliberate interlock chain with no coil, so the engine reports both the never-energised overfill alarm and the rung whose logic is solved and thrown away.

Template previewLadder logic (PLC)
Process tank - fill on level switches with an overfill watchdogDECLARED INPUT STATELSL_Low = 1Auto = 1Pump_Enable = 1LSH_High = 0Vent_Open = 0L1N1Low level in auto latches the fill valveTRUELSL_Low1Auto1SFill_Valve12High level is the only thing that unlatches itFALSELSH_High0RFill_Valve13Fill pump follows the valve while the pump is enabledTRUEFill_Valve1Pump_Enable1Fill_Pump14Watchdog - 180 s of filling with no high levelTRUEFill_Pump1LSH_High0TONT_FillPRE 180 sACC 96 sDN5Overfill alarm on the watchdog done bitFALSET_Fill.DN0Overfill_Alarm06Vent fan runs while filling or while the vent is commandedTRUEFill_Pump1Vent_Open0Vent_Fan17Interlock chain left without a coil - the destination was ...TRUEAuto1Pump_Enable1Overfill_Alarm07 rungs solved in one scan: 5 true, 2 false. 13 tags, 5 declared as inputs.1 output is never energised in this state: 'Overfill_Alarm'.Rung 7 has no output -- the logic is solved and thrown away.

Make it your own.

title "Process tank - fill on level switches with an overfill watchdog"
state: LSL_Low, Auto, Pump_Enable, LSH_High=0, Vent_Open=0

rung "Low level in auto latches the fill valve"
  --] [--LSL_Low----] [--Auto----(S)--Fill_Valve

rung "High level is the only thing that unlatches it"
  --] [--LSH_High----(R)--Fill_Valve

rung "Fill pump follows the valve while the pump is enabled"
  xic Fill_Valve
  xic Pump_Enable
  ote Fill_Pump

rung "Watchdog - 180 s of filling with no high level"
  xic Fill_Pump
  xio LSH_High
  ton T_Fill preset: 180 accum: 96 unit: s

rung "Overfill alarm on the watchdog done bit"
  xic T_Fill.DN
  ote Overfill_Alarm

rung "Vent fan runs while filling or while the vent is commanded"
  branch
    xic Fill_Pump
    xic Vent_Open
  ote Vent_Fan

rung "Interlock chain left without a coil - the destination was deleted"
  xic Auto
  xic Pump_Enable
  xio Overfill_Alarm