Using temporary monitor sets – Echelon LNS User Manual

Page 26

Advertising
background image

LNS Programmer's Guide

12

lcaMgmtModePropagateConfigUpdates (note that prior to LNS Turbo Edition, this

was lcaOnNet) and the Network Service Device is updated. The collection accessed
through the CurrentMonitorSets property allows access to all the monitor sets in your

Network Service Device that you can currently open and enable on a network (the
collection accessed through the MyVni property allows access to these monitor sets, as

well as those in the LNS database that have not yet been commissioned into your client

PC’s Network Service Device). You can use all the monitor sets obtained through the
CurrentMonitorSets property as runtime monitor sets, meaning that you can enable

them and use them for monitoring operations. However, persistent changes to their
configuration are not allowed when accessed through this collection. As noted previously,
you should use the collection obtained through the MyVni property when you need to

change the persistent configuration of your client’s local MonitorSet objects.

NOTE: You can access the CurrentMonitorSets collection when running in

independent mode (i.e. without connection to the LNS Server PC).

Using Temporary Monitor Sets

If you need monitor points that will only be used in a single client session, you should use
temporary MonitorSet objects. As of LNS Turbo Edition, you can create a temporary

monitor set with the CreateTemporaryMonitorSet() method of the Network object.

The properties and methods that can be used on a temporary MonitorSet object and the

monitor points it contains are generally the same as those that can be used on a
permanent MonitorSet object and its monitor points. However, if you have been using

permanent MonitorSet objects with LNS 3.0, you should note a few exceptions to this

rule.

Temporary MonitorSet objects cannot be created or used while in independent mode.

The Open() and Close() methods have no effect on temporary MonitorSet objects,

because temporary MonitorSet objects are opened as soon as they are created, and

closed when they are released, or when the client session in which they were created

ends. You should also note that temporary monitor sets are not enabled as they are

opened. You must explicitly enable temporary monitor sets and temporary monitor
points with your application using the applicable Enable method. For this purpose, the
MsgMonitorPoint object now includes an Enable method.

In addition, the DefaultOptions properties stored in MsgMonitorPoint and
NvMonitorPoint objects in temporary monitor sets are read-only. The values applied to
these properties are taken from the temporary monitor set’s MsgOptions or NvOptions

properties.

Monitor points in temporary monitor sets do not support the use of connection

description templates to define certain monitoring options, as monitor points in
permanent monitor sets do. As a result, you must set the connDesc element to NULL

when you use the Add() method to add a message monitor point or network variable

monitor point to a temporary monitor set.

There is one other variance to note when you use temporary MonitorSet objects.

Network variable monitor points in temporary monitor sets cannot be automatically
bound to the monitoring node. As a result, the UseBoundUpdates property of all
temporary monitor sets and monitor points can only be set to False, meaning that you

cannot use LNS to implicitly connect network variables monitored by temporary monitor

Advertising