S5-115U System Data Words: BS, RS, SD Reference Manual

David Krause16 min read
PLC HardwareSiemensTechnical Reference
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

S5-115U System Data Word Reference: Architecture, Access, and Conversion

The SIMATIC S5-115U is a modular mid-range PLC from the SIMATIC S5 family that exposes its internal controller state through a structured block of System Data Words (in German: Systemdatenwörter). These words carry diagnostic codes, OB interval times, process-image scan times, and the 16 performance-control bits that change how the CPU treats timers, counters, OB priorities, and restart behaviour. Because STEP 5 programs can read and even overwrite portions of this area, every migration to STEP 7 (S7-300/400 or S7-1500 via S5 migration tooling) must begin with a clear map of which System Data Word the original program is touching and what value it forces.

This reference consolidates what the published S5-115U Programmable Controller manual (6ES5 998-0UF23) describes in Section 6.4 ("System Data") — the same section that starts on page 159 of the English print edition — and pairs it with the field-proven semantics engineers need when reading legacy STEP 5 listings. Throughout this document, the German abbreviation BS (Betriebssystem), the synonym RS (Rechner-Systemdaten / Runtime System Data), and the generic SD all refer to the same 16-bit internal word set; only the prefix changes between CPU firmware revisions, language versions, and manual printings.

Notation warning: Siemens English-language manuals interchange BS / RS / SD inside the same chapter without redefining the prefix. When you read a STEP 5 source line such as L RS 97 or L BS 120, both load word 97 (or word 120) of the System Data area into ACCU 1. Do not interpret RS/BS as different memory blocks.

S5-115U CPU Family and System Data Capabilities

The S5-115U ships with four central-processing-unit options that determine the depth and resolution of the System Data area. Each CPU uses the same word numbering, but not every word is populated on every CPU.

CPU Order Number (typical) User Memory Bit Instructions System Data Coverage
CPU 941 6ES5 941-… 2 KB Bit / Fixed-point Subset (words 0–127 partly populated)
CPU 942 6ES5 942-… 4 KB Bit / Fixed-point Subset
CPU 943 6ES5 943-… 8 KB / 16 KB Bit / Fixed-point / Floating-point Full BS/RS range
CPU 944 6ES5 944-… 16 KB / 32 KB Bit / Fixed-point / Floating-point Full BS/RS range, plus extended diagnostic words

For System Data Words RS 97 and RS 120 — the two values most often encountered in STEP 5 code that triggers migration questions — the 941-944 series is homogeneous: RS 97 in any 115U CPU (941-944) carries the OB13 interval time in multiples of 10 ms, and RS 120 always contains 16 individual bits that govern system performance characteristics such as timer/counter retentivity and OB6 priority. Differences between CPUs appear in the available scan-time words, the floating-point process image, and the diagnostic-stack depth, all documented in the 6ES5 998-0UF23 manual.

System Data Word Notation: BS, RS, and SD Conventions

STEP 5 supports three families of operand identifiers that all index the same System Data array:

  • BS — German original ("Betriebssystem"). Common in older German-language listings and in the System Data section of the German S5-115U Handbuch.
  • RS — Siemens-internal synonym used heavily in the English S5-115U manual. The English manual at one point introduces RS, then drops back to BS without warning, which is the most common reason engineers believe they have a missing operand.
  • SD — Generic identifier used in STEP 5 V6+ programming tools and in the STEP 5 → STEP 7 converter tables. SD is the most portable form when searching Siemens Support entries.

Mnemonic mapping for STEP 5 source lines:

L  RS  97      // Load System Data Word 97 (OB13 interval) into ACCU 1
L  BS  120      // Load System Data Word 120 (performance bits) into ACCU 1
T  SD  120      // Transfer ACCU 1 into System Data Word 120 (overwrite bits)
L  IW  0        // NOT a System Data Word – do not confuse with process input

The 16-bit value loaded from a System Data Word is right-aligned in the accumulator; the upper byte of the word follows the same bit significance as any standard 16-bit STEP 5 word (bit 0 = LSB, bit 15 = MSB). When transferring back with T BS n or T RS n, you are writing to a CPU-internal register that the firmware samples on each scan. The change is immediate; no restart is required unless the bit is documented as "effective after RESTART" in the manual.

System Data Word Address Map (Overview)

Page 159, Section 6.4 of the English S5-115U manual lists every System Data Word together with a cross-reference to the section that describes it. The condensed map below groups the words by function so a migration engineer can find a candidate word in seconds.

