Network variable monitor point options – Echelon LNS User Manual
Page 215
LNS Programmer's Guide
201
If you do not want a monitor point to use those default options during a
particular monitoring session, you can change the options that will be used
by writing to its
CurrentOptions
. All changes made to the
CurrentOptions
property take effect immediately. However, when the
monitor set is closed, these changes will not be saved as the default options to
be used the next time it is opened. The default options for each monitor point
must be maintained using the
DefaultOptions
properties.
NOTE: For permanent network variable monitor points, the default values
for some options properties (ServiceType, Retries, Priority) are
controlled by the connection description specified when the monitor point is
created. This is described in more detail in Table 9.1 in the next section.
Network Variable Monitor Point Options
The previous section of this document described the different ways to access an
NvMonitorOptions object, and how each one affects a monitor set or individual network
variable monitor point. To recap, you should follow these steps when setting the
monitoring options for your network variable monitor points:
1. Set the defaults for the monitor set by writing to the
NvOptions
property
of the
MonitorSet
object. The following code sample sets the default
values for the
ReportByException
,
GenerateInitialFetch
, and
PollInterval properties.
Set NvMonitorPointOptions = MySet.NvOptions
NvMonitorPointOptions.ReportByException = True
NvMonitorPointOptions.GenerateInitialFetch = True
NvMonitorPointOptions.PollInterval = 5000
Set MySet.NvOptions = NvMonitorPointOptions
For descriptions of the properties of the
NvMonitorOptions
object, see
NvMonitorOptions Object on page 202.
2. If you do not want a network variable monitor point in the set to use the
default options established in step 1, you can change its default options
by writing to its
DefaultOptions
property. Note that these changes will
not be applied to a monitor point that is in an open monitor set until the
monitor set is closed and re-opened.
Echelon recommends that you set the DefaultOptions property in the
same transaction that you create the network variable monitor point
whenever possible. The following code sample sets the default values for
a network variable monitor point’s
ResetPollingIfUpdated
and
SuppressPollingIfBound
properties.
Set NvMonitorPointOptions = MonitorPoint.DefaultOptions
NvMonitorPointOptions.ResetPollingIfUpdated = True
NvMonitorPointOptions.SuppressPollingIfBound = False
Set MonitorPoint.DefaultOptions = NvMonitorPointOptions
NOTE: Because temporary monitor points are only used in a single client
session, their
DefaultOptions
are not accessible. If you attempt to
acquire the DefaultOptions property through a temporary monitor
point, the LCA:#161 lcaErrNotAllowedOnTemporaryObject
exception will be thrown. All temporary monitor points will be enabled
with the default options selected in step 1.