Examples – Echelon FTXL User Manual
Page 142
![background image](/manuals/735717/142/background.png)
130
Neuron C Syntax for the Model File
has a range modification, then all members must have a range modification
specified. In this case, each range modification pair is delimited by the ASCII
vertical bar character '|'. To specify no range modification for a member of a
structure (that is, revert to the default for that member), encode the field as
'|'. Use the same encoding for structure members that cannot have their
ranges modified due to their data type. The '|' encoding is only allowed for
members of structures.
Whenever a member of a structure is not a fixed or floating-point number, its
range cannot be restricted. Instead, the default ranges must be used.
In the case of an array, the specified range modifications apply to all
elements of the array. For example, to specify a range modification for a 3-
member structure where the second member has the default ranges, and the
third member only has an upper limit modification, the range modification
string is encoded as: "n:m||:m;". Positive values for range modifications and
their exponents (if any) are implicit, while negative numbers and negative
exponents must be explicitly designated as such with a preceding negative
sign '-' character. Floating-point numbers use a decimal point '.' character for
the decimal point. Fixed-point numbers must be expressed as a signed 32-bit
integer. Floating-point numbers must be within the range of an IEEE 32-bit
floating-point number. To express an exponent, precede the exponent by an
'e' or an 'E' and then follow with an integer value.
A range modification string provided in the instantiation of a CP family
member overrides any range modification string provided in the declaration
of the CP family.
static | global
The elements of an fblock array all share the same set of configuration
properties as listed in the associated
fb-property-list
. Without special
keywords, each element of the fblock array obtains its own set of
configuration properties.
Special modifiers can be used to share individual properties among members
of the same fblock array (through use of the static keyword), or among all the
functional blocks on the device that have the particular property (through use
of the global keyword).
Like network variable properties, functional block properties can be shared
between two or more functional blocks. The use of the global keyword creates
a CP family member that is shared among two or more functional blocks.
(This global member is a
different
member than a global member that would
be shared among network variables, because no single configuration property
can apply to both network variables and functional blocks.)
The use of the static keyword creates a CP family member that is shared
among all the members of a functional block array, but not with any other
functional blocks outside the array. See the discussion of functional block
properties in the
Neuron C Programmer’s Guide
for more information on this
topic.
Examples
Example 1: The following example instantiates four heartbeat (SCPTminSndT)
and four throttle (SCPTmaxSndT) CP family members (one pair for each member