Word Range Function Group Typical Use Read/Write
BS 0 – BS 7 System status and first-stop cause Diagnostic interrogation, error LEDs equivalent Mostly read; some bits write-cleared
BS 8 – BS 15 Stop / restart causes, stack depth ISTACK / BSTACK decoding Read-only
BS 16 – BS 31 Process-image scan times, time base Cyclic scan diagnostics Read
BS 32 – BS 95 Reserved / CPU-specific Internal use Do not access
BS 96 – BS 111 OB interval times, time-base multipliers Time-driven OBs (OB10–OB18) Read/write (write before RESTART)
BS 112 – BS 119 Reserved
BS 120 – BS 127 System performance characteristics Retentivity, OB priorities, restart behaviour Read/write (most bits effective after RESTART)
Engineer tip: When the legacy code says BS 120 and the same code references RS 120 three pages later, treat them as the same word and walk the entire BS 120-127 range against the function being implemented. A "BS 120" in a 944 program is rarely an isolated word access; it is almost always the start of a 16-bit configuration block.

Diagnostic and Status System Data Words (BS 0 – BS 31)

The low-numbered System Data Words expose the live state of the CPU to user code. They are the only way a STEP 5 program can ask the firmware "why did you stop?" without an external programmer.

Word Field Meaning
BS 0 System status word Bit 0 = STOP flag, bit 1 = RESTART flag, bit 2 = manual mode, additional bits for error class
BS 4 Last stop cause (low byte) 0x00 no stop, 0x10 STOP pushbutton, 0x20 OB19/OB23 timeout, 0xFF firmware error
BS 5 Last stop cause (high byte) / PLC identifier CPU type, module rack ID
BS 8 – BS 11 ISTACK pointers Address of the instruction that triggered the stop (Instruction Stack)
BS 12 – BS 15 BSTACK pointers Block Stack – the chain of OB/FB/PB/DB calls active at stop time
BS 16 – BS 23 Process image and scan timing Current cycle time, last cycle time, max cycle time since RESTART

Reading these words is a common pattern in legacy programs that implement their own "blue-screen" diagnostic display. A typical STEP 5 sequence looks like:

L   BS 4           // Last stop cause (low byte)
T   DB 100 DW 0     // Copy to user DB for the diagnostic message
L   BS 12           // BSTACK pointer high word
T   DB 100 DW 1
L   BS 16           // Current cycle time (ms)
T   DB 100 DW 2

During STEP 5 to STEP 7 migration, replace BS 4 with STW / STW1 reads in S7 (status word) and replace BS 16-class scan-time values with SFC 78 ("OB_RT") / SFC 6 / SFC 7 cycle-time queries. The semantics differ enough that the value should not be copied directly; treat it as a "yes, the original program cared about cycle timing" flag, then re-implement the diagnostic against the S7 equivalent.

Timing System Data Words (BS 96 – BS 111)

Words 96 through 111 hold the time bases for time-driven organisation blocks. The 115U supports a fixed set of OBs whose trigger period is hardware-or-firmware-defined, and the System Data Word for each OB holds the period as a multiple of a base tick (10 ms on the 115U, 1 ms on later S5-135U/155U). RS 97, the OB13 interval, is the most frequently read word in this group.

Word
OB Function Default Range
BS 96 OB10 Reserved / CPU-specific time
RS 97 / BS 97 OB13 Time-of-day interrupt / cyclic interrupt 100 (= 1000 ms) 1 – 65535 (× 10 ms = 10 ms – 655.35 s)
BS 98 OB11 Time-driven OB (CPU-dependent)
BS 99 – BS 111 OB12 – OB18 OB13–OB18 interval time bases CPU-specific CPU-specific

The value stored is an unsigned 16-bit count of base ticks. To change the OB13 period from the default 1 second to, say, 250 ms, the legacy code transfers the value 25 into word 97:

L   KH 0019        // 25 decimal = 250 ms @ 10 ms base
T   BS 97           // Overwrite OB13 interval – effective after RESTART
Effective-on-RESTART caveat: RS 97 writes are latched by the firmware but the new tick count is applied only on the next COLD RESTART or WARM RESTART. A simple STOP/RUN transition does not pick up the new value. This is the single most common reason an OB13 interval change appears "not to work" in the field. If you need a faster reaction, use a hardware timer (e.g. a digital input edge in OB1) rather than rewriting BS 97 at runtime.

During migration to STEP 7, BS 97 → OB13 is replaced by configuring the OB35 / OB38 / OB1x periodic-interrupt block in HW Config (S7-300) or in the device configuration of the S7-1500. The 10 ms base tick is preserved on the S7-300 (CPU 314-319) and the S7-1500 (CPU 1510-1518) hardware-timer OB family, but the integer count range and the RESTART semantic are different — the migration tool will warn when it cannot map 1:1.

