S_ODTS: Assign retentive on-delay timer parameters and start (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
S_ODTS: Assign retentive on-delay timer parameters and start

Description

The "Assign retentive on-delay timer parameters and start" 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 input S. The timer expires with the programmed duration (TV), even if the signal state at input S changes to "0". If the timer expires, the "Q" output returns signal state "1" regardless of the signal state at input "S". If the signal state at input S changes from "0" to "1" while the timer is running, the timer is restarted with the duration programmed at input (TV).

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 current time value is output binary-coded at output BI and BCD-coded at output BCD.

Signal state "1" at input R resets the current time value and time base to "0" regardless of the signal state at start input S. In this case, the signal state at output Q is "0".

The "Assign retentive on-delay timer parameters and start" instruction requires a preceding logic operation for the edge evaluation and can be placed within or at the end of the network.

The instruction data is updated at every access. It can therefore happen that the query of the data at the start of the cycle returns different values than at the end of the cycle.

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 under: See also "L: Load timer value".

Parameters

The following table shows the parameters of the "Assign retentive on-delay timer parameters and start" instruction:

Parameters

Declaration

Data type

Memory area

Description

<Timer>

Input

TIMER

T

Time of the instruction

The number of timers depends on the CPU.

S

Input

BOOL

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

Start input

TV

Input

S5TIME, WORD

I, Q, M, D, L or constant

Time duration

R

Input

BOOL

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

Reset input

BI

Output

WORD

I, Q, M, D, L, P

Current time value (binary-coded)

BCD

Output

WORD

I, Q, M, D, L, P

Current time value (BCD format)

Q

Output

BOOL

I, Q, M, D, L, P

Status of the timer

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

Pulse timing diagram

The following figure shows the pulse timing diagram of the "Assign retentive on-delay timer parameters and start" instruction:

Example

The following example shows how the instruction works:

"Timer_1" is started when the signal state of the "TagIn_1" operand changes from "0" to "1". The timer expires with the time value of the "TagIn_Number" operand, even when the signal state of the "TagIn_1" operand changes to "0". When the timer expires, the operand "TagOut" is set to "1". If the signal state of the operand "TagIn_1" changes from "0" to "1" while the timer is running, the timer is restarted.