User Manual

Programming made easy
6.3 Powerful instructions make programming easy
Easy Book
104 Manual, 03/2014, A5E02486774-AF
Note
You also must create an input for any con
stants in your function. The constant value would
then be entered in the associated input for the CALCULATE instruction.
By entering constants as inputs, you can copy the CALCULATE instruction to other locations
in your user program without having to chan
ge the function. You then can change the values
or tags of the inputs for the instruction without modifying the function.
When CALCULATE is executed and all the individual operations in the calculation complete
successfully, then the ENO = 1. Otherwise, ENO = 0.
6.3.5
Timers
The S7-1200 supports the following timers
The TP timer generates a pulse with a preset width time.
The TON timer sets the output (Q) to ON after a preset time delay.
The TOF timer sets the output (Q) to ON and then resets the output to OFF after a preset
time delay.
The TONR timer sets the output (Q) to ON after a preset time delay. The elapsed time is
accumulated over multiple timing periods until the reset (R) input is used to reset the
elapsed time.
For LAD and FBD, these instructions are available as either a box instruction or an output
coil. STEP 7 also provides the following timer coils for LAD and FBD:
The PT (preset timer) coil loads a new preset time value in the specified timer.
The RT (reset timer) coil resets the specified timer.
The number of timers that you can use in your user program is limited only by the amount of
memory in the CPU. Each timer uses 16 bytes of memory.
Each timer uses a structure stored in a data block to maintain timer data. For SCL, you must
first create the DB for the individual timer instruction before you can reference it. For LAD
and FBD, STEP 7 automatically creates the DB when you insert the instruction.