Fan-in connections – Echelon LNS User Manual
Page 235
LNS Programmer's Guide
221
4. Enable the monitor set, as described in Opening and Enabling Monitor
Sets on page 213. Once implicit bound monitoring has started, your
application will be informed of each network variable update via the
OnNvMonitorPointUpdateEvent
event. If you only want your
application to be informed when the value of a network variable monitor
point changes, set the
ReportByException
property to True when you
set the monitoring options for the monitor point or monitor set.
The
OnNvMonitorPointUpdateEvent
event includes three parameters:
the
NvMonitorPoint
object whose value is being reported, a
DataPoint
object containing the value of the
NvMonitorPoint
, and a
SourceAddress
object that you can use to identify the device containing
the network variable.
Echelon does not recommend using the SourceAddress object to identify
the network variable, since source addresses may change, and translating
from a source address to an application device may be time consuming. A
more efficient alternative is to set the NvMonitorPoint object’s Tag
property to a value you can use to identify the network variable and
source device associated with the monitor point when you create the
monitor point.
See Example of a Network Variable Event Handler on page 218 for a
sample
OnNvMonitorPointUpdateEvent
event handler.
The Explicit Bound Network Variable Monitoring and Control
Scenario
In the explicit bound monitoring and control scenario, the application explicitly creates a
host network variable on the LNS application’s Network Service Device, connects one or
more device network variables to the host network variable, and then creates a monitor
point for the device’s output network variable.
Fan-in Connections
Consider an alarm system in which a number of detector devices are installed which can
send network variable updates indicating when an intruder has been detected. You
could use the implicit bound monitoring scenario to create bound monitor points to
monitor the detector devices. When one of the detector devices detected an intruder, it
would update its network variable, which would cause the
OnNvMonitorPointUpdateEvent event to be fired. In this case, the LNS application
could use the parameters returned with the OnNvMonitorPointUpdateEvent event to
determine which alarm had been triggered.
However, it may be more natural to connect all of the alarm device output network
variables to a single input network variable on the host PC. This type of connection is
called a fan-in connection, because multiple output network variables "fan-in" to a single
input network variable. Figure 9.1 shows an example of fan-in where a single input
network variable on the host is connected to two output network variables on the
network.