Instruction List (IL / AWL) Timer Logic: Accumulators, Done Bits, and SICAM RTU (CP-8021) SCADA Integration

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

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:

  1. 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 1 evaluates to 1.

  2. 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.

  3. 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):

  1. Protocol Standard: Communication operates over IEC 60870-5-104 (TCP/IP on port 2404).

  2. 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.

  3. 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:

STL InstructionInstruction NameRegister Evaluated / ModifiedPrimary ApplicationSD T <n>On-Delay TimerStarts timer if RLO = 1; preset from ACCU 1Delaying motor start or debouncing switchesSF T <n>Off-Delay TimerStarts timer on falling edge of RLOPost-purge cooling fans, lubrication overrunA T <n>AND Timer Done BitSets RLO to 1 if timer has expiredActuating output or setting logic permissiveL T <n>Load Time BinaryCopies remaining time (integer) into ACCU 1Displaying countdown in integer secondsLC T <n>Load Time BCDCopies remaining time (BCD) into ACCU 1Outputting countdown to 7-segment LED displaysR T <n>Reset TimerImmediately aborts timer and clears timeEmergency abort / immediate shutdown

Verification

Verify timer execution and telecontrol telemetry through the following steps:

  1. In STEP 7 LAD/FBD/STL Editor, open the block online and engage Monitor (glasses icon).
  2. Force M 0.0 high. Observe ACCU 1 in the status column; confirm that remaining time decrements from 10s down to 0s.
  3. Confirm that when remaining time reaches 0, the status bit T 1 changes from 0 to 1 and output Q 4.0 energizes.
  4. 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:

  1. 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).

  2. 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.

  3. 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

Related Articles

Related Tags

  • Statement List
  • AWL / STL
  • S5 Timers
  • Accumulator 1
  • SICAM RTU
  • IEC 60870-5-104
6 respuestas