×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 31044952, Entry date: 10/23/2008
(5)
Rate

How can you optimize use of timers in STEP 7 Micro/WIN?

  • Entry
  • Associated product(s)

Description:
The calls of the prepared time functions are limited to a total of 256 in STEP 7 Micro/WIN:

Switch-on ("TON") and switch-off delays ("TOF")

  • 2 ("T32" and "T96") with a resolution of 1 ms
  • 8 ("T33" to "T36" and "T97" to "T100") with a resolution of 10 ms
  • 182 ("T37" to "T63" and "T101" to "T255") with a resolution of 100 ms

Storage switch-on delays ("TONR")

  • 2 ("T0" and "T64") with a resolution of 1 ms
  • 8 ("T1" to "T4" and "T65" to "T68") with a resolution of 10 ms
  • 54 ("T5" to "T31" and "T69" to "T95") with a resolution of 100 ms


Fig. 01

From STEP 7 Micro/WIN version V4, functions "BGN_ITIME" and "CAL_ITIME" are also available for S7-200 CPUs from version V2, with which the prepared timers can be simulated without limit as follows:

Note:
The maximum timer length you can set is 49.7 days because of the double-word format.

Switch-on delay
3 seconds (3000 ms) after switching on (positive edge) of the input I0.0 the output Q0.0 is set.


Fig. 02

Storage switch-on delay
If the time total of switch-ons from input I0.1 is equal to more than 3 seconds (3000 ms), the output Q0.1 is set. Reset is via input I0.2.


Fig. 03

Switch-off delay
3 seconds (3000 ms) after switching off (negative edge) of the input I0.3 the output Q0.3 is reset.


Fig. 04

Pulse generation
By activating (positive edge) input I0.4, a pulse lasting 3 seconds (3000 ms) is generated at the output Q0.4.


Fig. 05

Download:
The download "TON_TONR_TOF_TP.zip" contains the sample project with the networks presented above.

TON_TONR_TOF_TP.zip ( 2 KB )

Note:
There is more information on the time functions in the STEP 7 Micro/WIN Help.

Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
https://www.siemens.com/cybersecurity#Ouraspiration.
Rate entry
no rating
Requests and feedback
What do you want to do?
Note: The feedback always relates to the current entry / product. Your message will be forwarded to our technical editors working in the Online Support. In a few days, you will receive a response if your feedback requires one. If we have no further questions, you will not hear from us.