4. Configuration
213
Timer Retain
The time retain is a function block developed for applications as production line clocks, that need to
store its value and restart the counting from the same point in case of power supply failure. The
values stored by the function block, are only zero in case of a Cold Reset, Original Reset or a new
application download (see the MasterTool IEC XE User Manual - MU299609), when the counters
keep working, even when the application is stopped (Stop Mode).
ATTENTION:
It is important to stress that, for the correct functioning of the Timer Retain blocks, the variables
must be declared as Retain (VAR_RETAIN). It’s also important to notice that in simulation mode,
the Timer Retain function blocks do not run properly due to need the Nexto CPU for correct
behavior.
The three blocks already available in the MasterTool IEC XE software Nexto library are described
below (for the library insertion proceeding, see MasterTool IEC XE Programming Manual –
MP399608, chapter Library).
TOF_RET
The function block TOF_RET implements a time delay to disable an output. When the input IN has
its state changed from TRUE to False, or a falling edge, the specified time PT will be counted and the
Q output will be driven to FALSE at the end of it. When the input IN is in logic level 1 (TRUE), the
output Q remain in the same state (TRUE), even if this happened in the middle of the counting
process. The PT time can be changed during the counting as the block assumes the new value if the
counting hasn’t finished. Figure 4-106 depicts the TOF_RET block and Figure 4-107 shows its
graphic behavior.
Figure 4-106. TOF_RET Block
This variable, when receives a falling edge, enables the
block counting.
This variable specifies the block counting limit (time delay).
Table 4-151. TOF_RET Input Parameters
This variable executes a falling edge as the PT variable
(time delay) reaches its maximum value.
This variable shows the current time delay.
Table 4-152. TOF_RET Output Parameters