ifm
System Manual
ecomat
mobile
SmartController (CR2500, CR2502) V05
More functions in the ecomatmobile controller
Processing
interrupts
233
10.5.1
Function SET_INTERRUPT_XMS
Contained in the library:
ifm_CRnnnn_Vxxyyzz.LIB
Available for the following devices:
•
CabinetController: CR0301, CR0302, CR0303
•
ClassicController: CR0020, CR0032, CR0505
•
ExtendedController: CR0200, CR0232
•
PCB controller: CS0015
•
SmartController: CR2500, CR2501, CR2502
•
PDM360 smart: CR1071
Function symbol:
SET_INTERRUPT_XMS
ENABLE
REPEATTIME
READ_INPUTS
WRITE_OUTPUTS
ANALOG_INPUTS
Description
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 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 the function 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 function 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".
Содержание Ecomat 100 ecomatmobile SmartController CR2500
Страница 1: ...System Manual SmartController CR2500 CR2502 CoDeSys V2 3 Target V05 7390667 00 03 2009 ...
Страница 6: ......
Страница 282: ......