What should you watch out for when programming IEC timers in an S7-300/S7-400 and in an S7-1200/S7-1500?
In the S7-300/S7-400 it is possible to program an IEC timer and then assign its output another time. In this way, as shown in Fig. 01, you can reset an IEC timer. No error message is issued when compiling.
However, this way of programming is a source of errror!
If an operand is set, reset or assigned at different points in the program, its state is no longer unique.
In the S7-1200/S7-1500 it is possible to program an IEC timer and then assign its output another time. When programming, this assignment is immediately displayed as an error by a red marking. If you nevertheless attempt to compile the program, the inadmissible assignment is listed as an error in the inspector window: "The tag is read-only".
If you want to do a migration from S7-300/S7-400 to S7-1200/S7-1500, the output of IEC timers must not be assigned another time.
Another difference between the controllers is in the updating of the timer tags.
- With the S7-300/S7-400 the timer tags "Q" and "ET" are updated when the timer is called.
- With the S7-1200/S7-1500 the timer is updated when the timer is called or when the timer tags "Q" and "ET" are accessed.
The screens in this FAQ response were created with STEP 7 (TIA Portal) V13.