Declaring a functional block, Defining a network variable – Echelon LonTal Stack User Manual

Page 68

Advertising
background image

56

Creating a Model File

Declaring a Functional Block

A functional block declaration, by itself, does not cause the LonTalk Interface

Developer utility to generate any executable code, although it does create data
that implements various aspects of the functional block. Principally, the

functional block creates associations among network variables and configuration

properties. The LonTalk Interface Developer utility uses these associations to
create the self-documentation (SD) and self-identification (SI) data in the device

and in its associated device interface file (.xif or .xfb extension).
The functional block information in the device interface file, or the SD and SI
data, communicates the presence and names of the functional blocks contained in

the device to a network management tool.

Network-variable or configuration members of a functional block also have

self-documentation data, which is also automatically generated by the LonTalk

Interface Developer utility. This self-documentation data provides details about
the particular network variable or configuration property, including whether the

network variable or configuration property is a member of a functional block.
Functional blocks can be implemented as single blocks or as arrays of functional
blocks. In a functional block array, each member of the array implements the

same functional profile, but has different network variables and typically has

different configuration properties that implement its network variable and
configuration property members.
Example: The following example shows a simple array of 10 functional blocks.

network output SNVT_amp nvoAmpere[10];

fblock SFPTopenLoopSensor {

nvoAmpere[0] implements nvoValue;

} fbAmpMeter[10];

This functional block array:

• Contains ten functional blocks, fbAmpMeter[0] to fbAmpMeter[9], each

implementing the SFPTopenLoopSensor profile.

• Distributes the ten nvoAmpere network variables among the ten

functional blocks, starting with the first network variable (at network
variable array index zero). Each member of the network variable array

applies to a different network variable member of the functional block
array.

Defining a Network Variable

Every network variable has a type, called a network variable type, that defines

the units, scaling, and structure of the data contained within the network
variable. To connect a network variable to another network variable, both must

have the same type. This type matching prevents common installation errors

from occurring, such as connecting a pressure output to a temperature input.

Type translators are also available to convert network variables of one type to

another type. Some type translators can perform sophisticated transformations

between dissimilar network variable types. Type translators are special
functional blocks that require additional resources, for example, a dedicated

type-translating device in your network.

Advertising