10/10 MN05003003Z-EN
System events
51
Example
• Create a program with a function call
Create a program with the function TIMERINTERRUPTENABLE as
per figure 51.
• Creating the program routine
X
Open the Task Configuration sub-directory with a double click
in the Resources directory.
X
Click here the System Events folder. The System events tab is
active.
X
Click the Timer Interrupt check box to activate the timer
interrupt.
X
In the Called POU column enter the name of the program
routine, e. g “Time_Int”.
X
Click again on the name “Timer Interrupt”. Now the “Create
POU” button becomes active and indicates the name of the
POU.
X
Click on this button. A POU with the name “Time_Int” will be
added under “PLC_PRG” in the POU window.
X
Open the POU and write your program routine:
If input IX0.0 is activated, the “Time_Int” POU is called
periodically and the variable “uiCount” is incremented.
Figure 52: Creating the program routine
Figure 53: Writing a program routine
h
The interrupt can be interrupted by higher-priority system
interrupts. Cycle time monitoring is active during
execution of the timer interrupt.
If timer interrupts occur too frequently, this may cause the
selected program cycle time to be exceeded. In this case
the controller will switch from RUN to STOP.
The timer interrupt can be disabled and enabled from the
user program. The functions “DisableInterrup and
“EnableInterrupt” are provided for this purpose in the
library EC_UTIL.lib.
Summary of Contents for easyControl EC4-200
Page 4: ...II...
Page 10: ...10 10 MN05003003Z EN 6...
Page 14: ...10 10 MN05003003Z EN 10...
Page 22: ...10 10 MN05003003Z EN 18...
Page 38: ...10 10 MN05003003Z EN 34...
Page 62: ...10 10 MN05003003Z EN 58...
Page 78: ...10 10 MN05003003Z EN 74...
Page 96: ...10 10 MN05003003Z EN 92...