Timer Counter Operations for IEC
See also: IEC 61131 Language Editor Programming
See also: Project Toolbox for IEC
Topic Menu
Timer Counter Overview
Off Delay Timer in IEC |
Off Delay Timer with 100ms resolution |
Off Delay Timer with 100ms resolution 32 Bit | |
Off Delay Timer with 10ms resolution |
|
Off Delay Timer with 10ms resolution 32 Bit | |
Off Delay Timer with 1ms resolution |
|
Off Delay Timer with 1ms resolution 32 Bit | |
Off Delay Timer with 1 Sec resolution |
|
Off Delay Timer with 1 sec resolution 32 Bit | |
On Delay Timer in IEC |
On Delay Timer with 100ms resolution |
On Delay Timer with 100ms resolution 32 Bit | |
On Delay Timer with 10ms resolution |
|
On Delay Timer with 10ms resolution 32 Bit | |
On Delay Timer with 1ms resolution |
|
On Delay Timer with 1ms resolution 32 Bit | |
On Delay Timer with 1 Sec resolution |
|
On Delay Timer with 1 sec resolution 32 Bit | |
On Delay - Retentive in IEC |
On Delay Timer- Retentive with 100ms resolution |
On Delay Timer- Retentive with 100ms resolution 32 Bit | |
On Delay Timer- Retentive with 10ms resolution |
|
On Delay Timer- Retentive with 10ms resolution 32 Bit | |
On Delay Timer- Retentive with 1ms resolution |
|
On Delay Timer- Retentive with 1ms resolution 32 Bit | |
On Delay Timer- Retentive with 1 Sec resolution |
|
On Delay Timer- Retentive with 1 sec resolution 32 Bit |
Return to the Top: Timer Counter Operations for IEC
Off Delay Timer in IEC
Also called: TOF100mS / TOF10mS / TOF1mS / TOF1Sec - (Res. 32 Bit)
Operator - Performs OFF delay timer operations using these blocks with specified timebase.
Resolution
16 BIT Resolution Timers: The count value limit in these timers is 32767.
32 BIT Resolution Timers: The 32 –bit resolution Timers are useful in applications were the count value needs is insufficient using the regular timers of 16 bit. The count value limit in these timers is 2147483647.
Inputs
IN : Input for resetting Count up time (CT) & enable the output Q. (TYPE : BOOL)
PT : Programmed time, Maximum count up for Count up time (CT). (TYPE : INT)
Outputs
Q : Output which stays TRUE till the count up is active & goes FALSE when CT=PT. (TYPE : BOOL)
CT : The counter for the specified timebase, to reach the Programmed time. (TYPE : INT)
Remarks
-
The timer starts on a falling pulse of IN input. It stops when the Count up time (CT) is equal to the programmed time (PT). A rising pulse of IN input resets the timer to 0. The output signal is set to TRUE when the IN input rises to TRUE, reset to FALSE when programmed time is elapsed for the specified timebase.
-
In LD language, the input rung is the IN command. The output rung is the Q output signal.
-
The timebase is user definable in 10mS or 100mS ticks. When input IN goes high the counting proceeds based on the timebase block used.
ST Language
(* TOF1 is a declared instance of TOF100ms function block *)
TOF1 (IN, PT);
Q := TOF1.Q;
CT := TOF1.CT;
OR
(* TOF1 is a declared instance of TOF10ms function block *)
TOF1 (IN, PT);
Q := TOF1.Q;
CT := TOF1.CT;
FBD Language
LD Language
IL Language
Return to the Top: Timer Counter Operations for IEC
On Delay Timer in IEC
Also called: TON100mS / TON10mS/ TON1mS / TON1Sec – (Res. 32 Bit)
Operator - Performs ON delay timer operations using these blocks with specified time base.
Resolution
16 BIT Resolution Timers: The count value limit in these timers is 32767.
32 BIT Resolution Timers: The 32-bit resolution Timers are useful in applications were the count value needs is insufficient using the regular timers of 16 bit. The count value limit in these timers is 2147483647.
Inputs
IN : Input for starting Count up time (CT).(TYPE : BOOL)
PT : Programmed time, Maximum count up for CT. (TYPE : INT)
Outputs
Q : Output goes TRUE when CT = PT & goes FALSE when input is low. (TYPE : BOOL)
CT : The counter of the timebase specified, to reach the Programmed time. (TYPE : INT)
Remarks
-
The timer starts on a rising pulse of IN input. It stops when the Count up time (CT) is equal to programmed time (PT). A falling pulse of IN input resets the timer to 0. The output signal is set to TRUE when programmed time is elapsed, and reset to FALSE when the input command falls.
-
In LD language, the input rung is the IN command. The output rung is Q the output signal.
-
The timebase is user definable in 10mS or 100mS "ticks". When input IN goes high the counting proceeds based on the timebase block used.
ST Language
(* TON1 is a declared instance of TON100ms function block *)
TON1 (IN, PT);
Q := TON1.Q;
CT := TON1.CT;
OR
(* TON1 is a declared instance of TON10ms function block *)
TON1 (IN, PT);
Q := TON1.Q;
CT := TON1.CT;
FBD Language
LD Language
IL Language
Return to the Top: Timer Counter Operations for IEC
On Delay - Retentive in IEC
Also called: TONR100mS / TONR10mS / TONR1mS / TONR1Sec – (Res. 32 Bit)
Operator - Performs retentive ON timer operations using these blocks.
Resolution
16 BIT Resolution Timers: The count value limit in these timers is 32767.
32 BIT Resolution Timers: The 32 –bit resolution Timers are useful in applications were the count value needs is insufficient using the regular timers of 16 bit. The count value limit in these timers is 2147483647.
Inputs
IN : Timer command. (TYPE : BOOL)
RESET : For resetting the counter CT & output Q. (TYPE : BOOL)
PT : Preset time, Maximum count up for CT. (TYPE : INT)
Outputs
Q : Output goes TRUE when CT = PT & goes FALSE when reset is pressed (TYPE : BOOL)
CT : The counter of the timebase specified, to reach the Programmed time. Set to zero if reset is pressed. (TYPE : INT )
Remarks
A Retentive On Delay Timer is a special case of the "standard" On Delay Timer. It differs from the standard timer in that the Retentive Timer does not reset when the input is brought inactive (off). The Retentive Timer requires that a reset signal be applied to the element in order for the timer to be reset.
ST Language
(* TONR1 is a declared instance of TONR100ms function block *)
TONR1 (IN, PT);
Q := TONR1.Q;
CT := TONR1.CT;
OR
(* TONR1 is a declared instance of TONR10ms function block *)
TON1 (IN, PT);
Q := TONR1.Q;
CT := TONR1.CT;
FBD Language
LD Language
IL Language
Return to the Top: Timer Counter Operations for IEC