Pro
40 min

Tank Fill — 3D Process Skid

3dprocesshysteresisalarmpumps
Tank Fill — 3D Process Skid scenario preview

Ready to build this?

Sign up free — no credit card required. This scenario requires the Pro plan.

Sign up to play this scenario →

Already have an account? Log in

Briefing

A dual-pump tank fill station with lead/lag alternation. Pressing START arms the controller; the *lead* pump then fills the tank whenever the LOW level switch is made, and drops out at the HIGH switch — classic hysteresis. At the end of every fill cycle the lead pump swaps with the lag pump (PUMP_A → PUMP_B → PUMP_A …) so their cumulative runtimes stay balanced. The downstream process continuously draws product from the tank, so level slowly falls between cycles. HIGH_HIGH_SW is the overflow safety interlock: when the level exceeds HIGH_HIGH the ALARM latches, BOTH pumps trip off together, and the emergency DRAIN_VALVE opens. The alarm clears only when STOP is pressed with the level already back below HIGH_HIGH.

Objectives

  • START arms the controller; STOP stops both pumps and clears a recovered alarm
  • PUMP_A leads the first fill cycle; PUMP_B leads the second; they alternate thereafter
  • The lead pump turns on at LOW_LEVEL_SW and off at HIGH_LEVEL_SW (hysteresis — does not restart until LOW is made again)
  • HIGH_HIGH_SW latches ALARM; ALARM drops BOTH pumps and stays on until STOP clears it
  • DRAIN_VALVE opens whenever ALARM is latched

Hints

  • Use a RUN_BIT latch: SET on START, RESET on STOP
  • Use a T-flipflop bit (e.g. LEAD_IS_B) that toggles on every rising edge of HIGH_LEVEL_SW — standard pattern: | EDGE AND /BIT | S= BIT ; | EDGE AND BIT | R= BIT ;
  • A FILLING latch captures the "below HIGH until we hit it" cycle state — SET at LOW, RESET at HIGH / HIGH_HIGH / STOP / ALARM
  • Pump outputs: PUMP_A := FILLING AND NOT LEAD_IS_B AND safety contacts; PUMP_B := FILLING AND LEAD_IS_B AND safety contacts
  • ALARM latches on HIGH_HIGH_SW and only resets on STOP once HIGH_HIGH has released; tie DRAIN_VALVE directly to ALARM

I/O Table

Inputs

START

Start push-button (momentary)

BOOL · %I0.0

STOP

Stop push-button (momentary)

BOOL · %I0.1

LOW_LEVEL_SW

Low-level float switch (true when low)

BOOL · %I0.2

HIGH_LEVEL_SW

High-level float switch (true when high)

BOOL · %I0.3

HIGH_HIGH_SW

High-high overflow switch

BOOL · %I0.4

Outputs

PUMP_A

Fill pump A contactor

BOOL · %Q0.0

PUMP_B

Fill pump B contactor

BOOL · %Q0.1

ALARM

Overflow alarm lamp (latching)

BOOL · %Q0.2

DRAIN_VALVE

Emergency drain solenoid

BOOL · %Q0.3

Your program will be tested against:

All test cases run automatically when you submit. Assertions are hidden until you pass.

  1. #1Lead pump (PUMP_A) turns on when the tank is empty

    START while the tank is empty -> LOW is true -> PUMP_A on within one scan, PUMP_B off

  2. #2Lead pump turns off when high-level switch is made

    Start filling; wait for level to reach HIGH_SP; PUMP_A must drop out

  3. #3Lead pump alternates between PUMP_A and PUMP_B on successive fill cycles

    Complete one fill cycle (PUMP_A leads) then wait for level to fall back to LOW and complete a second cycle (PUMP_B leads)

  4. #4HIGH_HIGH_SW drops BOTH pumps and latches the alarm

    Force HIGH_HIGH_SW true while the lead pump is running; both pumps must trip off together and ALARM must latch

  5. #5STOP button drops both pumps immediately

    Lead pump is running; press STOP -> both pumps off within one scan

Ready to build this?

Sign up free — no credit card required. This scenario requires the Pro plan.

Sign up to play this scenario →

Already have an account? Log in