S7-200 Tip Information on Timers Tip No. 33. S7-200 Tips

Similar documents
S7-200 Tip External POT Tip-No. 43. S7-200 Tips

Totally Integrated Automation Application Notes

S7-200 Tip Micro Master Drive Control Tip No. 28. S7-200 Tips. 4 Freeport Communication Interface to SIMOVERT Motor Drive

This chapter describes the SIMATIC instruction set for the S7-200.

Ladder logic (LAD) representation Statement list (STL) representation Available in these CPUs

PLC AUTOMATION SYSTEM LABORATORY. Manual

MECH 1500 Quiz 4 Review

Programmable Logic Controllers. Second Edition

An OR Operation. Or (O) Function I0.4 Q0.1 I0.5 I0.5 I0.4 Q0.1. Input 3. Input 4. Output 2

28 Using Logic Functions

Automationdirect.com. D i r e c t L o g i c S D S N e t w o r k M a s t e r. S m a r t D i s t r i b u t e d. S y s t e m M o d u l e

Applications & Tools. Block for STEP 7 V5.5 for monitoring 24 V DC load circuits using SITOP PSE200U Single Channel Message and S7-300/400 CPUs

PLC Programming D R. T A R E K A. T U T U N J I

Automationdirect.com. D i r e c t L o g i c M a g n e t i c P u l s e I n p u t C o p r o c e s s o r F 4-8 M P I

Cover sheet. Application Operations Diary. WinCC Flexible 2008 SP1. Application Description June Applications & Tools. Answers for industry.

Retentive On-Delay (TONR)

TimerTools, v4.0 User s Manual. TimerTools 2006, 2011, 2017 Kagan Publishing

Set on Human Machine Interface

Applications & Tools. Wireless Data Communication via SMS with SIMATIC S SIMATIC S7-1200, SINAUT MD Application Description July 2010

Table of Contents

Key Panel Library / TIA Portal

Single Message Report for the Information Server. SIMATIC PCS 7, SIMATIC Information Server Siemens Industry Online Support

SINAMICS G/S: Tool for transforming Warning and Error Messages in CSV format


HUAWEI H30-U10. Quick Start Guide

Cycle and response times SIMATIC. S Cycle and response times. Preface. Documentation guide. Program processing 2. Cyclic program processing 3

Topology Reporter Tool Description April 2012 Applications & Tools Answers for industry.

Integral calculation in PCS 7 with "Integral" FB or "TotalL" FB

No part of this document may be used for any purpose other than for the purposes specifically indicated herein nor may it be reproduced or

Application example 12/2016. SIMATIC IOT2000 OPC UA Client SIMATIC IOT2020, SIMATIC IOT2040

AVR134: Real Time Clock (RTC) Using the Asynchronous Timer. Features. Introduction. AVR 8-bit Microcontrollers APPLICATION NOTE

NetworX Series NX-216 Zone Expander Installation and Startup

Message Cycle Report for the Information Server. SIMATIC PCS 7, SIMATIC Information Server Siemens Industry Online Support

Applications & Tools. Configuration of Direct Starters with the APL Channel Block FbSwtMMS in SIMATIC PCS 7 SIMATIC PCS 7 V8.0

NX1700EIB02 (Supercedes NX1700EIA02) NetworX Series. NX-1700E Proximity Card Reader Installation and Startup

AC-115 Compact Networked Single-Door Controller Hardware Installation and Programming

HikCentral Control Client. User Manual

Communication between HMI and Frequency Converter. Basic Panel, Comfort Panel, Runtime Advanced, SINAMICS G120. Application Example 04/2016

S7-PLCSIM V5.3 incl. SP1

SIMATIC S7-PLCSIM V5.0. User Manual. Edition 06/

Production feedback via WinCC Data Transfer with XML file

User Login with RFID Card Reader

TechTarget Event Sponsorship Terms and Conditions

CA Nimsoft Monitor. Probe Guide for DHCP Server Response Monitoring. dhcp_response v3.2 series

INSTRUCTION MANUAL. Waveform Recording Program NX-42WR Higashimotomachi, Kokubunji, Tokyo , Japan

Drive System Application

Applications & Tools. Control of the Safety Integrated Extended Functions of the SINAMICS S110 via the fail-safe inputs of the CU305 SINAMICS S110

Installing And Programming The Digital Voice Announce Equipment On The DXP, DXP Plus, And FX Series Systems

