beautypg.com

Using changeable type network variables – Echelon NodeBuilder FX User Manual

Page 186

background image

172

Defining Device Interfaces and Creating their Neuron C Framework

3. The current initial value for the float or 32 data type is displayed in the Initializer box. You can

edit the values of a field by either selecting the field and clicking Value in the Structure Fields
box or directly editing the value in the Initializer box

4. Click OK to save the changes. The value specified in the Initializer box will be transferred to the

Initializer property of the respective network variable or configuration property dialog.

Using Changeable-Type Network Variables

You can use changeable-type network variables to implement generic functional blocks that work with
different types of inputs and outputs. For example, you can create a general-purpose device that can be
used with a variety of sensors or actuators, and then create a functional block that allows the integrator
to select the network variable type depending on the physical sensor or actuator attached to the device.
Another example is a scheduler that can control a variety of device types by allowing the integrator to
change the type of the output of the scheduler. The Code Wizard generates code that contains a
framework for supporting changeable network variable types.

The method used by the Neuron firmware to change the size of a network variable uses an NV length
override system image extension
that is managed by the application. Whenever the firmware needs the
length of a network variable, it calls the NV length override system image extension to get it. This
method provides reliable updates to network variable sizes.

For more information on how to implement a changeable-type network variable in your device
application, see Implementing Changeable-Type Network Variables in Chapter 7. For more
information about changeable-type network variables and the NV length override system image
extension, as well as a commented source code example that illustrates all aspects of creating an
application that uses changeable-type network variables, see the Neuron C Programmer’s Guide.