Configuration network variable arrays – Echelon Neuron C User Manual

Page 186

Advertising
background image

166

Network Variable, Configuration Property, and Message Tag Declarations

page 171. A range-modification string provided in the instantiation of a CP

family member overrides any range-modification string provided in the
declaration of a CP family.
Unlike device properties, network variable properties can be shared between two

or more network variables. The use of the global keyword creates a CP family
member that is shared between two or more network variables. The use of the

static keyword creates a CP family member that is shared between all the
members of a network variable array, but not with any other network variables

outside the array. See the discussion of network variable properties in the

Neuron C Programmer’s Guide

for more information.

A configuration network variable cannot, itself, also have a network variable

property list. That is, you cannot define configuration properties that apply to

other configuration properties.

Configuration Network Variable Arrays

A configuration network variable array that is a configuration property can be

used in one of two ways. Each element of the array can be treated as a separate

configuration property, or all elements of the array can be treated as a single
configuration property taken together.
To use each network variable array element as a separate, scalar configuration

property, specify the starting index of the first array element in the properties
list, as in Example 1 below. The example shows elements [2] through [5] of the

cpMaxSendT array used as properties for nvoValue[0] through nvoValue[3],

respectively, with the remaining elements of cpMaxSendT being unused.

Example 1:

network input cp SCPTmaxSendT cpMaxSendT[10];
network output SNVT_lev_percent nvoValue[4]
nv_properties

{

cpMaxSendT[2]
};

To use the entire network variable array as a single property, do not specify any
index in the properties list, as in Example 2 below. The entire array

cpMaxSendT becomes a single property of nvoValue.
Example 2:

network input cp SCPTmaxSendT cpMaxSendT[10];
network output SNVT_lev_percent nvoValue
nv_properties

{

cpMaxSendT
};

Similarly, a single network variable array element, or the entire network

variable array can be used as a device property (see

Device Property Lists

on

page 173).

A configuration network variable array must be shared with the static or global

keyword if it applies to a network variable array.
Example 3:

network input cp SCPTmaxSendT
cpMaxSendT[10];

Advertising