Pro
35 min

Pharma Validated Batch Record

pharmabatchGMPaudit-trailrecipedeviationprocess-control
Pharma Validated Batch Record

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

Commission a validated pharmaceutical batch reactor. A batch can start only after the recipe, vessel-clean status, door interlock and operator sign-off are confirmed. Heat and agitate until the process model qualifies the temperature hold, require sign-off before discharge, and issue RECORD_COMPLETE only after the vessel is drained. Losing a critical interlock during execution must stop the batch and latch a deviation — the audit events in the model preserve the significant transitions.

Objectives

  • Prevent batch start unless recipe, clean-status, door and operator checks are all confirmed
  • Heat and agitate only while a qualified batch is active and the hold is incomplete
  • Require both HOLD_COMPLETE and OPERATOR_SIGNOFF before opening discharge
  • Latch DEVIATION_ALARM when a critical interlock is lost during a running batch
  • Set RECORD_COMPLETE only after the signed-off batch has physically drained

Hints

  • Latch an internal BATCH_BIT from a fully qualified START rung rather than driving outputs directly from START_PB
  • The physics publishes TEMP_IN_RANGE, HOLD_COMPLETE and BATCH_DRAINED; your program owns the permissives and record state
  • A deviation is retentive: SET it on BATCH_BIT AND NOT CRITICAL_INTERLOCKS_OK, then clear it only with STOP and restored interlocks

I/O Table

Inputs

START_PB

Start batch request

BOOL · %I0.0

STOP_PB

Stop / deviation reset

BOOL · %I0.1

RECIPE_VERIFIED

Approved recipe checksum matches

BOOL · %I0.2

EQUIPMENT_CLEAN

Validated clean-status released

BOOL · %I0.3

DOOR_CLOSED

Reactor access door interlock

BOOL · %I0.4

OPERATOR_SIGNOFF

Authenticated operator sign-off

BOOL · %I0.5

TEMP_IN_RANGE

Physics: validated temperature band

BOOL · %I0.6

HOLD_COMPLETE

Physics: qualified hold duration complete

BOOL · %I0.7

BATCH_DRAINED

Physics: vessel drained below 5%

BOOL · %I1.0

CRITICAL_INTERLOCKS_OK

Physics: recipe, clean and door chain healthy

BOOL · %I1.1

Outputs

BATCH_ACTIVE

Validated batch execution active

BOOL · %Q0.0

AGITATOR

Reactor agitator

BOOL · %Q0.1

HEATER_ENABLE

Jacket heater enable

BOOL · %Q0.2

DISCHARGE_VALVE

Signed-off batch discharge valve

BOOL · %Q0.3

DEVIATION_ALARM

Latched GMP deviation

BOOL · %Q0.4

RECORD_COMPLETE

Electronic batch-record completion flag

BOOL · %Q0.5

Your program will be tested against:

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

  1. #1Unqualified batch start is denied

    Missing recipe approval must keep every process output off

  2. #2Qualified batch starts

    All release checks allow heating and agitation

  3. #3Qualified hold, sign-off and drain complete the record

    The process hold qualifies before discharge and record completion

  4. #4Critical interlock loss latches a deviation

    Opening the door during a batch stops the process and latches the deviation

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