Echelon FTXL User Manual
Page 47
![background image](/manuals/735717/47/background.png)
FTXL User’s Guide
35
When you define a configuration property array, the entire array (but not each
element) applies to one or more network variables or functional blocks within the
model file. That is, a configuration property array is atomic, and thus applies in
its entirety to a particular item.
Assuming that the device has sufficient resources, it is always possible to define
arrays of configuration properties. However, configuration property arrays are
subject to the functional profile definition. For each member configuration
property, the profile describes whether it can, cannot, or must be implemented as
a configuration property array. The profile also describes minimum and
maximum dimensions for the array. If you do not implement the configuration
property array as the profile requires, the profile’s implementation becomes
incorrect.
Example:
This example defines a four-channel analog-to-digital converter (ADC), with the
following properties:
• Four channels (implemented as an array of functional blocks)
• One gain setting per channel (implemented as an array of configuration
properties)
• A single offset setting for the ADC (implemented as a shared
configuration property)
• A linearization setting for all channels (implemented as a configuration
property array)
#include
#define CHANNELS 4
network output SNVT_volt nvoAnalogValue[CHANNELS];
network input cp SCPTgain nciGain[CHANNELS];
network input cp SCPToffset nciOffset;
network input cp SCPTsetpoint nciLinearization[5];
fblock SFPTopenLoopSensor {
// the actual network variable that implements the
// mandatory 'nvoValue' member of this profile:
nvoAnalogValue[0] implements nvoValue;
} fbAdc[CHANNELS] external_name("Analog Input")
fb_properties {
// one gain factor per channel:
nciGain[0],
// one offset, common to all channels:
static nciOffset,
// one linearization array for all channels:
static nciLinearization = {
{0, 0}, {2, 0}, {4, 0}, {6, 0}, {8, 0}
};
};
This example implements a single output network variable, of type SNVT_volt,
per channel to represent the most recent ADC reading. This network variable
has a fixed type, defined at compile-time, but could be defined as a changeable-
type network variable if needed for the application.