274 Run-time System CODESYS 2.3
WAGO-I/O-SYSTEM 750 XTR
750-8212/040-010 PFC200 G2 2ETH M12 RS XTR
Manual
Version 1.0.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 88: 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 89: 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.