Hello everyone, using Timer is a must for any kind of PLC or program, today plctop.com will join you to learn about Timer with Siemens PLC S7-1200.
Siemens S7-1200 timers are available in four different forms: generate ONDELAY (TON), generate OFF-DELAY (TOF), time accumulator (TONR), and generate pulse (TP). Image shows the parameters for the TON, TOF, and TONR timers.
Timer instruction preset/accumulated value uses the M (2 words, 16 bits), D (double words, 32 bits), or L (long, 64 bits) memory area, as shown in the data table. The same information for the TP timer is shown in Table.
ON-DELAY Timers (TONs)
This timer’s main function is to delay the rising edge of output Q by the predefined period of the preset time (PT). The timer block is shown in image in appropriate tag names assigned.
In the figure, these tags are displayed between double quotes. All timer-required variables are displayed using the standard system labels, which start with the percent (%) character. Timer preset-time (PT) input can be defined as displayed or as a constant value.
If rung input (IN) is TRUE, the timer accumulated value with tag name T_0_ACC will increment. When timer accumulated value is equal to the defined preset value with tag name T_0_PRE, the output Q will change status to ON, and the timer will stop timing. This Image illustrates the timer timing diagram:
Notice that the delay action applies to timer output Q. It turns ON after the prespecified preset time from the point where the timer input is enabled. If the timer enable input is lost before the prespecified preset time, the Q output will not turn ON. The timer input must stay ON during the entire preset time in order for the output to turn ON. The timer output will turn OFF once the input goes OFF.
Here is an example of a ladder-logic diagram for the TON timer instruction. This
diagram assumes a normally open START push button (PB), a normally open
STOP push button, a timer preset (PT) value of 10 seconds, output MOTOR1
(Q0.0), and output MOTOR2 (Q0.1). The ladder diagram consists of two networks. The following are the critical events in the shown ladder-logic diagram:
- The first network initially during the first scan, I0.0, is TRUE because theSTOP PB is wired high. Also, the START PB is FALSE because this switch isnormally open.
- Once the START PB is pressed, I0.1 becomes TRUE; this, in turn, makes Q0.0TRUE. Q0.0 is the output to MOTOR1 starter, which causes it to run. The nextscan, Q0.0, will latch the START PB and maintain the Q0.0 TRUE status.
- he second network, Q0.0, is the input condition for the TON instruction,which is TRUE. This timer has a preset time value of 10 seconds.
- The timer (TON) will start timing. After 10 seconds of delay, Q0.1 will turnON, causing MOTOR2 to run.
- Pressing the STOP PB at any time will cause MOTOR1 and MOTOR2 to stop.It also will stop the timer and reset its accumulated time register (ET).
The following two ladder networks explain how the ON-DELAY timer works and how it follows other commonly used notations: TT (timer timing bit), DN (timer done bit), and ACC (timer accumulated value).
- Network 1: WhenINPUT(I0.0) is TRUE, Timer0 starts trimming. OutputsTimer0_DN and OUTPUT are FALSE as long as Timer0_ACC did not reach 10.
- Network 2: When Timer0_DN is FALSE, the two compare instructions areexecuted. Timer0_TT is set, indicating that the timer is timing.
- When Timer0_ACC is greater than or equal to 10, the two outputs Timer0_DN and OUTPUT are TRUE. Network 2 input will be FALSE, and Timer0_TTgoes OFF, indicating that the timer stopped timing.
- The timer timing (TT) bit is not directly available with Siemens ON-DELAYtimers (TONs), but it can be generated using Network 2
OFF-DELAY Timers (TOFs)
This timer’s main function is to delay the falling edge of output Q by the predefined period of the preset time (PT). If the input to the instruction (IN) is TRUE, the output Q is set true. When input turns OFF, the timer starts timing. It resets the output Q when the timer accumulated value ET with tag name T_0_ACC is equal to the timer preset value PT with assigned tag name T_0_PRE.
Here is an example shows a ladder-logic diagram for the TOF timer instruction. This
diagram assumes a normally open START push button (PB), a normally closed
STOP push button, a timer preset (PT) value of 10 seconds, output MOTOR1
(Q0.0), and output MOTOR2 (Q0.1). The ladder diagram consists of two networks. The following are the critical events in this timer example:
- The first network initially during the first scan, I0.1, is TRUE because the STOPPB is wired high. Also, the START PB is FALSE because the switch is not yetpressed.
- Once the START PB is pressed, I0.0 becomes TRUE; this, in turn, makes Q0.0TRUE, and MOTOR1 runs. The next scan, Q0.0, will latch around the STARTPB and maintain Network 1 TRUE status.
- As shown in the second network, Q0.0 is the input condition for the TOFinstruction, which is now TRUE.
- The timer (TOF) will set the output Q0.1 ON, causing MOTOR2 to turn ON. Sofar the two motors are running after pressing the START PB.
- Once the STOP PB is pressed, MOTOR1 loses power and goes OFF. This willcause the TOF timer to start timing.
- After the prespecified delay of 10 seconds is over, the timer output Q0.1 goesOFF. This will cause MOTOR2 to stop. Thus MOTOR2 stops 10 seconds afterMOTOR1 is OFF.
- The timer preset value is cleared when TOF is TRUE.
- Pressing the STOP PB at any time while the two motors are running stopsMOTOR1, and 10 seconds later MOTOR2 stops.
The above network shows a simple process-control implementation using three OFF-DELAY timer (TOF) instructions. This network assumes a limit-switch tag name LS1 and three outputs: MOTOR1 Q1.0, MOTOR2 Q1.1, and MOTOR3 Q1.2. Timer preset values of 10, 20, and 30 seconds are used to sequence the operation of the three motors. When LS1 is TRUE, all three motors start running. If LS1 changes from high to low (OFF state), MOTOR1 turns off after 10 seconds, MOTOR2 turns off after 20 seconds, and MOTOR3 turns off after 30 seconds. Once LS1 returns back to the TRUE state, the accumulated values of all three timers are cleared.
If you need any support about using Timer in PLC Siemens S7-200, please comment below the article.
Thanks for reading!