Instruction List (IL / AWL) Timer Logic: Accumulators, Done Bits, and SICAM RTU (CP-8021) SCADA Integration
In Siemens STEP 7 Statement List (STL / AWL / IL), S5 timers (such as S_ODT) manipulate CPU Accumulator 1 (ACCU 1) to load the parameterized time preset and query remaining time. When a timer executes, the current remaining time can be loaded into ACCU 1 in integer format (L T 1) or BCD format (LC T 1). The timer's completion status (Done bit) is evaluated directly by testing the timer address as a Boolean contact (A T 1). For integrating telecontrol RTUs like the SICAM CP-8021 with SICAM SCC (WinCC-based SCADA), data exchange is implemented via standard IEC 60870-5-104 over Ethernet, mapping point lists into WinCC tags.
Table of Contents
- Statement List (AWL / STL) Timer Execution and Accumulator Architecture
- Evaluating Timer Done Bits and Remaining Duration in ACCU 1
- Complete Production STL Timer Code Example
- Telecontrol Integration: SICAM RTU CP-8021 to SICAM SCC 8.04 via IEC 104
- STEP 7 Timer Evaluation Instruction Matrix
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Statement List (AWL / STL) Timer Execution and Accumulator Architecture
In classic SIMATIC S7-300 and S7-400 programming, Instruction List (Statement List / AWL / IL) provides low-level execution efficiency. The CPU architecture centers on Accumulator 1 (ACCU 1) and Accumulator 2 (ACCU 2), 32-bit internal working registers utilized for arithmetic, byte manipulation, and timing routines.
When implementing standard timers (such as On-Delay Timer SD / S_ODT), the timer value is loaded into ACCU 1 using the S5TIME format (e.g., L S5T#5s). The timer is then started conditionally based on the Result of Logic Operation (RLO).
Evaluating Timer Done Bits and Remaining Duration in ACCU 1
To extract timer status and elapsed duration in STL:
-
Timer Done Bit (Boolean State): To check whether the on-delay time has expired, test the timer address directly as a Boolean contact:
A T 1. When the timer expires and the start condition remains high,A T 1evaluates to1. -
Binary Remaining Time (
L T <n>): Loads the remaining time into ACCU 1 as an unformatted 16-bit binary integer in units of the current time base. -
BCD Formatted Time (
LC T <n>): Loads the remaining time into ACCU 1 formatted as Binary Coded Decimal (BCD) including the time base in bits 12-13, designed for direct output to LED display indicators.
Complete Production STL Timer Code Example
The following STL code illustrates starting a timer, reading remaining duration into an integer DB word, and driving a pump output via the Done bit:
// Load time value and start on-delay timer T1
A M 0.0 // Start trigger contact
L S5T#10s // Load 10-second preset into ACCU 1
SD T 1 // Start On-Delay Timer T1
// Read remaining time into ACCU 1 and store in DB
L T 1 // Load remaining time (integer) into ACCU 1
T DB10.DBW 2 // Transfer remaining time to Data Block
// Evaluate Timer Done Bit
A T 1 // Test Timer Done bit (RLO = 1 when expired)
= Q 4.0 // Drive motor contactor output
Telecontrol Integration: SICAM RTU CP-8021 to SICAM SCC 8.04 via IEC 104
For wide-area substation automation and telecontrol, Siemens provides the SICAM RTU series (such as SICAM A8000 CP-8021) and SICAM SCC (SIMATIC WinCC-based SCADA Control Center):
-
Protocol Standard: Communication operates over IEC 60870-5-104 (TCP/IP on port 2404).
-
Engineering Workflow in SICAM TOOLBOX II: In Toolbox II, configure the CP-8021 telegram addresses (CASDU and IOA) for switchgear breaker states, feeder currents, and tripping commands.
-
Integration in SICAM SCC 8.04: In SICAM SCC (WinCC), use the SICAM Wizard to import the CSV signal export from Toolbox II. The wizard automatically configures the IEC 104 driver channel, creates structured tags, and links standard substation electrical symbols (breakers, disconnectors, transformers).
STEP 7 Timer Evaluation Instruction Matrix
The following table summarizes STEP 7 STL timer instructions and their effect on CPU registers:
SD T <n>SF T <n>A T <n>L T <n>LC T <n>R T <n>Verification
Verify timer execution and telecontrol telemetry through the following steps:
- In STEP 7 LAD/FBD/STL Editor, open the block online and engage Monitor (glasses icon).
- Force
M 0.0high. Observe ACCU 1 in the status column; confirm that remaining time decrements from 10s down to 0s. - Confirm that when remaining time reaches 0, the status bit
T 1changes from0to1and outputQ 4.0energizes. - In SICAM SCC, open the electrical substation overview graphic. Confirm that telecontrol values from the CP-8021 update with green quality code.
Commercial Accuracy Disclaimer: Software order numbers (MLFBs), package structures, and hardware capacity prerequisites vary across PCS 7 versions and hardware platforms. System integrators must confirm exact software entitlements and licensing requirements against the official Siemens Catalog CA 01 and obtain an authorized Siemens distributor quotation prior to purchasing.
Limitations and Operational Precautions
Consider these operational rules when programming timers and telecontrol:
-
S5TIME Maximum Range: Standard S5 timers have a maximum duration limit of
T#2h46m30s; for durations spanning days or weeks, use IEC timers (TON/ SFB4) or CPU system tick functions (SFC64). -
Accumulator Overwriting: Any subsequent arithmetic or load instruction (e.g.,
L MW 20) immediately overwrites ACCU 1; always transfer the timer value (T <dest>) immediately after loading. -
SICAM Licensing: SICAM SCC requires valid WinCC runtime tags and dedicated SICAM protocol channel licenses.
Engineer FAQ
Why should IEC timers (TON) be used instead of S5 timers in new code?
IEC timers (TON / SFB4) use standard 32-bit TIME data types (up to 24.8 days) with 1 ms resolution, eliminating S5TIME's 2.5-hour limit and BCD encoding.
What is the maximum number of timers in an S7-400 CPU?
S7-400 CPUs typically provide between 512 and 2,048 S5 timers (T 0 to T 2047), configured in HW Config.
How do I import SICAM RTU tags into WinCC / SICAM SCC?
Use the SICAM Wizard inside WinCC to import the signal point list generated by SICAM TOOLBOX II, automatically populating tags and faceplates.
Technical References
- STEP 7 V5.5 / V5.6 Statement List (STL / AWL) for S7-300 and S7-400 Programming Manual (Entry ID: 109780813)
- SICAM RTU A8000 Series CP-8021 / CP-8022 Master Module Manual
- SICAM SCC 8.04 System Manual: IEC 60870-5-104 Telecontrol SCADA Integration
- IEC 60870-5-104 Transmission Protocol Standard Specification
Related Articles
- Telecontrol Protocol Integration: Interfacing ABB RTU 560 with SIMATIC PCS 7
- Measuring Elapsed Milliseconds Between Two Digital Pulses in SIMATIC PCS 7
- Interfacing S7-300 Gas Turbine Control Systems with SIMATIC PCS 7
Related Tags
- Statement List
- AWL / STL
- S5 Timers
- Accumulator 1
- SICAM RTU
- IEC 60870-5-104