S7-DOS guarantees that a higher priority OB preempts a lower one – true preemptive RTOS, not a cooperative loop. S7-DOS implements a segmented memory model with hardware protection (using MC683xx/Intel 80186 memory management units).
| Memory Area | Purpose | S7-DOS Mechanism | |-------------|---------|------------------| | Load memory (RAM/Flash) | User program code, blocks | File‑like block storage | | Work memory (RAM) | Runtime copies of code+data | iRMX segments | | System memory | OBs, SDBs, link data | Kernel dynamic allocation | | Retentive memory | Remanent data markers, counters | Battery‑backed, checksummed | simatic s7dos
Here’s a technical write-up focused on — a lesser-known but historically significant real-time operating environment for S7 controllers. Deep Dive: SIMATIC S7-DOS – The Real-Time Foundation of Classic S7-300/400 1. Introduction When most automation engineers think of Siemens S7-300/400 programming, they focus on STEP 7 (Classic) and TIA Portal . However, beneath the user program (OB1, FB, FC) runs a hidden but critical component: SIMATIC S7-DOS . Far from being a “DOS” in the PC sense (MS-DOS), S7-DOS is a real-time, multitasking operating system kernel that executes the cyclic, time-driven, and alarm-driven tasks of the CPU. S7-DOS guarantees that a higher priority OB preempts
| Protocol | Task | Priority | |----------|------|----------| | MPI | S7‑DOS task (low) | Cyclic | | PROFIBUS DP master | Background interrupt | High | | PROFINET (later) | Ethernet task | Mixed | Deep Dive: SIMATIC S7-DOS – The Real-Time Foundation
S7-DOS also handles – if an FB calls a missing FC, S7-DOS can load it from load memory on demand (though this increases cycle time). 5. Execution Model – The S7-DOS Cycle Simplified flow per CPU scan: