LonWorks to BACnet Conversion: Beyond NV Values with FILE TEMPLATE 0.2
Click here to view the Case Study. Please CONTACT US if you have any questions
Click here to Download the LonWorks to BACnet Sample CSV Config file.
Click here to Download the LonWorks to BACnet sample XIF file.
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.
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)
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- Verify the successful configuration of the FieldServer to read file data by ensuring accurate retrieval of variables based on the XIF file information.
- 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
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.
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 |