117
ifm
Programming Manual
ecomatmobile
CabinetController (CR0301) Runtime System V05
2016-04-21
ifm function elements
ifm function elements for the device CR0301
>
SET_INTERRUPT_I
2381
Unit type = function block (FB)
Unit is contained in the library
ifm_CR0301_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
281
11573
SET_INTERRUPT_I handles the execution of a program part by an interrupt request via an input
channel.
In the conventional PLC the cycle time is decisive for real-time monitoring. So the PLC is at a
disadvantage as compared to customer-specific controllers. Even a "real-time operating system" does
not change this fact when the whole application program runs in one single block which cannot be
changed.
A possible solution would be to keep the cycle time as short as possible. This often leads to splitting
the application up to several control cycles. This, however, makes programming complex and difficult.
Another possibility is to call a certain program part only upon request by an input pulse independently
of the control cycle:
The time-critical part of the application is integrated by the user in a block of the type PROGRAM
(PRG). This block is declared as the interrupt routine by calling SET_INTERRUPT_I once (during
initialisation). As a consequence, this program block will always be executed if an edge is detected on
the input CHANNEL. If inputs and outputs are used in this program part, these are also read and
written in the interrupt routine, triggered by the input edge. Reading and writing can be stopped via the
FB inputs READ_INPUTS, WRITE_OUTPUTS and ANALOG_INPUTS.
So in the program block all time-critical events can be processed by linking inputs or global variables
and writing outputs. So FBs can only be executed if actually called by an input signal.
NOTE
The program block should be skipped in the cycle (except for the initialisation call) so that it is not
cyclically called, too.
The input (CHANNEL) monitored for triggering the interrupt cannot be initialised and further processed
in the interrupt routine.
The runtime of the main cycle plus the sum of the duration of all program parts called via interrupt
must always be within the max. permissible cycle time!
The user is responsible for data consistency between the main program and the program parts
running in the interrupt mode!
Содержание Ecomat 100 Mobile CR0301
Страница 209: ...209 ifm Programming Manual ecomatmobile CabinetController CR0301 Runtime System V05 2016 04 21 Notizen Notes Notes ...
Страница 210: ...210 ifm Programming Manual ecomatmobile CabinetController CR0301 Runtime System V05 2016 04 21 Notizen Notes Notes ...
Страница 211: ...211 ifm Programming Manual ecomatmobile CabinetController CR0301 Runtime System V05 2016 04 21 Notizen Notes Notes ...
Страница 212: ......