Block library TeleControl ST7
5.5 Structure of user program for TD7onCPU
TIM 1531 IRC
138 Operating Instructions, 02/2018, C79000-G8976-C468-02
Cyclic interrupt OB
Introduction
Only include time-controlled TD7 blocks in a CPU if fast count pulses must be detected in
this CPU which could not be reliably detected within an OB1 cycle due to an excessively
long cycle time.
The count pulses are acquired via any digital input module. To acquire the pulses reliably,
the digital inputs use must be queried for change at a fixed time interval. The time interval is
based on the duration of the shortest count pulse. The minimum count pulse duration may
be 50 ms. The same applies to the duration of the pause. This results in a maximum count
frequency of 10 Hz.
The time interval in which the count pulse acquisition is performed must be approximately
half the count pulse duration, i.e. at 50 ms at an interval of approximately 25 ms.
For this time-controlled count pulse acquisition, OB35 needs to be configured for an S7-300
CPU, one of the available cyclic interrupt OBs OB30 to OB38 for an S7-400 CPU, and a
cyclic interrupt OB with a number from 30..38 / ≥ 123 for an S7-1500 CPU.
All cyclic interrupt OBs have a preset time interval, for OB35 for example 100 ms. This can
be changed in steps of 1 ms. This makes it possible to set a cyclic interrupt OB, for example,
to 25 ms.
You change the time interval for a cyclic interrupt OB in the Properties dialog (S7-400/1500),
or in the Properties dialog of the CPU with S7-300.
Table 5- 1 Calling FC PulseCounter in the cyclic interrupt OB
One or more FC-PulseCounters can be included for the acquisition of count
pulses.
FC PulseCounter processes up to 8 pulse inputs of any digital input. The ac-
quired count pulses are added together in programmable SIMATIC counters.
These access the function blocks that put together the count value frames (FB-
Cnt0x_S).
User-specific cyclic interrupt functions required independently of the SINAUT
program can be included at any point in the cyclic interrupt OB.
Programming error OB
Validity
Only for S7-300/400
When a block that does not exist is called in an S7-300/400 CPU, the CPU normally changes
to STOP. The diagnostics buffer indicates which FB, FC or DB was missing. You can then
reload the missing block and restart the CPU.