Interpreting and Generating LonWorks XIF Files

Reference guide to LonWorks XIF (device interface) files covering the LonMark v4.400 file format, line-by-line interpretation, generation tools, format versions, and the .xif, .xfb, and .xfo file family.

What A XIF File Is

A XIF file is the device interface file for a LonWorks device. LonMark formally calls it a device interface file (DIF), but the .xif extension and the “XIF” name are universal in field work. The file declares the network-visible interface of one or more LonWorks devices: the network variables they expose, the message tags, the configuration files, the buffer counts, the Neuron chip parameters, the channel and transceiver settings, and self-documentation text.

A XIF does not describe the internal algorithms of the device. It describes only the inputs the algorithm consumes and the outputs it produces over the LonWorks network. That is what a gateway, network management tool, or commissioning database needs to map and bind the device correctly.

The authoritative specification is the LonMark Device Interface File Reference Guide. The current published revision is 4.402 (May 2009), available from LonMark International. This article follows that specification. See the Reference Documents section for full citations.

[!NOTE] For the protocol context — what network variables, bindings, SNVTs, and Program IDs do at the LonTalk level — see the LonWorks XIF Files topic page and the LonWorks SNVT Reference and XIF Mapping Guide.

The XIF, XFB, And XFO File Family

LonWorks tools may produce three related files for the same device interface.

ExtensionFormAuthored ByPurpose
.xifPlain textDevelopment or network management toolAuthoritative human-readable interface description
.xfbBinaryLNS (LonMaker, IzoT CT)Binary device interface file used by LNS for performance
.xfoOptimizedLNSFurther-optimized binary form created automatically by LNS

The text .xif is the canonical artifact. LNS converts it to .xfb for runtime use and to .xfo for cached lookup. Other network operating systems may produce their own binary forms. If only a binary file is present, the XIF32BIN utility (shipped with LNS) can convert it back to the text form for inspection.

File Structure

A XIF text file contains up to four sections, in this order. Only the header section is mandatory.

  1. Header section — required. Identifies the device, the Program ID, the buffer counts, the Neuron chip parameters, the channel and transceiver, and the self-documentation text.
  2. Network variable and message tag definitions — optional. One entry per static network variable and per message tag.
  3. File definitions — optional, added in format version 4.0. Used for configuration files that hold SCPT and UCPT property values.
  4. Network variable value definitions — optional, added in format version 4.0. Default values for configuration network variables.

The sections must appear in this order. Sections that have no content can be omitted entirely.

General Rules

These apply to every section:

  • A line whose first non-blank character is # is a comment. The entire line is ignored.
  • Multiple blank lines are allowed wherever a single blank line is required. Blank lines may appear between records and at the end of the file.
  • String fields contain an asterisk * when not applicable or when at their default value.
  • Integer fields contain 0 when not applicable. Some integer fields also use * to indicate a default value (added in format 3.0).
  • Maximum line length is 160 characters from format 4.0 onward.

Reading The Header

Here is a real header section, from an Echelon LonPoint AO-10 module XIF (the line numbers are for reference only and are not in the file):

1:  File: Ao10A.XIF generated by LONNCC32 Version 4.01.62, XIF Version 4.400
2:  Copyright (c) 1989 - 2003 Echelon Corp
3:  All Rights Reserved.  Run on Thu April 24 16:33:25 2002
4:
5:  90:00:01:05:19:8A:04:02
6:  2 15 0 21 0 3 3 3 3 4 11 11 9 9 0 0 9 14 1 1 128 21 0 0 0 0 0 0 0 0 2 15 0 0 0 0 0 0 2 1 0
7:  0 5 100 13 28 726 0 15 5 3 342 4 10000000
8:  1 7 1 0 4 4 4 15 200 0
9:  78125 0 0 0 0 0 0 0 0 0 0
10: 90 0 240 0 0 0 40 40 0 5 8 5 12 14 15
11: *
12: "x3.0@0,3[2]Analog Output,20006[2]PID Controller,20002[1]Digi
13: "tal Encoder,20005[2]Analog Fn Block,20010[2]Type Translator;
14: "Echelon LonPoint AO-10 Module version 2.x.  Supports two Anal
15: "og Outputs, two PID Controllers, one Digital Encoder, two An
16: "alog Function Blocks, and two NV Type Translators.
17:

Lines 1–4: Identity Block