Application on Control Technology

Determination of suitable hardware for the Process Historian 2014 with the PH-HWAdvisor tool

Connecting a distributed I/O to SIMATIC TDC with PROFINET RT and IRT

Sample Blocks for WinCC V7 and STEP 7 (TIA Portal)

SIMADYN D Digital Control System. Fiber-Optic Rack Coupling CS12. User Manual. Edition DK No

U90 Ladder Software Manual. Version 3.50, 6/03

Exchange of large data volumes between S control system and WinCC

Applications & Tools. Line Contactor Control using the ON/OFF1 Command for SINAMICS G120. SINAMICS G120 with firmware V4.

Application example 02/2017. SIMATIC IOT2000 Connection to IBM Watson IoT Platform SIMATIC IOT2040

TC40 - Pre-Instructional Survey

X-Tools Loading Profile Files (LPF)

Windows firewall settings for X-Tools Server Pro. CMS X-Tools / V / CPU PN/DP. Application description 6/2016

COM32. Installation & Operation Manual


Line Contactor Control using the ON/OFF1 Command for SINAMICS G120

Job List, Data Collector and Marshalling Blocks for the Modbus/TCP Library. "Additional Modbus Blocks" for SIMATIC S7 and PCS 7

Entering RLL Programs

Checking of STEP 7 Programs for the Migration of S7-318 to S CPU318 Migration Check. Application description 01/2015

One Identity Manager 8.0. Administration Guide for Connecting to a Universal Cloud Interface

Module 4. Programmable Logic Control Systems. Version 2 EE IIT, Kharagpur 1



Library Description 08/2015. HMI Templates. TIA Portal WinCC V13.

SIMATIC. Industrial software WinAC RTX F Introduction 1. Selecting suitable hardware 2. Installing/removing the WinAC RTX F 2009 software

RF-MANAGER simulator SIMATIC. RFID-Systems RF-MANAGER simulator. Simulating projects. Compact Operating Instructions 06/2010 A5E

GE Fanuc Automation. Computer Numerical Control Products. Series 15i/150i-Model A Programming Manual (Macro Compiler/Macro Executor)

Safe and Fault Tolerant Controllers

Standard Development Timeline

Customizing of WinCC Controls. TIA Portal WinCC Runtime Professional. Application Description July Applications & Tools. Answers for industry.

Distributors News. December, 2004 Unitronics has announced a major market release. The release includes:

Cover. WinAC Command. User documentation. V1.5 November Applikationen & Tools. Answers for industry.

Monitoring of 24 V load circuits

To program and test PLC ladder programs that use timer instructions. Timer Instructions of the Trainer PLC. the timer-on-delay (TON) instruction;

eps Network Services ASP Certificate

END USER LICENSE AGREEMENT PANDA ANTIVIRUS 2007 / PANDA ANTIVIRUS + FIREWALL 2007 / PANDA INTERNET SECURITY 2007


Applikationen & Tools. Network Address Translation (NAT) and Network Port Address Translation (NAPT) SCALANCE W. Application Description July 2009


Intrusion Prevention Performance Tuning

Monitoring Energy Consumption with LOGO! 8 and LOGO! CMR

However, if an event comes in when the new value is being written to the pulse accumulator counter, that event could be missed. One solution to this p

Aotewell SIMATIC S7-PDIAG for S7-300 and S Configuring Process Diagnostic Getting St

PCS 7 Process Visualization on Mobile Devices with RDP

Owner s Manual. DVI USB KVM Switch with Audio. Models: B004-DUA2-K-R, B004-DUA4-K-R

HP A5120 EI Switch Series IRF. Command Reference. Abstract

Documentation of Production Processes with WinCC flexible WinCC flexible 2008 SP1 Application Description

Setting up time synchronization of Process Historian and Information Server

1 CONTROL CHARACTERS AND CONTROL CODES

Reference Manual. SAI Standard Automation Interface

Applications & Tools. Configuring RT communication between SIMATIC and SIMOTION (I-Device) SIMATIC & SIMOTION. Application Example June 2012

CDN180 CCO SPECIFICATIONS

Chapter 9: Virtual-Memory

Transcription:

