beautypg.com

Event-driven updates versus polling – Echelon LNS DDE Server User Manual

Page 79

background image

by exception strategy; a new value is reported only upon changes in the variable's

value.

If the LNS DDE Server is bound to an output network variable on a device and the

LNS DDE Server has not yet received an update message from the variable, the LNS
DDE Server polls the variable to get an initial value and then waits for event-driven

updates for future values. The LNS DDE Server attempts to pass all these updates
to your application as soon as the update arrives. It is possible that multiple updates

will arrive before the LNS DDE Server is able to send an update to your application.

In this case, only the most recent value is sent. To control the volume of data coming
from the LNS DDE Server, your application can use the optional interval rate

argument when specifying the item. For variables monitored via event driven
updates, the –i interval rate option defines the maximum rate at which the LNS

DDE Server will send updates to your application in tenths of a second. For

example, an interval rate of 5 means that no matter how fast updates arrive, the

LNS DDE Server will send updates to the DDE client no faster than once every ½
second.


The procedure used to receive ongoing updates via DDE is application dependent.

The following sections describe the concepts and trade-offs of using event-driven

versus polled updates in greater detail, and describes how to receive ongoing updates
in Excel and InTouch.

Event-Driven Updates versus Polling

In a LONWORKS network, devices communicate using either event-driven updates

or polling. Most communication between devices controlling a system is done using
event-driven updates by binding network variables together. With event-driven

updates, each source device chooses when to send its information to the destination

devices based on some event. It may send the data after a set period of time (for
example, once every 0.5 seconds), it may wait until a significant change has occurred

(for example, the measured value has changed 2%), or a combination of both. The

destination devices do not know why the data was sent, or when it will be sent again.

The second method of communication between devices is polling. When using

polling, a destination device requests (polls) the value of a variable and the source
sends the variable to the destination. In some cases, destinations want to control

when they receive information.

When installing the network and the monitoring system, you can either bind the

LNS DDE Server host to a variable for event-driven updates or use polling. For
example, consider monitoring an output network variable for an over-temperature

alarm. With polling, your application has two choices. It can poll frequently (which

ensures that it finds updates quickly, at the price of increased network traffic), or it
can poll infrequently (which reduces network traffic at the price of a delay in update

notification). Another solution is to bind the monitoring device to the update output

network variable. This notifies your application of updates when they happen,
without polling.

In most situations, polling is the appropriate monitoring method. For example, with
binding you can only monitor output network variables. If you want to monitor the

value of an input network variable, you must use polling. Polling an input network

LNS DDE Server User's Guide

5-9