Echelon FTXL User Manual

Page 43

Advertising
background image

FTXL User’s Guide

31

• Only a network management tool, such as the LonMaker Integration tool,

can change the type of a changeable-type network variable. The FTXL

device does not initiate type changes.

To create a changeable-type network variable for an FTXL application, perform
the following tasks:

1. Declare the network variable with the changeable_type keyword. You

must declare an initial type for the network variable, and the size of the
initial type must be equal to the largest network variable size that your

application supports. The initial type must be one of the interoperable

standard or user network variable types.

2. Select Has changeable interface in the L

ON

M

ARK

Standard Program ID

Calculator (included with the LonTalk Interface Developer utility) to set

the changeable-interface bit in the program ID when you create the
device template.

3. Declare a SCPTnvType configuration property that applies to the

changeable-type network variable. This configuration property is used by

network management tools to notify your application of changes to the

network variable type.

4. You can optionally also declare a SCPTmaxNVLength configuration

property that applies to the changeable-type network variable. This

configuration property informs network management tools of the
maximum type length supported by the changeable-type network

variable. This value is a constant, so declare this configuration property

with the const modifier.

5. Implement code in your FTXL application to process changes to the

SCPTnvType value. This code can accept or reject a type change. Ensure

that your application can process all possible types that the changeable-
type network variable might use at runtime.

6. Implement code to provide information about the current length of the

network variable.

The LonMaker browser provides integrators with a user interface to change

network variable types. However, you might want to provide a custom interface
for integrators to change network variable types on your device. For example,

the custom interface could restrict the available types to those types supported by

your application, thus preventing configuration errors.

The LonMaker Integration tool, Turbo Edition, supports changeable-type

network variables. However, if you use LonMaker 3.0 or earlier to manage an

FTXL device with changeable-type network variables, you must explicitly set the
CP value in the LonMaker browser (or in a device plug-in) to inform the FTXL

device of the type changes in addition to using the “Change Network Variable

Type” facility that is provided with LonMaker 3.0 or earlier to change the type of
a network variable in the LNS database.
See

Handling Changes to Changeable-Type Network Variables

on page 88 for

information about how your application should handle changes to changeable-

type network variables.

Advertising