LineContents
1File: <fileName> generated by <toolName>, XIF Version <majorNumber>.<minorNumber>
2Copyright information
3Optional additional copyright plus required timestamp: <info> Run on <day> <month> <date> <hour>:<min>:<sec> <year>
4Blank

If the file was created manually, <toolName> is Manual 0.0.0. The current format version is 4.400.

Line 5: Program ID

Eight 2-digit hex values separated by colons, no spaces. The first hex digit determines the format:

  • First digit 7 or less: an ASCII program-name string in hex.
  • First digit 8 or 9: structured ID with the layout FM:MM:MM:CC:CC:UU:TT:NN:
FieldMeaning
FMFormat and category
MM:MMManufacturer ID (assigned by LonMark)
CC:CCDevice class
UUDevice subclass
TTChannel category
NNModel number

The Program ID drives binding compatibility and device-replacement workflows. Two devices with the same Program ID present the same interface; two with different Program IDs are different interfaces even when they look identical otherwise. The full structured Program ID format is documented in the LonMark Application-Layer Interoperability Guidelines.

Line 6: Header Capabilities (42 Fields)

Line 6 is the largest line in the header. The spec defines 42 fields, although most projects only need a handful. Key fields:

FieldFormat VersionPurpose
1AllNumber of non-ECS domains. Must be 2.
2AllNumber of non-ECS address table entries (0–15).
3AllBoolean: 1 if the application handles incoming application messages.
4AllNumber of static network variable declarations (0–4096 host, 0–62 Neuron-hosted).
5AllNumber of non-ECS message tags (0–15).
6AllNumber of network input buffers (encoded — see table below).
7AllNumber of network output buffers (encoded).
8AllNumber of priority network output buffers (encoded).
9AllNumber of priority application output buffers (encoded).
10AllNumber of application output buffers (encoded).
11AllNumber of application input buffers (encoded).
12–15AllBuffer sizes (encoded — see table below).
162.0Application type (Unknown, MIP, Neuron-hosted, host-application, etc.).
172.0Network variable configuration table size for MIP applications.
182.0Number of receive transaction buffers.
193.1Number of network variable alias table entries.
203.1Relaxed binding constraints flag.
213.1Statistics-relative address references allowed. Set to 1.
223.1Maximum size memory block writable at a time.
233.2 / 4.1Maximum number of network variables (static + dynamic).
24–274.2ECS protocol version range, binding constraint level, ECS flags.
28–324.2Reserved. Set to 0.
334.2Number of domains (ECS).
344.2Number of address table entries (ECS).
354.2Number of message tags (ECS).
40–414.3Network management version and capabilities.
424.4Reserved. Set to 0.

The buffer count encoding is non-obvious:

Buffer CountEncoded Value
00
12
23
34
55
76
117
158
239
3110
4711
6312
9513
12714
19115

Buffer sizes use a similar table mapping 20, 21, 22, 24, 26, 30, 34, 42, 50, 66, 82, 114, 146, 210, 255 bytes to encoded values 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0 respectively.

Lines 7–10: Neuron, Channel, And Transceiver Parameters

Four lines describe the device hardware in detail.

LinePurpose
7Neuron processor configuration: chip model, clock rate, firmware version, transaction block size, RAM and EEPROM sizes, table sizes, and (since 4.4) base clock rate factor. Set fields 1–12 to 0 for host-based devices where the network image is not downloadable.
8Channel parameters: transceiver type ID (from StdXcvr.xml at lonmark.org), interface type, interface rate, priority slots, minimum clock rate, average packet size, oscillator accuracy and wakeup time.
9Transceiver parameters: channel bit rate and special-purpose-mode settings.
10Channel timing: receive start and end delays, indeterminate time, interpacket time, preamble length, turnaround time, packet qualification time.

The protocol-processor model field on line 7 identifies the silicon:

ValueModel
0Neuron 3150 Chip or FT 3150 Smart Transceiver
1PL 3150 Smart Transceiver
8Neuron 3120 Chip
9–13Neuron 3120E1 through E5 variants
14Neuron CY3120E4 Chip or FT 3120 Smart Transceiver
15PL 3120 Smart Transceiver

Line 11: End-Of-Transceiver Marker

A single asterisk marks the end of the transceiver section.

Lines 12–N: Self-Documentation String

One or more lines of device self-documentation. Each line begins with a double quote ", ends with a newline (no closing quote), and may be up to 60 characters. Non-printable characters use \xHH hex escapes with uppercase A–F. Multiple lines concatenate into a single string with no separators.