System Performance Characteristics (BS 120 – BS 127)

Word 120 is the most configuration-rich System Data Word in the S5-115U. It carries 16 individual bits that determine system performance characteristics, including but not limited to: retentivity of timers, retentivity of counters, OB6 priority level, restart method, and the error-LED behaviour. The exact bit-to-function assignment is documented in Section 6.4 of the S5-115U manual; the table below lists the bit ranges and the characteristic they control.

Bit Function Effect
0 Timer retentivity 0 = all timers non-retentive (default), 1 = all timers retain across power cycle
1 Counter retentivity 0 = non-retentive, 1 = retain C0-C127 across power cycle
2 – 3 Reserved Do not modify
4 OB6 priority Selects the priority class for the time-error OB
5 – 7 Restart behaviour Cold / warm / hot restart selection, error-stack handling
8 Process image update mode Cyclic update on OB1 boundary
9 – 11 Diagnostic / LED routing Map CPU faults to SF / BF / FR LED
12 – 14 Reserved / CPU-specific See manual revision-specific table
15 Force enable 1 = force table writeable via online interface

A typical field pattern is a one-shot initialisation block that loads a configured constant into RS 120 during cold start:

// PB 100 – COLD-RESTART configuration block
L   KH F800         // Set timer retentive, counter retentive, OB6 priority 7
T   RS 120          // Latch the 16 performance bits
BE

Reading RS 120 for diagnostics is also common in watchdog-style applications. The bit at position 0 (timer retentivity) is the most often flipped bit in the field, because the default of "all timers cleared on power-cycle" surprises many engineers who treat S5 timers like S7 IEC timers.

Bit-position warning: The bit assignment above is a working model based on the Section 6.4 description in the English S5-115U manual. Siemens revised the bit map between early 941B and later 944B firmware; the bit numbers for "OB6 priority" and "restart behaviour" shift by one position in some printings. Always verify the exact bit on the CPU's firmware version before relying on a single bit being a specific function. Section 6.4 of the manual, cross-referenced from page 159, is the authoritative source for the exact CPU-build bit layout.

System Data Word DBs and Memory Access

STEP 5 also exposes the System Data Words as data words inside reserved data blocks — most commonly DB 0 / DB 1 and the system DBs created by COM 115 / COM 945 — so that operators can monitor values with a standard PG rather than the S5-DOS programmer. The relationship is:

Access Method Syntax Use Case
Direct operand L RS 97 STEP 5 program read; fastest access; binary code only
Indirect via DB L DB 0 DW 97 Visualisation from the PG; some HMI tools
Symbolic Assign symbol in COM 115 Cross-reference in source listing

If the migration project is using the SIMATIC S5 → S7 converter, the tool reads the direct-operand forms (L RS / T RS) and emits a warning when it cannot resolve the System Data Word into an S7 system function. Treat the warning as a TODO: open the original STEP 5 listing, find the operand, look up the function in the S5-115U manual Section 6.4, and implement the S7 equivalent with the SFC family or the periodic-interrupt OB configuration.

STEP 5 to STEP 7 Conversion Considerations

When converting a STEP 5 program that touches the System Data Words, the migration engineer should treat the BS/RS/SD area as a "first-class" interface, not as a flag variable. The recommended procedure is:

  1. Generate a complete list of every L RS, T RS, L BS, T BS, L SD, T SD statement in the STEP 5 source. Most STEP 5 editors (COM 115, COM 945, S5-DOS) print a cross-reference that includes operand type.
  2. Map each operand to the function listed in Section 6.4 of the S5-115U manual. The two words that almost always appear are RS 97 (OB13 interval) and RS 120 (system performance bits).
  3. Decide the S7-300/400 target:
    • BS 0 (system status) → STW1, STW2, or read of the diagnostic buffer with SFC 13 / SFC 59.
    • BS 4 / BS 5 (stop cause) → diagnostic buffer read with SFC 13 ("DP_TOPOL" / "RD_REC") and SFB 52 "RDREC".
    • BS 16 (cycle time) → SFC 6 / SFC 78 cycle-time query in OB1.
    • RS 97 (OB13 interval) → OB35 / OB38 configuration in HW Config or in the periodic-interrupt block properties.
    • RS 120 (performance bits) → S7 retentivity setting in the CPU properties (Retentive Memory: Timers / Counters / Bit Memory), and the OB priority configuration in OB1 priority block.
  4. Verify each replacement in OB1, OB100 (cold restart) and OB101 (warm restart) on the S7 target. The OB100/101 cold-restart block is the natural location to re-implement an RS 120-style performance configuration.
