This repository contains a case study implementation of a Discrete Event Control Architecture for a Siemens SIMATIC PLC workflow using TIA Portal and SCL-based function blocks.
The project combines:
- Discrete event operating logic (modes, interlocks, force states, alarms)
- Analog and digital module templates
- Process behavior simulation blocks for test and validation
- Supporting technical reports and plant description material
The case study focuses on building a modular control structure that is suitable for process units with:
- Manual/Auto operation
- Interlocks and permissives
- Force and safety-oriented override behavior
- Alarm handling and feedback supervision
- Simulation-first validation before deployment
The overall control philosophy aligns with operating mode/state-driven process control concepts used in industrial automation.
AO_Project Files/
AO_Project Files/
DO_Data.udt
DO_Module.scl
Do_Sim.scl
Motor_AO.scl
Pump Simulation.scl
Pump_Data.udt
assets/
images/
docs/
reports/
archives/
Material/
Plant Description/
Festo Plant Description Translated/
PLC SIEMENS/
Additional technical reports and diagrams are available at the workspace root and in Material/.
Digital output module with:
- Enable gating
- Interlock handling
- Manual/Auto command arbitration
- Force-off priority behavior
- Feedback supervision timers and mismatch detection
- Alarm reporting through
DO_Data
Analog output module for motor/pump-style control with:
- Enable/Interlock/Manual-Auto operating logic
- Selector-based interlock handling
- Range validation of operator and interlock values
- Force behavior and alarm handling
- Not-following supervision against feedback
- Alarm reporting through
Pump_Data
First-order lag process model:
- Simulates pump output response to command value
- Uses configurable
Tau,Gain, andTs - Includes output limiting and numerical protection
Discrete-time thermal-like simulation for digital command response:
- Real elapsed-time-based update
- Temperature-like state response between min/max limits
- Feedback bit generation
DO_Data.udt: alarm fields for digital modulePump_Data.udt: warning/alarm fields for analog moduleAlarms.db: centralized alarm storage structure
The implemented blocks follow a clear priority structure:
- Disable and safety states dominate normal control behavior.
- Force conditions override normal commands.
- Interlocks take precedence over Manual/Auto requests.
- Manual/Auto command logic applies only when higher-priority conditions are healthy.
- Supervision and alarm logic monitor consistency between command and feedback.
This pattern improves maintainability and reduces ambiguity during commissioning and troubleshooting.
- Create/open your SIMATIC project in TIA Portal.
- Import the SCL sources from
AO_Project Files/AO_Project Files/. - Import/create UDTs (
DO_Data,Pump_Data) before compiling FBs. - Create instance DBs for
DO_Module,Motor_AO, and simulation FBs. - Map physical or simulated I/O to FB inputs/outputs.
- Download to PLC or run PLCSIM to validate mode changes, interlocks, and alarms.
Recommended validation sequence:
- Verify Enable/Disable behavior.
- Verify Force and Interlock priority paths.
- Verify Manual/Auto transitions.
- Verify feedback mismatch timing and alarm reset behavior.
Material/Control of Discrete Event Systems-Case Study Report.pdfMaterial/Development and Implementation of a Discrete Event Control Architecture for Simatic S7.pdfdocs/reports/Control Theory.pdfdocs/reports/Plant Components and Description.pdf
These reports provide the theoretical background, plant-level context, and implementation rationale.
- File and folder naming currently includes spaces in some locations (for example,
DO_Module .jpeg). - If you plan to automate documentation pipelines, consider normalizing names to avoid path edge cases.
- This README is designed to be a practical entry point for engineers reviewing or extending the case study.







