Pro
35 min

Pharma Validated Batch Record

pharmabatchGMPaudit-trailrecipedeviationprocess-control

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

Pharma Validated Batch Record

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

Runnable simulator field guide

Pharmaceutical batch-record PLC scenario: test checklist

Direct answer

The learner can link recipe and material identity to ordered phase results, record exceptions and distinguish controller events from a complete compliant record.

Written for automation learners exploring how a regulated batch sequence can retain reviewable process and operator evidence.

a water-based process instrumentation skid with tank, valve, transmitter and controller evidence used for safe calibration and sequence practice while studying batch identity, phase evidence, exception handling and attributable electronic records
System map / 02

NODE 01observable

Scenario setup

Batch, recipe and material identity, equipment status, phase parameters, operator action, timestamps, source, result, exception, review state and change history.

NODE 02observable

I/O and state map

Approved request through equipment allocation, phase execution, measured values, alarms, interventions, completion evidence and reviewable record.

NODE 03observable

Normal run

One declared batch preserves ordered identity, parameters, results, timestamps and exceptions across normal phase transitions and completion.

NODE 04observable

Boundary run

Wrong material, missing equipment, parameter out of range, sensor fault, manual intervention, aborted phase, duplicate action, time change and controller restart.

NODE 05observable

Injected fault

An identity, recipe, equipment, parameter, measurement, phase-state, operator, timestamp, exception or record-integrity mismatch.

NODE 06observable

Target check

The production solution specified, validated and governed through current quality, data-integrity, cybersecurity and regulatory procedures.

Answer surface / 07

What should a PLC batch record contain?

Retain traceable batch and recipe identity, equipment and material context, phase parameters, measured results, alarms, interventions, exceptions and trustworthy timestamps.

Does a PLC event log make a system Part 11 compliant?

No. Compliance depends on the complete validated system and procedural controls, including access, audit trails, record integrity, review and electronic signatures where applicable.