260 Run-time System CODESYS 2.3
WAGO I/O SYSTEM 750 XTR
750-8202/040-001 PFC200 2ETH RS TELE XTR
Manual
Version 1.2.0, valid from FW Version 03.01.07(13)
8.5.1
Creating an Event Handler
The example here is provided to illustrate how to define and use an event
handler. The event handler “excpt_dividebyzero” is used in this example.
First, a program is generated in the PLC_PRG- module which provokes division
by 0.
Figure 78: CODESYS Program Provokes Division by “0”
After this, the system event “excpt_dividebyzero” is activated in the Task
Configurator and the name of the event handler to be generated is entered in the
column “Called POU”.
Figure 79: CODESYS – Creating and Activating an Event Handler
To generate the event handler, click
[Generate CALLBACK_DIV_BY_ZERO
function block]
.
A new function having the defined name then appears in the “Function blocks”
tab.