Echelon LNS User Manual

Page 155

Advertising
background image

LNS Programmer's Guide

141

entries must be defined when the application is created by the device manufacturer, and

are located in non-volatile memory. Available alias table entries are used by the LNS
Object Server to create connections that would otherwise violate the rule requiring

devices to have no more than one input and, in some cases, one output network variable

within a given connection group.

Figure 6.5 shows an example of a connection that can only be made with aliases. A single

network variable (nvi_Output) on Device One is connected to two separate network
variables (nvi_Input1 and nvi_Input2) on Device Two. The LNS Object Server creates

one connection using the primary output network variable in Device One, and creates the
other using an alias table entry on Device One. The second, implicit connection using the

output network variable alias is required because two different selector values are

needed to update the input network variables on Device Two. Both device’s application
programs are unaware of this use of aliases, and the LonTalk protocol automatically

ensures that all their network variables behave correctly. When Device One’s application

program updates its output network variable, messages are sent on both the primary and
the alias network variables in two separate transactions. Device Two, in turn, receives

two network variable updates, one for each input network variable.

nvi_Output

Device One

Device Two

nvi_Input1

nvi_Input2

Figure 6.5 Connections Using Network Variable Aliases

For message tag connections, the LNS Object Server enforces these rules:

• Message tags can only be connected to message tags.
• Each device in a connection can have no more than one message tag in

the connection.

• In a device's application, there is always one message tag called msg_in.

The device sends all messages it receives to this tag. The device

manufacturer can declare multiple other message tags on each device

(usually up to 14). Additionally, you can create dynamic message tags on
some devices. You can use these declared and dynamic message tags to

send bound messages to other devices. If the hub of a connection is a
msg_in message tag, then the connection’s targets must all be declared

or dynamic message tags.

• If the hub is a declared message tag (not the msg_in tag), the targets can

be either declared or dynamic message tags, or msg_in tags.

• A declared or dynamic message tag can be in no more than one

connection because it's directly tied to a single address table entry in the

device.

Advertising