Echelon IzoT NodeBuilder User Manual
Page 152
4. In the SFPT or UFPT property, select the desired functional profile template.
5. In the Name property, enter a name for your functional block.
6. To create a functional block array, select the Use Array checkbox, and then enter the number of
functional blocks in the array in the Size box. See Using Large Functional Block Arrays for how
to manage your device application’s memory when you are implementing large functional block
arrays.
7. Click OK.
8. In the Program Interface pane, set the network variable type for any mandatory network variables
that do not have a default type set by the functional profile.
Using Large Functional Block Arrays
Implementing member network variables that apply to a functional block array of x elements requires
one network variable per functional block array element for each member network variable.
Implementing a single member network variable will therefore require x network variables,
implemented as an array of x network variables. Most functional profiles specify more than one
mandatory network variable (m), and will require m*x network variables.
Devices based on Neuron chips that use version 16 firmware or greater (for example, the 5000 or 6000
Series chips) support up to 254 static network variables (this limit is subject to available system
resources and application requirements). Storage for network variable values is by default allocated to
the NEAR RAM segment. The NEAR RAM segment allows accessing these variables with the most
efficient code (smaller, faster) compared to linking those network variable values into on-chip or
off-chip FAR RAM segments. However, the Neuron Chip’s hardware architecture limits the NEAR
RAM segment to 256 bytes in total, shared among global application and system variables and network
variables.
Implementing very large functional block arrays, implementing smaller functional block arrays with
large numbers of member network variables, or generally implementing large numbers of functional
blocks (or network variables or application variables in general) will eventually exhaust the NEAR
RAM segment, and it will cause compiler or linker errors.
You will need to select variables for FAR RAM segments and NEAR RAM segments, respectively.
You will typically try to allocate the most frequently accessed and most time-critical ones into NEAR
RAM, permitting inherent limitations.
To change the allocation rules, double click a member network variable, then click Advanced in its
properties dialog, and select far to force a variable out of the NEAR RAM segment. See Chapter 8 of
the Neuron C Reference Guide for more information about using RAM in your Neuron C application.
Editing Mandatory Network Variables
When you add a functional block to your device interface, all the mandatory network variables
specified by the functional profile are automatically added to the Mandatory NVs folder under the
functional block. The functional profile provides defaults for all the properties of the network
variables; however, you can edit some of the properties. For example, you can set the network variable
type if the network variable does not have one set for it by the functional profile (for example, the
nvoSwitch member network variable in the openLoopSensor profile is defined using the placeholder
type SNVT_xxx), change the modifiers and messaging service used if the network variable is an
output network variable, set the initial value for the network variable when the device is reset, and set
the storage classes used by the network variable.
To edit a mandatory network variable, as well as optional and implementation-specific network
variables, follow these steps:
1. Double-click the network variable or right-click the network variable and select Properties from
the shortcut menu.
138
Defining Device Interfaces and Creating their Neuron C Framework