If the device has no self-documentation, line 12 is a single asterisk.

If the device’s static interface contains functional blocks (LonMark profile blocks), the self-documentation string is formatted per the LonMark Interoperability Guidelines and encodes the functional blocks, member NVs, and configuration property assignments.

Reading A Network Variable Definition

After the header, each declared network variable produces one record. Example:

1: VAR nvo01Value 2 0 0 0
2: 0 1 63 1 0 1 0 1 0 1 0 0 0
3: "@1|2
4: 95 *  2
5: 1 0 0 0 0
6: 1 0 0 1 0

Line 1: Identity And Rate

VAR <name> <index> <avgRate> <maxRate> <arraySize>

FieldRangeMeaning
nameup to 16 charsNV name (e.g. nvoSpaceTemp)
index0–4095NV index number on the network
avgRate0–250Encoded average rate; rate = 2^((n/8)−5) updates per second, or 0 if unspecified
maxRate0–250Encoded maximum rate, same formula
arraySize0 or 1–N0 if not an array; otherwise the number of elements

Line 2: Behavior Flags (13 Fields)

FieldMeaning
1Offline-update flag: 1 if the variable must be updated only when offline
2Must be set to 1
3Must be set to 63
4Direction: 0 = input (NVI), 1 = output (NVO)
5Default service type: 0 = acknowledged, 1 = repeated, 2 = unacknowledged
6Service type changeable in field: 1 = yes, 0 = no
7Authentication default: 1 = authenticated, 0 = not
8Authentication changeable in field: 1 = yes, 0 = no
9Priority default: 1 = priority, 0 = no
10Priority changeable in field: 1 = yes, 0 = no
11Polled attribute: depends on direction
12Synchronized attribute: 1 if updates are transmitted in order
13Configuration attribute: 1 if this is a configuration-class NV

Lines 3–N: Self-Documentation

Same format as the device-level self-documentation: double-quote-prefixed lines, \xHH hex escapes, up to 60 characters each. If the NV is part of a LonMark functional block, the format follows the LonMark Interoperability Guidelines for member-NV encoding.

A single * line means no self-documentation.

Line N+1: SNVT Index And Element Count

<snvtIndex> * <elementCount>

FieldMeaning
snvtIndex1–255 = a standard SNVT (see the SNVT and SCPT Master List). 0 = user-defined type.
elementCountNumber of elements in a structure or union. 1 if scalar.

Lines N+2 To M: Per-Element Type Information

One line per element (scalar NVs have one line; structures and unions have one line per field):

<type> <offset> <size> <signedFlag> <arraySize>

FieldValues
type0 = Character, 1 = 8-bit Integer, 2 = 16-bit Integer, 3 = Bitfield, 4 = Union, 5 = Typeless
offsetBitfield offset 0–7, or 0 if not a bitfield
sizeBitfield size 1–7 or union size 1–31 bytes, else 0
signedFlag1 if signed, 0 if unsigned or not applicable
arraySizeArray size 1–31 if the element is an array, else 0

Reading A Message Tag

Message tags follow the same general shape as NVs but use the TAG keyword:

1: TAG user_tag 0 69 76 0
2: 0 1 63 1 0 1 0 1 0 1 0 0 0

Line 1 fields: <name> <index> <avgRate> <maxRate> 0. Index range 0–14.

Line 2 follows the NV behavior-flag layout, with field 1 holding the bindFlag (1 if the tag is bindable, 0 if not — generally 1).

Reading File Definitions

Added in format 4.0 to declare configuration files used for SCPT and UCPT property values. There can be zero or one template file plus zero, one, or two value files.

FILE configTemplate 0 2
"This is the template file content

Line 1: FILE <name> <index> <type> [<length>]

FieldValues
index0 for the template file, 1 or 2 for value files
type2 for template, 1 for value file
lengthOptional; auto-computed from contents if omitted

Subsequent lines are file contents in one of two encodings:

  • Character format — line starts with a double quote. Same \xHH rules as self-documentation.
  • Binary format — line is interpreted as hex bytes. 0x07, 0x89, 0xAB, 0xCD is equivalent to 0x0789abcd, 0789abcd, 7,89,ab,cd, or \x07\x89\xab\xcd.

Reading Network Variable Value Definitions

Added in 4.0 to carry default values for configuration network variables.

