Echelon FTXL User Manual

Page 143

Advertising
background image

FTXL User’s Guide

131

of the nvoData network variable array), and four offset CP family members

(SCPToffset), one for each member of each fblock array.

It also instantiates a total of two gain control CP family members (SCPTgain),

one for MyFb1, and one for MyFb2. Finally, it instantiates a single location CP

family member (SCPTlocation) that is shared by MyFb1 and MyFb2.

// CP Family Declarations:
SCPTgain cp_family cpGain;

SCPTlocation cp_family cpLocation;
SCPToffset cp_family cpOffset;

SCPTmaxSndT cp_family cpMaxSendT;
SCPTminSndT cp_family cpMinSendT;

// NV Declarations:
network output SNVT_lev_percent nvoData[4]
nv_properties

{

cpMaxSendT, // throttle interval

cpMinSendT // heartbeat interval

};

// Four open loop sensors, implemented as two arrays of
// two sensors, each. This might be beneficial in that
// this software layout might meet the hardware design

// best, for example with regards to shared and individual

// properties.

fblock SFPTopenLoopSensor {

nvoData[0] implements nvoValue;

} MyFb1[2]

fb_properties {

cpOffset, // offset for each fblock

static cpGain, // gain shared in MyFb1

global cpLocation // location shared in all 4

};


fblock SFPTopenLoopSensor {

nvoData[2] implements nvoValue;

} MyFb2[2]

fb_properties {

cpOffset, // offset for each fblock

static cpGain, // gain shared in MyFb2

global cpLocation // location shared in all 4

};

Example 2: This example implements an open loop sensor as an ammeter. The
nvoValue mandatory network variable is implemented, but no optional network

variables are. The SCPTdefOutput optional configuration property is
implemented, and a second, implementation-specific, SCPTbrightness

configuration property is also implemented.
The names in the example for the CP families (cpDefaultOutput and
cpDisplayBrightness) have no external relevance; these names are only used

within the device's source code in order to reference the configuration property.

SCPTdefOutput cp_family

cpDefaultOutput;

SCPTbrightness cp_family cpDisplayBrightness;

Advertising