Crash Course on Configuring the Babel Buster X2
XIF to CSV conversion
An alternative to manipulating NV to register mapping via the web interface is to convert the XIF to a CSV file, then use your standard spread sheet software to manipulate the spread sheet. Once you have done all of the necessary editing of the CSV file, you can upload that to the X2 in place of an XIF file.
To begin with, you need to obtain a copy of the XIF file for the LonWorks device you are going to integrate. If you do not have a copy, you can export it from the device itself using the Nodeutil.exe tool available for free download at www.echelon.com.
The first step is to convert the XIF file to a CSV file. The purpose of this intermediate step is to allow you to review the mapping in "bulk" form using Excel or equivalent spread sheet program.
Open a command prompt (start->Programs->Accessories->Command Prompt) and type in this command:
where "mynode.xif" is the XIF file for your LonWorks device. If the XIF file is not in the same directory as the program, you will need to provide the full path. The program will create a new file named <file>.csv where <file> is the name of the original file excluding suffix. In the above example, we would get mynode.csv. (click here to download zip containing xif2csvX2.exe)
At this point, you should open the csv file and make any changes you want. The file will look like the example below if the XIF for WattNode Plus is processed. Editing this CSV file can be an in-depth exercise, and is described here.
CSV File Editing
Do you need to do any editing?
Note the Y or N under the Enable column. If "Y", this object will be included. If "N", this object will be excluded. Certain things found in a LonWorks device are not suitable for mapping to a BACnet object, such as nvoFileDirectory commonly found in most devices (it is a pointer to LonWorks configuration properties, and these are not accessible from BACnet.)
If you do not need the network variable listed, replace Y with N. If you believe you want a variable that defaulted to N, determine whether you can appropriately interpret that value as a BACnet object before changing it to Y. DO NOT change NVindex or Direction. A mismatch here will cause unpredictable results, including failure to communicate.
All scalar network variable types will have their conversion recognized automatically by Babel Buster X2. The term "scalar" means it is a single data element, such as integer, floating point, enumeration, etc. Some network variables are structures, meaning a single "network variable" contains several data elements. These structures are mapped to multiple Modbus registers and require explicit interpretation using the fields in the 7 columns following the SNVTindex (which is set to 0 for a structure). More detail about this follows below.
The NV name is taken from the XIF file, and this will be shown as the register name in the Babel Buster X2. You may change this to any name that is meaningful to you, and it may be up to 40 characters in length.

Line 1: Program ID for this device. There can be only one SPID in the CSV file and it must be on line 1. If you intend to map multiple devices in a single gateway, create one CSV per device.
Line 2: Comment line with labels, skipped (line 2 skipped regardless of content).
Lines 3-N: One or more lines per network variable mapping the variables to BACnet objects. Each line represents one BACnet object whose type is shown in the first column.
Column 1 (NV index): This is the network variable index as defined by LonWorks protocol, and will be found in the XIF file or manufacturer's documentation. You will have no need to edit this column unless creating a device manually.
Column 2 (Direction): The direction here refers to direction as defined at the remote LonWorks node. NVO is network variable output, meaning we can read this data. NVI is network variable input, meaning we can write this data. Direction will be found in the XIF file and MUST NOT be changed. Communication failure will result if direction is incorrect.
Column 3 (SNVT index): This is the Standard Network Variable Type as published in LonWorks standards. Manufacturer defined network variables will translate to SNVT index zero and must be interpreted as raw data. If a Manufacturer defined NV type is really a renamed standard type, you can enter the standard type code here. (Note: You can download a pdf file containing a complete definition of all network variable types at www.lonmark.org. You WILL need this document to do anything more than the default mapping created for you by xif2csvX2.exe. Due to copyright restrictions, we cannot provide it for you.)
Column 4 (Raw type): When parsing a structured variable into multiple Modbus registers, this field specifies the raw data type found in the respective field of the structure. These are the enumerated NVT_CAT types (found in the enumeration section of the pdf document mentioned above).
Column 5 (Offset): Structured variables are multiple bytes in length. This column provides the byte offset from the first byte of the structure where this field or object is found.
Column 6 (Bit offset): Some structured variables treat individual bits as data elements, and often there is a set of multiple bits in such a structure. The Offset column is used to access the correct byte. The Bit offset is used to specify which bit this object refers to. Bit offsets are 0..7 bit positions from the left (MSB of byte). To reiterate, a bit offset of 0 will result in a byte mask of 0x80. Keep in mind that LonWorks SNVT bit structure definitions identify "bit 1" as the left most bit.
Columns 7, 8, 9 (Scale): These are the scale factors A, B, and C whose usage is as defined for standard network variable types (see note about pdf file available above).
Column 10 (Group): This column flags the respective line as being a member of a "group" or structured network variable. When the group flag is set, the gateway sees that it needs to process multiple maps to arrive at a complete network variable for transmission on the LonWorks network. This is especially important when writing a network variable to a LonWorks device - all fields must be transmitted together.
Column 11 (Lock): This flag is only used in conjunction with the Group flag. When multiple Modbus registers are mapped to a single network variable that will be written to the LonWorks device, you have the option of that variable being updated when any member of the structure is written from Modbus (default). You also have the option of causing the entire structure to be updated ONLY when a certain member of the structure is updated. Set the Lock field to 1 to indicate which member of a group is the Lock field. The structure will only be written when this single Lock field is updated. This allows all Modbus registers to be updated before the Lock object to result in a completely synchronous update. Do not set more than one Lock field per group as this will defeat the purpose.
Column 12 (NV name): Originally taken from the XIF file, this can be edited to your liking, and shows up as the Modbus register name stored in the gateway.