Description of the function

The ITCNTRL function is a timer that triggers the TIMER type event processing selected by the EVENT input, when the current value reaches the preset value.

The preset and time base values are selected in the event processing properties dialog box.

NOTE: TIMER event processing are not available on all PLCs, see the available functions for Each Type of PLC.

Additional parameters EN and ENO can be configured.

Representation in FBD

Representation:

Representation in LD

Representation:

Representation in IL

Representation:

LD Enable
ITCNTRL Reset_Timer, Hold_Timer, Nb_task_Event , Status_Timer, Current_Value

Representation in ST

Representation:

ITCNTRL(ENABLE := Enable_Timer, RESET := Reset_Timer, HOLD := Hold_Timer, EVENT := Nb_Task_Event, STATUS => Status_Timer, VALUE => Current_Value);

Description of the parameters

The following table describes the input parameters:

Parameter

Type

Comment

Enable

BOOL

Enable input selected,.

on state 1: the event processing is triggered when the timer has elapsed.

on state 0: no event is emitted

Reset_Timer

BOOL

On state 1 reset the timer

Hold_Timer

BOOL

On state 1 freeze the timer incrementation.

Nb_Task_Event

BYTE

Input word which determines the TIMER event processing number to be triggered.

The following table describes the output parameters:

Parameter

Type

Comment

Status_Timer

WORD

Status word:

  • bit0 = 1 execution delayed by a masking of the interruption.

  • bit 1 =1 event processing number not valid

  • bit 2 = 1 validated timer (Enable input image).

  • bit 3 = 1 "frozen" timer (Hold_Timer input image).

  • bit 4 =1 as soon as ITCNTRL is called the first time with the input Reset_Timer or Hold_Timer at 1 (out-of-phase mode). It is reset to 0 on a cold start.

  • bit 5 = 1 FIFO memory stack of the saturated interruptions.

Current_Value

TIME

Current timer value.

This value is increased by 0 to the preset value. When the preset value is reached, it is reset to 0.

If the associated TIMER type event processing is confirmed, it is executed.