Migration gotcha: Some S5-115U programs use T RS 120 to set the "force enable" bit. S7 has no equivalent flag — force is enabled in the PG / TIA Portal project tree. A literal copy of T RS 120 into a STEP 7 program will silently no-op on an S7-300, and may trip the access-error OB on a hardened S7-400. Strip the operand before running the converted code.

Verification and Diagnostic Procedures

After any code change that touches a System Data Word, verify the result with the following checks before returning the controller to production:

  1. Online status of RS 120. With the PG online, read RS 120 (or its DB-mapped equivalent) and confirm the expected bits are set. Cross-check the bit map against the CPU's firmware-revision print of Section 6.4.
  2. Cycle-time assertion. Read BS 16 (current cycle) and BS 17 (max cycle) and confirm the cycle time is below the OB1 watchdog threshold. On a 944 with default watchdog, this is 200 ms. If the migration has introduced a periodic-interrupt OB that didn't exist in STEP 5, BS 16 is the quickest way to detect it.
  3. OB13 firing-rate check. Toggle a marker bit inside OB13, and confirm in OB1 that the marker's transition rate matches the value previously stored in RS 97 (× 10 ms). A mismatch of one tick indicates that the new value has not been applied because the CPU did not see a RESTART.
  4. Stop cause drill. Force a stop (e.g. unplug an I/O module) and read BS 4 / BS 5. The stop cause should be the expected one. If BS 4 still reads the previous stop cause, the firmware has not re-sampled since the previous stop — exercise the CPU with a fresh COLD RESTART.
  5. Retentivity sanity check. Power-cycle the CPU and read the timer / counter area. The values should match the retentivity bits set in RS 120. Mismatches almost always trace to bit 0 / bit 1 of RS 120 being left at default.
Symptom Likely System Data Cause Verification
OB13 fires at default 1 s after a T RS 97 with a smaller value RESTART not performed Trigger cold or warm restart; re-check
All timers cleared on power-cycle despite user program expecting retention RS 120 bit 0 = 0 Force bit 0 to 1 in OB100; cycle power; verify
STOP pushbutton does not change BS 4 CPU still in COLD-RESTART phase Wait for RUN, then trigger a controlled stop
Force table is grayed out online RS 120 bit 15 = 0 Enable force via the CPU properties in PG / TIA Portal
Cycle time jumps after migration BS 16 now reflects S7 OB structure, not S5 Re-baseline with S7 cycle-time SFCs

Frequently Asked Questions

What is the difference between BS, RS, and SD in a STEP 5 program?

They are three prefixes that index the same 16-bit System Data Word set inside the S5-115U CPU. BS is the German original ("Betriebssystem"), RS is the Siemens-internal synonym used in the English manual, and SD is the generic STEP 5 V6+ identifier. Operands L BS 97, L RS 97, and L SD 97 all load System Data Word 97 (the OB13 interval in multiples of 10 ms on a 941-944) into ACCU 1.

What does RS 97 contain on an S5-115U CPU 941, 942, 943, or 944?

RS 97 always contains the OB13 interval time, expressed as an integer count of 10 ms base ticks. The default value is 100 (= 1000 ms / 1 s). Write to RS 97 with T RS 97 only after confirming the firmware applies the new value at the next COLD or WARM RESTART; a STOP→RUN transition does not pick up the new interval.

What do the 16 bits in RS 120 control?

RS 120 is the S5-115U system-performance word. Its 16 bits select timer and counter retentivity across power-cycle, the OB6 priority class, the cold/warm/hot restart behaviour, the process-image update mode, and the force-table enable. The exact bit-to-function map is documented in Section 6.4 of the English S5-115U manual and varies slightly between CPU firmware revisions.

Where in the S5-115U manual is the System Data Word list?

The full list starts at page 159, Section 6.4 ("System Data") of the English S5-115U Programmable Controller manual, order number 6ES5 998-0UF23. The same PDF is hosted on Siemens Industry Online Support at cache.industry.siemens.com/dl/files/937/1085937/att_904/v1/6ES5_998-0UF23.pdf and lists every System Data Word with a cross-reference to the section that defines its bit assignment.

How do I migrate a STEP 5 BS/RS access to STEP 7?

List every L/T RS and L/T BS statement, identify the System Data Word from Section 6.4, then map to the S7 equivalent: BS 0 → STW1 read, BS 16 → SFC 6 / SFC 78 cycle-time query, RS 97 → periodic-interrupt OB configuration in HW Config (OB35 / OB38), and RS 120 → CPU properties for retentive timers/counters plus OB priority. The S5 → S7 converter will flag BS/RS accesses it cannot resolve; resolve each warning against the manual before sign-off.

Back to blog