SIMATIC S7-200 Tips Group Topic 1 Handling of the S7-200 Timers Overview Timers are used to regulate the timing of given functions within a program. The SIMATIC S7-200 series of programmable controllers features two types of timers: the On-Delay Timer (TON) and the Retentive On-Delay Timer (TONR). Both types of timers are available in three time base resolutions: 1 msec, 10 msec, and 100 msec. This tip explains the operation and use of each timer type, with particular emphasis on the differences in timer operation between the various time base resolutions. TON 1 msec 10 msec TONR 100 msec Figure 33.1 Industrial automation Elincom Group European Union: www.elinco.eu Russia: www.elinc.ru Copyright 1995 by SIEMENS page 1 / 6 S72_33E.DOC

Description General Information: S7-200 timers are controlled with a single enabling input and have a current value that maintains the elapsed time since the timer was enabled. The timers also have a preset time value () that is compared to the current value each time the current value is updated. A timer bit is set/reset based upon the result of this comparison. When the current value is greater than or equal to the preset time value, the timer bit (T-bit) is turned on. Otherwise, the T-bit is turned off. Timing stops when the current value reaches a maximum value. When a timer is reset, its current value is set to zero, and its T-bit is turned off. Timers can be reset with the Reset instruction (this is the only way a TONR timer can be reset). Writing a zero to a timer's current value will not reset its timer bit. Likewise, writing a zero to a timer's T-bit will not reset its current value. The two types of timers (TON and TONR) differ in the ways in which they react to the state of the enabling input. Both TON and TONR timers time up while the enabling input is on and do not time up while the enabling input is off. But when the enabling input is off, a TON timer will automatically reset, and a TONR timer will not reset. Therefore, the TON timer is best utilized when timing a single interval, while the TONR timer is more appropriate when it is necessary to accumulate a number of timed intervals. TON and TONR timers are available in resolutions of 1 msec, 10 msec, and 100 msec, and have a maximum value of 32.767 seconds, 327.67 seconds, and 3276.7 seconds, respectively. The resolution is determined by the timer number, as shown in the chart below. Each count of the current value is a multiple of the time base. For example, a count of 50 on a 10 msec timer represents 500 msec. 1 msec 10 msec 100 msec TON, T96 -T36 -T36, T97-T100 -T63 -T63, T101-T127 TONR T0 T0, T64 T1-T4 T1-T4, T65-T68 Figure 33.2 T5-T31 T5-T31, T69-T95 Copyright 1995 by SIEMENS page 2 / 6 S72_33E.DOC

TON/TONR timers with 1 msec resolution: In order to maintain the precision of the 1 msec timers, they are updated once per millisecond in the system interrupt routine that maintains the system time base. The current value is updated by incrementing it by 1, unless it is already at the maximum value. The interrupt routine maintaining the 1 msec system time base is independent of the enabling and disabling of timers; this means a given 1 msec timer will be enabled at a point somewhere within the current 1 msec interval. Therefore, the timed interval for a given 1 msec timer can be up to 1 msec short. The user should program the preset time value to a value 1 greater than the minimum desired timed interval. For example, to guarantee a timed interval of at least 56 msec using a 1 msec timer, the preset time value should be set to 57. Since the current value of an active 1 msec timer is updated in a system routine, the update is automatic. Once enabled, execution of a 1 msec timer's controlling TON/TONR instruction is required only to control the off/on state of the timer. To keep the execution time of this system interrupt routine at a manageable level, only a small number of 1 msec timers can be supported. Since the 1 msec timers are updated from within an interrupt routine, the current value and the T-bits of these timers can be updated anywhere in the scan and will be updated more than once per scan if the scan time exceeds one millisecond. Therefore, these values are not guaranteed to remain constant throughout a given execution of the main user program. A reset of an enabled 1 msec timer will turn it off, in addition to zeroing its current value and clearing its T-bit. TON/TONR timers with 10 msec resolution: In order to support a larger number of 10 ms timers with precision, all enabled 10 msec timers are updated at the beginning of each scan by adding a 10 msec accumulation value to the current value. This accumulation value is determined at the beginning of the scan and consists of the number of 10 msec intervals that have transpired since the last update (the beginning of the previous scan). This single accumulation value is applied to all enabled 10 msec timers. The process of accumulating 10 msec intervals is performed independently of the enabling and disabling of timers, so a given 10 msec timer will be enabled at a point somewhere within the current 10 msec interval. Therefore, the timed interval for a given 10 msec timer can be up to 10 msec short. The user should program the preset time value to a value 1 greater than the minimum desired timed interval. For example, to guarantee a timed interval of at least 140 msec using a 10 msec timer, the preset time value should be set to 15. Since the current value of an active 10 msec timer is updated at the beginning of the scan, the update is automatic. Once enabled, execution of a 10 msec timer's controlling TON/TONR instruction is required only to control the on/off state of the timer. Unlike the 1 msec timers, a 10 msec timer's current value is updated only once per scan and will remain constant throughout a given execution of the main user program. Copyright 1995 by SIEMENS page 3 / 6 S72_33E.DOC

