Timer in a PLC

Timer in PLC
Timer in PLC

Timer in a PLC program, for example, to trigger a time-controlled action. This can be, for example, a cylinder that should remain in the end position for several seconds before it is moved back again. Or an alarm light that should light up for several seconds. For such actions, you need timers with which time-controlled functions can be programmed. According to the programming standard 61131-3, four-time functions have been defined. These are:
Real-time clock
Function block for generating a pulse (TP)
Function block for the switch-on delay (TON)
Function block for the switch-off delay (TOF)

Overview of standard function blocks according to DIN EN 61131-3

  • Explanation of the operands:
  • IN = start condition, signal change from 0 to 1
  • PT = time preset
  • Q = status of time
  • ET = current time value

Time functions in the programming software

The four-time functions specified in the programming standard 61131-3 did not meet the demands of many programmers. For example, the time functions according to 61131-3 do not see any possibility of resetting a timer. This is why many manufacturers of PLC programming software have their own time functions with extended functionality. The following extended time functions are included in Step7:

  • Time function SA: switch-off delay
  • Time function SE: switch-on delay
  • Time function SI: impulse
  • Time function SS: Retentive switch-on delay
  • Time function SV: Extended pulse

Overview of the designations and pulse diagrams of time functions in Step7

If you want to use the three standard time functions TP, TON and TOF in Step7, you have to do this by calling the following system function blocks:

  • SFB3: For TP
  • SFB4: For TON
  • SFB5: For TOF

If these system function blocks are used, an instance data block must be assigned for each of them so that the necessary data is available as static local variables. If, on the other hand, the company-specific time functions are used, a time operand, e.g. T1, must be used instead of an instance data block. The time operands can also be defined globally in the symbol table.
The company-specific time functions in Step7 are easier to handle and have a larger range of functions. For example, every time function has a reset input. S5TIME is used as the data type for the time.
How the PLC implements the timing internally is irrelevant for the programmer. You just have to know that an internal clock generator provides counting impulses through which the time runs backwards. So if you set a time on a timer, then the counter is preset. The time runs down due to the counting pulses and the counter receives the count 0 when the time has elapsed.
The cyclical processing of the program is not affected because the time function is updated asynchronously to the program processing. As a result, timers have a different value at the start of the cycle than at the end of the cycle. To get complete physical and online training in Timer in a PLC chick here

Use of the real-time clock

A clock, either as a real-time clock or a software clock, has been implemented in all CPUs of the S7-300 and S7-400 series. An integrated clock can be used in two different ways:
Master: In this case, the integrated clock acts as the master clock.
Slave: In this case, the clock plays a subordinate role of a master and is synchronized with the master.
With an integrated clock, time-of-day alarms or operating hours counters can be implemented if required. The watch shows the following values:
Time, at least with the display of seconds
Whether the milliseconds are also displayed depends on the CPU used. Here you have to look in the reference manual of the device to find out more.
The date and time can be set by the programmer himself. To do this, you need to call up the following system function and in the PLC program:
Alternatively, you can do this via the programming device menu. To do this, go online in the programming device, open the target system menu and select Set time from the menu. You can either take the time directly from the programming device / PC or enter a date and time yourself.
In this way, you can also read out the current time and date of the CPU. The system function SFC1 (READ_CLK) is used to read out the date and time directly in the program.

Leave a Comment

Your email address will not be published. Required fields are marked *

Our New Initiative alhumdulillah. Hostel Facility for Trainees.
This is default text for notification bar

of escort çukurova escort kozan escort seyhan escort yüreğir escort adana mutlu son masaj besni escort kahta escort gölbaşı escort adıyaman mutlu son masaj bolvadin escort dinar escort sandıklı escort emirdağ escort afyon mutlu son masaj diyadin escort doğubayazıt escort patnos escort ağrı mutlu son masaj ortaköy escort aksaray mutlu son masaj merzifon escort suluova escort taşova escort amasya mutlu son masaj çankaya escort keçiören escort yenimahalle escort mamak escort etimesgut escort sincan escort altındağ escort pursaklar escort gölbaşı escort polatlı escort çubuk escort kahramankazan escort beypazari escort ankara mutlu son masaj alanya escort manavgat escort serik escort antalya mutlu son masaj şehitkamil escort nizip escort ıslahiye escort antep mutlu son masaj ardahan mutlu son masaj artvin mutlu son masaj hopa escort borçka escort aydın mutlu son masaj efeler escort nazilli escort kuşadası escort söke escort didim escort incirliova escort çine escort germencik escort balıkesir mutlu son masaj karesi escort altıeylül escort edremit escort bandırma escort gönen escort ayvalık escort burhaniye escort bigadiç escort susurluk escort bartın mutlu son masaj batman mutlu son masaj kozluk escort sason escort beşiri escort bayburt mutlu son masaj bilecik mutlu son masaj bozuyuk escort bingöl mutlu son masaj solhan escort genç escort karlıova escort bitlis mutlu son masaj tatvan escort güroaymak escort ahlat escort bolu mutlu son masaj gerede escort burdur mutlu son masaj bucak escort bursa mutlu son masaj osmangazi escort yıldırım escort nilüfer escort inegöl escort gemlik escort mudanya escort mustafakemalpaşa escort gürsu escort karacabey escort orhangazi escort kestel escort iznik escort çanakkale mutlu son masaj biga escort can escort gelibolu escort ayvacık escort çankırı mutlu son masaj çerkes escort çorum mutlu son masaj sungurlu escort osmancık escort alaca escort iskilip escort denizli mutlu son masaj pamukkale escort merkezefendi escort çivril escort acıpayam escort tavas escort diyarbakır mutlu son masaj kayapınar escort bağlar escort yenişehir escort ergani escort bismil escort sur escort silvan escort çermik escort dicle escort düzce mutlu son masaj akçakoca escort kaynaşlı escort edirne mutlu son masaj keşan escort uzunköprü escort ipsala escort elazığ mutlu son masaj kovancılar escort karakoçan escort erzincan mutlu son masaj erzurum mutlu son masaj yakutiye escort palandöken escort aziziye escort horasan escort oltu escort pasinler escort odunpazarı escort tepebaşı escort eskişehir mutlu son masaj bulancak escort espiye escort tirebolu escort görele escort giresun mutlu son masaj gümüşhane mutlu son masaj kelkit escort hakkari mutlu son masaj yüksekova escort şemdinli escort hatay mutlu son masaj antakya escort iskenderun escort defne escort dörtyol escort samandağ escort kırıkhan escort reyhanlı escort arsuz escort altınözü escort hassa escort payas escort erzin escort yayladağı escort ığdır mutlu son masaj yalvaç escort eğirdir escort sarkıkaraağaç escort ısparta mutlu son masaj istanbul mutlu son masaj izmir mutlu son masaj buca escort karabağlar escort bornova escort karşıyaka escort konak escort bayraklı escort çiğli escort torbalı escort menemen escort gaziemir escort ödemiş escort kemalpaşa escort bergama escort menderes escort aliağa escort tire escort