12/14 MN05003004Z-EN
Interrupt prioritising
35
Timer interrupt
An interrupt channel for a timer interrupt is available in addition to
the six different interrupt channels for inputs with interrupt
capability. The start condition and the setpoint value definition are
application related in the easySoft-CoDeSys.
The following illustration indicates the function and the parametric
programming for the “Timer Interrupt”. This function is contained
in the “XC101_Util.lib”.
The setpoint value setting occurs on the “dwTimerTickUS” input.
The minimum value is 500, the maximum value is 2500000
microseconds. If the upper or lower limit value is exceeded on the
“dwTimerTickUS” function module input, the function call returns
FALSE as the feedback value and the timer is not started. The
setpoint value is accepted with the start of the timer and can not
be modified for the run time.
The linking of the timer interrupt with the respective IEC program
occurs as with the IO interrupts via ‹Task configuration
l
System
events›.
The entered interrupt function is executed immediately as soon as
the interrupt occurs. The running IEC program cycle can be
interrupted at any point.
The timer interrupt can also itself be interrupted by higher priority
system interrupts, e.g. as with CAN. Cycle time monitoring is
active during execution of the timer interrupt. Cycle time
monitoring is orientated exclusively to the value entered for the
maximum program cycle time. If very frequent timer and IO
interrupts occur, they can lead to the program cycle time being
exceeded. If the program cycle time is exceeded the XC-CPU101
changes from the RUN to the STOP operating status.
The Timer interrupts can be inhibited and enabled from the user
program. Use the “DisableInterrupt” and “EnableInterrupt”
functions for this case.
Figure 46: Function “Timer Interrupt”
Summary of Contents for XC-CPU101 Series
Page 18: ...II...
Page 22: ...12 14 MN05003004Z EN 4...
Page 42: ...12 14 MN05003004Z EN 24...
Page 64: ...12 14 MN05003004Z EN 46...
Page 88: ...12 14 MN05003004Z EN 70...