LonWorks to BACnet Conversion: Beyond NV Values with FILE TEMPLATE 0.2

Project Overview:
LonWorks 'FILE template 0 2.

In LonWorks to BACnet conversion, customers' interest typically revolves around NV (Network Variable) values. However, some customers have additional unique requirements, In this Case Study, we are going to showcase the need for 'FILE template 0 2' data integration. Unlike the usual focus on NV values, this specific application seeks comprehensive data conversion, including the detailed information contained in the 'FILE template 0 2.'

This Case Study sheds light on the broader scope of LonWorks to BACnet data conversion beyond standard NV values. It aims to incorporate LonWorks 'FILE template 0 2' data into larger systems, enhancing interoperability and functionality.

LonWorks Quickserver Gateway To BACnet

Whether it's incorporating LonWorks configurations into centralized building management systems or integrating LonWorks data into other protocols, this overview delves into the intricacies of merging LonWorks 'FILE template 0 2' data seamlessly.

Solution approach: Configuration Steps Using XIF File for FieldServer Data Retrieval

This instance demonstrates the utilization of the XIF file for configuring a FieldServer QuickServer to retrieve file data. Specifically, the instance is derived from vvf03u.xif. (File: vvf03u.xif generated by SPP Revision 0.10, XIF Version 4.0)

  1. XIF File Overview:
    • Begin with an XIF file, in this case, vvf03u.xif, generated by SPP Revision 0.10, XIF Version 4.0.
    • Understand that an XIF file may contain a 'file template' section.
  2. SNVT Address Extraction:
    • Explore the LonWorks XIF file, which may contain an SNVT for a file address.
    • Read the identified SNVT, which reports the address of the file header.
  3. File Header Analysis:
    • Proceed to read the file header based on the obtained address.
    • At offset 10 in this chunk of 16 bytes of the file header, we find 2 bytes that when joined form a 16-bit number.
    • Combine these 2 bytes into a 16-bit number, representing the device's memory location where the file data is stored.
  4. Memory Location Identification:
    • Understand the significance of the derived 16-bit number, as it points to the exact location in the device's memory housing the file data.
  5. Data Structure Understanding:
    • Now we must understand how the data in the file data is structured. To do this we need to know how many variables there are and the byte offset in the file data where we will read those variables.
    • The File section of the XIF contains this information on the number of variables and their offsets.
  6. Variable Retrieval:
    • Utilize the information from the 'File' section to determine the number of variables and their respective byte offsets.
    • Understand that an XIF file may contain a 'file template' section.
    • Read these variables from the identified byte offsets within the file data.
  7. Configuration Validation:
    • Verify the successful configuration of the FieldServer to read file data by ensuring accurate retrieval of variables based on the XIF file information.
  8. Iterative Optimization:
    • Iterate through the configuration process, adjusting as necessary to optimize data retrieval and accommodate any specific requirements posed by the XIF file.

Through this systematic process, the FieldServer is configured to effectively read file data from the LonWorks XIF file.

The understanding of SNVT, file headers, memory locations, and variable structures is pivotal in ensuring accurate and meaningful data retrieval for enhanced device functionality. Below is a series of screen captures to help your through this process:

This first screenshot shows the NV Network Variables Section of XIF

NV Network Viariables Section of XIF

Please note that only X80 data can be extracted with this solution.

This is how you work out the number of variables and the byte offset of each one.

Picture that shows how to workout the variables and Byte offsets Read 2 bytes from Offset 9 Image Read 2 bytes from Offset 9 Image02 Join 2 bytes to make a 16 bit number


Sample configuration can be found here:

//================================================================================
// 
//    Common Information
// 
Bridge
Title             System_Node_Id 
Lonworks - BACnet IP 97
//================================================================================
// 
//    Data Arrays
// 
Data_Arrays
Data_Array_Name   Data_Format   Data_Array_Length
DA_F3_21          Float        300
DA_F3_21_CFG      UINT32       300
Data_Arrays
Data_Array_Name   Data_Format   Data_Array_Length
File_Address      Uint16       1

Contact Us

Contact us via phone (+1 866-383-1657) or leave a detailed message below for sales, support, or any other needs

*Required Field
*Required Field
I'd like to receive the newsletter. *Check email for confirmation.
*Required Field
8:00am - 12:00pm 12:00pm - 5:00pm