Echelon LonTal Stack User Manual

Page 92

Advertising
background image

80

Creating a Model File

nvoNodeStatus

implements

nvoStatus;

nvoFileDirectory

implements

nvoFileDirectory;

} NodeObject external_name("NodeObject") fb_properties {
cpLocation
};

// Config properties for the Meter
SCPTminSendTime cp_family cpMinSendTime;
SCPTmaxSendTime cp_family cpMaxSendTime;
UCPTcoupling cp_family cpCoupling;

// Network variables for the meter
network input SNVT_amp

nviAmpere[3];

network input SNVT_volt

nviVoltage[3];

network input SNVT_angle

nviCosPhi[3];

network output SNVT_power

nvoWattage[3] nv_properties {

cpMinSendTime,
cpMaxSendTime
};

network output polled eeprom SNVT_elapsed_tm nvoUsage[3];

fblock UFPTenergyMeter {

nvoWattage[0] implements nvoWattage;

nviAmpere[0] implements nviAmpere;

nviVoltage[0] implements nviVoltage;

nviCosPhi[0] implements nviCosPhi;

nvoUsage[0]

implements

nvoUsage;

} Meter[3] external_name("Meter") fb_properties {
static

cpCoupling

};

The addition of the SNVT_address typed network variable nvoFileDirectory is

important for enabling the direct memory files feature for access to the
configuration property files. The LonTalk Interface Developer initializes this

network variable’s value correctly, and creates all required structures and code

for direct memory file access; see Using Direct Memory Files for more

information.
Alternatively, you can use the L

ON

W

ORKS

File Transfer Protocol (FTP) to access

the file directory and the files in the directory. In this case, you need to

implement the network variables and message tags as needed for the

implementation of a L

ON

W

ORKS

FTP server in the model file, and provide

application code in your host to implement the protocol. See the File Transfer

engineering bulletin at www.echelon.com/docs for more information about the

L

ON

W

ORKS

file transfer protocol.

Advertising