120
ifm
Programming Manual
ecomatmobile
CabinetController (CR0301) Runtime System V05
2016-04-21
ifm function elements
ifm function elements for the device CR0301
>
SET_INTERRUPT_XMS
272
Unit type = function block (FB)
Unit is contained in the library
ifm_CR0301_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
275
SET_INTERRUPT_XMS handles the execution of a program part at an interval of x ms.
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 at fixed intervals (every xAnother possibility is to
call a certain program part at fixed intervals (every x ms) 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_XMS once (during
initialisation). As a consequence, this program block is always processed after the REPEATTIME has
elapsed (every x ms). If inputs and outputs are used in this program part, they are also read and
written in the defined cycle. 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, timers can be monitored more precisely than in a "normal cycle".
NOTE
To avoid that the program block called by interrupt is additionally called cyclically, it should be skipped
in the cycle (with the exception of the initialisation call).
Several timer interrupt blocks can be active. The time requirement of the interrupt functions must be
calculated so that all called functions can be executed. This in particular applies to calculations,
floating point arithmetic or controller functions.
The user is responsible for data consistency between the main program and the program parts
running in the interrupt!
Please note:
In case of a high CAN bus activity the set REPEATTIME may fluctuate.
Содержание 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: ......