Operation
10/10 MN05003003Z-EN
50
Interrupt inputs I1 … I4
Inputs I1 to I4 can be configured as interrupt inputs. An edge at
the input generates an interrupt signal (
page 52) that calls the
program routine assigned to it.
X
First define the edge of the input signal in the PLC configurator.
X
Assign the program routine to the input in the task
configuration.
The inputs are prioritised in groups. I1 and I2 have a high priority,
I3 and I4 have a low priority.
Lower priority interrupts can be interrupted by those with higher
priority.
Counter interrupt
When using the High-speed counter function, the controller
continuously compares the actual value with the reference preset
value of the counter. If both are the same, an interrupt is
generated (
page 52) which calls the program routine (POU)
you have created.
To do this you first have to define the counter type in the PLC
configurator. You then have to assign the input receiving the count
pulses to the POU in the task configuration.
Timer interrupt
You can create a program routine that is called at a fixed time
interval. The TIMERINTERRUPTENABLE function is started by a
Boolean variable or an external input. The program routine is
assigned to the timer interrupt in the task configuration.The
interval can be set from 500 – 2500000 microseconds. This period
duration is programmed by adding the TIMERINTERRUPTENABLE
function from the EC_Util.lib library to your user program.
Enter the interval time at the dwTimerTickUS input.
The value is accepted with the start of the timer and can not be
modified for the run time. If the value assigned is outside the
500 – 2500 000 range, the function outputs FALSE as a return
value and the timer is not run.
For example, to set an interval time of 2 seconds to be started by
the external input I0.0, you must enter the following line in the
user program:
TimerInterruptEnable(%IX0.0,2000000)
Figure 49: TimerInterruptEnable function
Figure 50: Periodic calling of the program routine
Figure 51: Including the function in the program
TIMERINTERRUPTENABLE
BOOL
xEnable
TimerInterruptEnable
BOOL
DWORD
dwTimerTickUS
xEnable
p
p = TimerTickUS
Call
Program
routine
Summary of Contents for easyControl EC4-200
Page 4: ...II...
Page 10: ...10 10 MN05003003Z EN 6...
Page 14: ...10 10 MN05003003Z EN 10...
Page 22: ...10 10 MN05003003Z EN 18...
Page 38: ...10 10 MN05003003Z EN 34...
Page 62: ...10 10 MN05003003Z EN 58...
Page 78: ...10 10 MN05003003Z EN 74...
Page 96: ...10 10 MN05003003Z EN 92...