NVVAL
# config network input long configNv1 = {5000};
0x13, 0x88
# config network input int configNv2 = {100};
0x64
# config network input long configNv3 = {2252};
0x08, 0xCC

NVVAL is the section keyword. Each subsequent non-comment line gives the default value bytes for one configuration NV, in the order the configuration NVs were declared in the variable definition section. Hex bytes follow the same notation as binary file definitions.

How XIF Files Are Generated

A XIF can come from four places. The right source depends on what you have access to.

From A Development Tool (Compile-Time)

When a device firmware engineer compiles Neuron C source, the compiler emits a XIF that matches the application’s network variable declarations and configuration. This is the highest-fidelity XIF because it includes everything the compiler knows about the interface, including the self-documentation strings.

ToolNotes
NodeBuilder FXEchelon’s last NodeBuilder release; emits format 4.x XIFs
LonBuilderLegacy Echelon tool; emits older formats
Mini EVK / FXEvaluation kits used for small devices; same XIF output
IzoT NodeBuilderRenesas successor for current LonWorks development

This is the file the manufacturer ships with the device. Request it directly when starting a project, before any field work.

From A Network Management Tool (Export From Database)

LonMaker, IzoT CT, OpenLNS, and other LNS-based tools store the device interface inside the network database. They can export a XIF for any commissioned device. This is the right path when the original manufacturer XIF is lost but the network database is intact.

ToolNotes
LonMaker (legacy)LNS 3.x-based; still found on commissioning laptops
IzoT CTCurrent Renesas tool; recommended for new work
OpenLNS ServerLNS API; XIFs can be exported programmatically

Live Extraction From The Device

The Neuron chip stores enough of its own interface to allow live extraction over the LonWorks network. Echelon’s NodeUtil reads this self-documentation block and reconstructs a XIF. The reconstructed file lacks the original developer’s comments and some manufacturer metadata, but it is enough to map and bind the device.

ToolNotes
NodeUtilEchelon CLI; ships in the OpenLDV release. Connects through a U10/U20 USB interface or PCLTA card.
Chipkin QuickServer NodeUtil modeThe QuickServer can extract XIFs from connected devices on its own LonWorks port

For the step-by-step extraction procedure, see Using NodeUtil to Discover LonWorks Devices and Extract XIF Files.

Manual Authoring

A XIF can be written by hand in a text editor. Line 1 must declare Manual 0.0.0 as the tool name. This is rare in practice — buffer-encoding tables, transceiver parameters, and the 42-field header line are easy to get wrong. Manual XIFs are most useful for stubbing a fictional device during driver development, not for production.

Tools For Reading And Generating XIF Files

ToolReadsGenerates / ExportsNotes
NodeBuilder FX / IzoT NodeBuilderYesYes (from Neuron C compile)Authoritative source for new devices
LonMaker (legacy LNS)YesYes (export from database)Most installed-base tool in retrofit work
IzoT CTYesYes (export from database)Current Renesas successor to LonMaker
OpenLNS ServerYes (API)Yes (API export)Programmatic access to the LNS database
NodeUtilYesYes (live extract)Echelon CLI; works on Neuron-hosted devices
XIF32BINConverts text↔binaryYesLNS utility for .xfb and .xif interconversion
Chipkin QuickServer NodeUtil modeYesYes (live extract)Gateway can extract during commissioning
LonScanner Protocol AnalyzerYes (consumes for decode)NoUses XIF to label captured traffic

[!TIP] If a XIF file refuses to import, check line 1’s XIF Version field against the importing tool’s documented format support before re-extracting. Versions 3.x and 4.x are not always interchangeable on older tools.

Format Versions

The format has evolved since 1990. Important versions:

