Echelon LNS User Manual

Page 234

Advertising
background image

LNS Programmer's Guide

220

ByVal nvMonitorPoint As Object, _

ByVal dataPoint As Object, _

ByVal srcAddress As Object)

If nvMonitorPoint.Tag = "Room Thermometer" Then

roomTemp

=

dataPoint.FormattedValue

End

If

End Sub
Note that by using the

OnNvMonitorPointUpdateEvent

event as described in this

section, you will receive the events through the LNS Object Server. You can use the
ILcaNvMonitorPointListener interface to receive the events directly from the

network variable monitor point, which may be more efficient. You can only use this
technique if your development environment supports multi-threading. For more

information on this, see Tracking Monitor Point Updates on page 228.

The Implicit Bound Network Variable Monitoring Scenario

In the implicit bound monitoring scenario, LNS implicitly creates a connection from each

monitored output network variable in the monitor set to the corresponding network

variable monitor point. Every time the value of an output network variable on a device is
updated, the device will send a network variable update to LNS through the appropriate

connection. LNS will then report the update to the LNS client application via the

OnNvMonitorPointUpdateEvent

event, as with the polled network variable monitoring

scenario. The network variable connections created by LNS are “invisible” connections,

meaning that you will not see the connections in any of the hub or target collections, and

the connections do not use any network variables on the Network Service Device.

NOTE: Network variable monitor points in temporary monitor sets cannot be
automatically bound by LNS to the monitoring node. As a result, you can only use the

implicit bound network variable monitoring scenario with permanent monitor sets.

Bound monitoring is most efficient when your application needs to be notified

immediately when the value of the network variable changes, but the value may not

change very frequently (for example an alarm or failure condition notification). You will
receive updates sooner using this method than the polled network variable monitoring

method, because your application will be notified of network variable updates as soon as

they occur. When using polled network variable monitoring, you will only receive

OnNvMonitorPointUpdateEvent

events at the rate specified by the

PollInterval

property.

To use implicit bound monitoring, follow these steps:

1. Create a monitor set and add monitor points for the network variables

you want to monitor. For more information on these tasks, see Creating

Monitor Sets on page 194, and Managing Monitor Sets on page 195.

2. When you set the monitoring options for the monitor set, set the

UseBoundUpdates

property to

True

to enable implicit bound monitoring.

Note that it is possible for polled and bound monitoring to take place

simultaneously. Set the

SuppressPollingIfBound

property to

True,

or set the PollInterval property to 0, to ensure that only bound

monitoring takes place.

3. Make sure that you set the

ThrottleInterval

property appropriately.

This property should be set to 0 if you want to be sure that network

variable update events are fired for each update.

Advertising