Manual – IPOSplus®
45
5
Interrupts
Task Management and Interrupts
5.4.4
Example
MOVIDRIVE
®
B positions a travel drive. A PLC controls MOVIDRIVE
®
via a fieldbus.
Change the individual parameters directly on MOVIDRIVE
®
using SEW keypads.
Proposed solution:
Task 1: Programming the motion sequence
Task 2: HMI communication with the operator terminal
Task 3: Fieldbus communication with the PLC
It is important to distribute the additional commands correctly, depending on the appli-
cation:
•
Interrupt-oriented programs:
When a user program is interrupt-oriented and the
task 1 interrupts should be processed quickly, task 1 must be assigned a high
calculation priority using additional commands in P938.
•
Runtime-optimized programs:
If, for example, process data is to be converted in
IPOS, this must be done as quickly as possible. Task 3 can be used to process
convert routines as quickly as possible. In this case, task 1 and task 2 should be
assigned as few additional commands/ms as possible. This ensures the fastest total
application performance if tasks 1 and 2 run with the minimum speed.
5.5
Interrupts
An interrupt - triggered by an event - interrupts the processing of the task it is assigned
to. The entire interrupt routine is run through once, as long as it is not interrupted by an
interrupt with a higher priority of the same task.
An interrupt that is activated by _SetInterrupt() or SETINT can be triggered by a timer0
overflow, a system/unit fault or touch probe DI02 and interrupts task 1.
In MOVIDRIVE
®
B, up to 4 additional variable interrupts can be activated using
_SetVarInterrupt() or VARINT. They interrupt task 2 or task 3 as required.
The response time for task 1 interrupts (unit fault, DI02 touch probe or T0_overflow) is
dependent on the number of activated interrupts (1 interrupt <= 1ms, 2 interrupts <=
2ms, 3 interrupts <= 3ms). The response time for variable interrupts is dependent on the
number of activated interrupts <= 1ms.
If an interrupt is triggered during a wait command, the waiting time of the command con-
tinues to run in the background. Once the program has jumped back to the task, it only
has to wait the remaining time before continuing.
P
i
f
kVA
Hz
n
P
i
f
kVA
Hz
n