beautypg.com

Examples – Echelon FTXL User Manual

Page 140

background image

128

Neuron C Syntax for the Model File

implementation_specific keyword, followed by a unique index number, and a

unique name. Each network variable in a functional profile assigns an index
number and a member name to each abstract network variable member of

the profile, and the implementation-specific member cannot use any of the

index numbers or member names that the profile has already used.

Examples

Example 1: The following example declares a functional block with a single

network variable.

network output SNVT_amp nvoAmpere;

fblock SFPTopenLoopSensor {

nvoAmpere implements nvoValue;

} fbAmpereMeter;

Example 2: The following example implements the nvoValue mandatory network

variable of the SFPTopenLoopSensor functional profile, and adds an
implementation-specific SNVT_time_stamp network variable with a member

name of nvoInstall.
If you include the compiler directive #pragma enable_sd_nv_names, the name of
the network variable, nvoInstallDate, is exposed to the network integrator by

means of network variable self-documentation (SD) data and device interface

files. In a network management tool, the name nvoInstall appears as the
member of the functional block, wherever the network tool uses the profile

definition.

network output SNVT_amp nvoAmpere;

network output polled SNVT_time_stamp nvoInstallDate;

fblock SFPTopenLoopSensor {

nvoAmpere implements nvoValue;

nvoInstallDate implementation_specific(128)

nvoInstall;

} fbAmpereMeter;


Example 3: The following example declares a functional block array, and defines
an external name for the functional block.

#define NUM_AMMETERS 4

network output SNVT_amp nvoAmpere[NUM_AMMETERS];

fblock SFPTopenLoopSensor {

nvoAmpere[0] implements nvoValue;

} fbAmpereMeter[NUM_AMMETERS] external_name("AmpereMeter");