Sending Counting Events to the Application
Original instructions
At a Glance
The event task number must be declared in the module’s configuration screen to enable the events sending.
The BMX EHC 0200 module has eight event sources contained in the events_source word at the address %IWr.m.c.10:
Address
Standard Symbol
Description
Counting mode concerned
%IWr.m.c.10.0
EVT_RUN
Event due to start of counting.
One Shot Counter mode
%IWr.m.c.10.1
EVT_MODULO
Event due to counter being equal to modulo value - 1 or equal to value 0.
  • Modulo Loop Counter Mode
  • Free Large Counter mode
%IWr.m.c.10.2
EVT_SYNC_PRESET
Event due to a synchronization or counter homing.
  • Event Counting mode
  • One Shot Counter mode
  • Modulo Loop Counter mode
  • Free Large Counter mode
%IWr.m.c.10.3
EVT_COUNTER_LOW
Event due to counter being less than the lower threshold.
  • Frequency mode
  • Event Counting mode
  • Period Measuring mode
  • Ratio mode
  • One Shot Counter mode
  • Modulo Loop Counter mode
  • Free Large Counter mode
%IWr.m.c.10.4
EVT_COUNTER_WINDOW
Event due to counter being between the upper and lower thresholds.
  • Frequency mode
  • Event Counting mode
  • Period Measuring mode
  • Ratio mode
  • One Shot Counter mode
  • Modulo Loop Counter mode
  • Free Large Counter mode
%IWr.m.c.10.5
EVT_COUNTER_HIGH
Event due to counter being greater than the upper threshold.
  • Frequency mode
  • Event Counting mode
  • Period Measuring mode
  • Ratio mode
  • One Shot Counter mode
  • Modulo Loop Counter mode
  • Free Large Counter mode
%IWr.m.c.10.6
EVT_CAPT_0
Event due to capture 0.
  • Modulo Loop Counter Mode
  • Free Large Counter mode
%IWr.m.c.10.7
EVT_CAPT_1
Event due to capture 1.
Free Large Counter mode
%IWr.m.c.10.8
EVT_OVERRUN
Event due to overrun
  • Frequency mode
  • Event Counting mode
  • Period Measuring mode
  • Ratio mode
  • One Shot Counter mode
  • Modulo Loop Counter mode
  • Free Large Counter mode
All the events sent by the module, whatever their source, call the same single event task in the PLC.
There is normally only one type of event indicated per call.
The evt_sources word (%IWr.m.c.10) is updated at the start of the event task processing.
Enabling Events
In order for a source to produce an event, the validation bit corresponding to the event must be set to 1:
Address
Description
%QWr.m.c.1.0
Start of counting event validation bit.
%QWr.m.c.1.1
Counter rollovering modulo, 0 or its limits event validation bit.
%QWr.m.c.1.2
Synchronization or counter homing event validation bit.
%QWr.m.c.1.3
Counter less than lower threshold event validation bit.
%QWr.m.c.1.4
Counter between the upper and lower thresholds event validation bit.
%QWr.m.c.1.5
Counter greater than upper threshold event validation bit.
%QWr.m.c.1.6
Capture 0 event validation bit.
%QWr.m.c.1.7
Capture 1 event validation bit.
Input Interface
The event only has one input interface. This interface is only updated at the start of the event task processing. The interface consists of:
Operating Limits
Each counter channel can produce a maximum of one event per millisecond, but this flow may be slowed down by simultaneously sending events to several modules on the PLC bus.
Each counter channel has a four slot transmission buffer which can be used to store several events while waiting to be sent.
If the channel is unable to send all of the internally produced events, the overrun_evt bit (%IWr.m.c.10.8) of the evt_sources word is set to 1.