EasyManua.ls Logo

Moeller EC4-200 - Interrupt Inputs I1 to I4; Counter Interrupt; Timer Interrupt

Moeller EC4-200
82 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
05/06 AWB2724-1584GB
System events
43
Interrupt inputs I1 to I4
Inputs I1 to I4 can be configured as interrupt inputs. An edge at
the input generates an interrupt signal (a page 45), 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. I1 has the highest priority, followed by
I2, I3 and I4.
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 (a page 45), 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
from the EC_Util.lib library to your user program.
Enter the interval time at the dwTimerTickUS input.
The value is accepted when the timer is started and cannot be
changed while it is running. 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 39: TimerInterruptEnable function
Figure 40: Periodic calling of the program routine
Figure 41: Including the function in the program
TIMERINTERRUPTENABLE
BOOL xEnable TimerInterruptEnable BOOL
DWORD dwTimerTickUS
xEnable
p
p = TimerTickUS
Call
Program
routine

Table of Contents

Related product manuals