SS: Start retentive on-delay timer (S7-1500) - STEP 7

FBD (S7-1200, S7-1500)

ft:publication_title
FBD (S7-1200, S7-1500)
Product
STEP 7
Version
V20
Publication date
11/2024
Language
en-US
SS: Start retentive on-delay timer

Description

The "Start retentive on-delay timer" instruction starts a programmed timer when a change from "0" to "1" (positive signal edge) is detected in the result of logic operation (RLO) at the start input. The timer expires at the end of the specified time period, even when the RLO changes to signal state "0". When the timer expires, the querying of the timer status for "1" returns the signal state "1". After the timer has expired, the timer can only be restarted if it was explicitly reset.

The duration is made up internally of a time value and a time base and is programmed at parameter TV. When the instruction is started, the programmed time value is counted down to zero. The time base specifies the time period with which the time value is changed.

The instruction "Start retentive on-delay timer" requires a preceding logic operation for the edge evaluation and can only be placed on the right edge of the network.

Note

In the time cell, the operating system reduces the time value in an interval specified by the time base by one unit until the value equals "0". The decrementation is performed asynchronously to the user program. The resulting timer is therefore at maximum up to one time interval shorter than the desired time base.

You can find an example of how a time cell can be formed here: L: Load timer value

Parameters

The following table shows the parameters of the instruction "Start retentive on-delay timer":

Parameters

Declaration

Data type

Memory area

Description

<Operand>

Input

BOOL

I, Q, M, T, C, D, L, P

Start input

TV

Input

S5TIME, WORD

I, Q, M, D, L or constant

Time duration

<Timer>

Input

TIMER

T

Timer which is started.

The number of timers depends on the CPU.

You can find more information on the valid data types under "See also".

Example

The following example shows how the instruction works:

Network 1:

"#Timer_1" starts when the signal state of the "#TagIn_1" operand changes from "0" to "1". The timer expires with the value of operand "#TagIn_Number".

Network 2:

When the time expires, the "#TagOut" operand is reset to "1".

Network 3:

If the signal state at the "#TagIn_1" operand changes from "0" to "1" while the timer is running, the timer is restarted. If the signal state of the operand "#TagIn_2" is "1", the timer "#Timer_1" is reset, which stops the timer and sets the current time value to "0".

The figure below shows the timer diagram of the example: