Echelon ISI User Manual

Page 70

Advertising
background image

ISI Programmer’s Guide

68

IsiGetNvIndex(), and IsiGetWidth() handle connections of simple assemblies

referring to a single network variable of a standard network variable type.

For example, a device supporting a compound assembly may implement a closed-
loop actuator with an input and output network variable—the actuator is an

implementation of the SFPTclosedLoopActuator profile called

myClosedLoopActuator with a SNVT_amp input and output called nviValue and
nvoValue. The following code opens enrollment for connections to the

myClosedLoopActuator functional block:


IsiOpenEnrollment(myAssemblyNumber);

In turn, the ISI engine calls the IsiGetWidth() and IsiCreateCsmo() callbacks,

which you may override to honor this particular assembly:


unsigned IsiGetWidth(unsigned Assembly) {

// Return 2 for the myClosedLoopActuator assembly

return Assembly == myAssemblyNumber ?
2 : isiGetWidth(Assembly);
}

When a device becomes a connection host for a compound assembly, the device
issues an open enrollment message (CSMO), which includes the first selector
used in this enrollment S

0

, and the number of network variable selectors used

with this enrollment Width. For compound assemblies, i.e. assemblies with

Width > 1, devices that accept the connections must understand how to apply the
Width different network variable selector values to the local network variables.

An accepting device derives that knowledge from the CSMO. For example, if the
CSMO refers to a standard functional profile that is recognized by the receiving

device, and if the CSMO’s Variant field is zero, the receiving device knows that
the enrollment contains Width selector values starting with

S

0

, where

subsequent selector values

S

1

,

S

2

S

Width-1

follow sequentially to a maximum of

0x2FFF, with any following selector values continuing at 0 (unless a different
mapping is specified in the profile). If not otherwise specified in the profile, the

selector values are applied to the host’s network variables in rising order of the

network variable member number within the functional profile, starting with the
member number contained in the CSMOEX’s Member field.

In case the host offers a SFPTclosedLoopSensor standard functional profile with

Width 2, the host will therefore apply the selector values to the network variables
as shown here:

Assembly Member Allocation

Advertising