VersionNotable Additions
1.0First version
2.0Network variable arrays in a single record; expanded transaction and size parameters
3.0Comment indicator (#); string default *, integer default 0
3.1Neuron Chip firmware version 6 support; revised binding constraints
3.2NV count includes dynamic NVs
4.0Backward-compatibility rules; 160-character line limit; File and NVVAL sections added
4.1Backward-compatible repackaging of 3.2
4.2Extended command set (ECS) fields per ANSI/EIA/CEA-709.1B
4.3Neuron firmware version and capability fields
4.400Base clock rate factor field; minor format version widened to 3 digits
4.401Dynamic functional block support; clarified handling of duplicate programmatic NV names
4.402Increased network variable and alias limits; added LNS FX commissioning-credit field. Current published revision (May 2009).

From 4.0 onward, interpreters must accept unknown records gracefully: discard any unrecognized record up to the next blank line, and accept up to 160 characters per line. A tool that claims to support version X.Y must also accept the known parts of any X.Z file where Z > Y.

Common Interpretation Pitfalls

PitfallSymptomAction
XIF format newer than tool supportTool refuses to import the fileRe-export from the device’s commissioning tool at a compatible version, or convert with XIF32BIN
XIF does not match installed firmwareMapped points read but never update; phantom points appearRe-extract live or request the correct firmware revision
NV name is nv1, nv2, etc. (no real names)Live-extracted XIF lost the manufacturer’s name stringsRequest the manufacturer XIF; live extraction preserves indexes and types but not always names
Self-documentation appears garbled\xHH escapes were not decodedUse a XIF-aware tool to render the documentation rather than reading raw
Expected configuration value missingValue is in the NVVAL section, not the variable definitionSearch for NVVAL and look for the matching declaration order
Two near-identical devices will not share a XIFProgram IDs differTreat as separate interfaces; do not share a XIF across Program IDs
Tool reports “binding constraint mismatch”Line 6 field 20 or 26 differs from another nodeCheck ECS vs non-ECS device class on both ends

Re-Extracting A XIF

Re-extract when:

  • The site can produce a device but cannot produce the matching file.
  • Firmware was updated since the XIF was issued.
  • Line 1 declares a tool version not supported by your import path.
  • A mapped point exhibits phantom or missing behavior consistent with a mismatched interface.

Re-extraction does not preserve developer comments or some manufacturer-supplied metadata. When both a manufacturer file and a live extract are available, the manufacturer file is the authoritative source unless firmware has changed.

From XIF To Gateway Point List

Converting a XIF into a usable point list is the last step before configuring a gateway.

  1. Filter the variable list to the variables the supervisory system actually needs.
  2. Record the NV index, name, direction, and SNVT for each kept variable.
  3. Decide the destination object type: BACnet AI/AV/BI/BO/MSI/MSV, Modbus register, MQTT topic.
  4. Capture unit conversion where the source SNVT unit differs from the destination expectation.
  5. Note any SCPT or UCPT values that must be read alongside the network variables.

For the full SNVT-to-BACnet mapping table and the metric-to-imperial conversion math, see the LonWorks SNVT Reference and XIF Mapping Guide.

Automate Steps 1–4 With The XIF Converter

The five steps above are mechanical once the XIF is in hand. The LonWorks XIF -> QuickServer Converter automates the first four: it parses the XIF, applies SNVT struct expansion (for example SNVT_switch to _Value + _State, SNVT_time_stamp to six date/time fields), assigns data-array offsets and BACnet Object IDs, and emits a ready-to-load FieldServer Bridge CSV for either BACnet/IP or Modbus/TCP. The tool runs entirely client-side in the browser — your XIF is not uploaded.

You still own step 5: review the configuration properties (SCPT/UCPT) section of the XIF separately, because runtime data exposed through properties rather than network variables needs different access paths.

To use the tool, you also need the device’s Neuron ID — the converter prompts for it on the page.

Reference Documents

  • LonMark Device Interface File Reference Guide, Revision 4.402 — the authoritative XIF text-format specification. May 2009, hosted by LonMark International. The file structure, header field layouts, network variable record format, buffer encoding tables, and format-version history in this article all derive from this specification. Previous revision 4.400 (Echelon document 078-0255-01A, June 2003) covers the same core format; revisions 4.401 and 4.402 added dynamic functional block support, raised network-variable and alias limits, and added the LNS FX commissioning-credit field.
  • LonMark Application-Layer Interoperability Guidelines — defines the structured Program ID layout (FM:MM:MM:CC:CC:UU:TT:NN) and the functional-block self-documentation format used inside XIF self-doc strings.
  • SNVT and SCPT Master List — the standard network variable type and standard configuration property type catalog. Required for interpreting the snvtIndex field on each NV record.
  • StdXcvr.xml — the standard transceiver type ID file referenced by line 8 field 2 of the XIF header.
  • Neuron C Programmer’s Guide — Echelon’s developer reference for the source code that compiles into the XIF declarations.
  • ISO/IEC 14908 — the standards-level definition of the LonTalk protocol family that the XIF describes.
  • NodeUtil User’s Guide — Echelon’s reference for the live XIF extraction tool.