A reset of an enabled 10 msec timer will turn it off, in addition to zeroing its current value and clearing its T-bit. TON/TONR timers with 100 msec resolution: The largest number of timers are 100 msec timers, and correspondingly, they have the lowest precision. All enabled 100 msec timers are updated when the enabling timer instruction is executed by adding a 100 msec accumulation value to the current value. This accumulation value, similar to the 10 msec accumulation value, is determined at the beginning of the scan and consists of the number of 100 msec intervals that have transpired since the last update (the beginning of the previous scan). This single accumulation value is applied to all enabled 100 msec timers as they are updated. The process of accumulating 100 msec intervals is performed independently of the enabling and disabling of timers, so a given 100 msec timer will be enabled at a point somewhere within the current 100 msec interval. Therefore, the timed interval for a given 100 msec timer can be up to 100 msec short. The user should program the preset time value to a value 1 greater than the minimum desired timed interval. For example, to guarantee a timed interval of at least 2100 msec using a 100 msec timer, the preset time value should be set to 22. The update of 100 msec timers is not automatic, since the current value of a 100 msec timer is updated only if the timer instruction is executed. Consequently, if a 100 msec timer is enabled, but the timer instruction is not executed each scan, the current value for that timer will not be updated and it will lose time. Likewise, if the same 100 msec timer instruction is executed multiple times in a single scan, the 100 msec accumulation value will be added to the timer's current value multiple times, and it will gain time. Therefore, 100 ms timers should only be used where the timer instruction will be executed exactly once per scan. A reset of a 100 msec timer will zero its current value and clear its T-bit. Copyright 1995 by SIEMENS page 4 / 6 S72_33E.DOC

Examples: The effect of updating the current value of 1 msec, 10 msec, and 100 msec timers at different times depends on how the timers are used. For example, consider the timer operation in the following program. Automatically Re-triggered Oneshot Timer Using a 1 msec timer TON Using a 10 msec timer TON Using a 100 msec timer TON 300 30 3 Figure 33.3 In the case where the 1 msec timer is used, will be turned on for one scan whenever the timer's current value is updated, after the normally closed contact is executed, and before the normally open contact is executed. In the case where the 10 msec timer is used, will never be turned on, because the timer bit will be turned on from the top of the scan to the point where the timer box is executed. Once the timer box has been executed, the timer's current value and its T bit will be set to zero. When the normally open contact is executed, will be off and will be turned off. In the case where the 100 msec timer is used, will always be turned on for one scan whenever the timer's current value reaches the preset value. A very simple modification can be made to the ladder programs above that will produce the same result for all three timers. This modification is shown below. Copyright 1995 by SIEMENS page 5 / 6 S72_33E.DOC

Automatically Re-triggered Oneshot Timer (Fixed) Using a 1 msec timer TON Using a 10 msec timer TON Using a 100 msec timer TON 300 30 3 Figure 33.4 By using the normally closed contact instead of the timer bit as the enabling input to the timer box, the output is guaranteed to be turned on for one scan each time the timer reaches the preset value. General Notes The SIMATIC S7-200 Application Tips are provided to give users of the S7-200 some indication as to how, from the view of programming technique, certain tasks can be solved with this controller. These instructions do not purport to cover all details or variations in equipment, nor do they provide for every possible contingency. Use of the S7-200 Application Tips is free. Siemens reserves the right to make changes in specifications shown herein or make improvements at any time without notice or obligation. It does not relieve the user of responsibility to use sound practices in application, installation, operation, and maintenance of the equipment purchased. Should a conflict arise between the general information contained in this publication, the contents of drawings or supplementary material, or both, the latter shall take precedence. Siemens is not liable, for whatever legal reason, for damages or personal injury resulting from the use of the application tips. All rights reserved. Any form of duplication or distribution, including excerpts, is only permitted with express authorization by SIEMENS. Copyright 1995 by SIEMENS page 6 / 6 S72_33E.DOC