
WAGO-I/O-SYSTEM 750
Run-time System CODESYS 2.3 247
750-8207 PFC200 CS 2ETH RS 3G
Manual
Draft version 1.2.1 from 2017-09-13, valid from FW Version 02.06.20(09)
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 84: 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 85: 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.