SP: Start pulse 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
SP: Start pulse timer

Description

The instruction "Start pulse timer" 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 runs with the specified duration as long as the RLO has the signal state "1". As long as the timer is running, the query of timer status "1" returns the signal state "1". If there is a change from "1" to "0" in the RLO before the time value has elapsed, the timer stops. In this case, the querying of the timer status for "1" returns the signal state "0".

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 "Start pulse timer" instruction requires a preceding logic operation for edge evaluation and can only be placed at the right side 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 under: See also "L: Load timer value".

Parameters

The following table shows the parameters of the instruction "Start pulse 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 time value of the "#TagIn_Number" operand as long as the signal state of the "#TagIn_1" operand is "1". If the signal state at the "#TagIn_1" operand changes from "1" to "0" before the timer expires, the timer is stopped.

Network 2:

As long as the timer is running, the "#TagOut" operand returns signal state "1".

Network 3:

A signal state change of the operand "#TagIn_2" from "0" to "1" resets the timer, which stops the timer and sets the current time value to "0".

The figure below shows the timer diagram of the example: