Page tree
Skip to end of metadata
Go to start of metadata

The IzoT Resource File Editor generates binary files that define data types used by configuration property types, that are collected into user functional profiles to define interfaces for units of functionality in a system.  LonWorks device development should begin with careful review of the Standard Functional Profiles that exit already.  If the interface is defined and the set of mandatory and optional network variables and configuration properties express the interface required for your device, use the profile to define your interface.  In this section we show the steps needed to prepare resource files to easily generate interface definitions (XIF files) for internal devices, and to create a format for the resources to be used by the SmartServer IoT.  This section builds on the resource file set that you created, myApolloDev, on the Editing Resources page.

Device Resource Set

There are a number of tools available to companies creating devices that use LonWorks: 

  • The NodeBuilder FX Development Tool is used to create devices that use LonWorks implemented to run on a 31x0, 5000, or 6000 family Smart Transceiver.

  • IzoT FT 6000 EVK is used to compile Neuron C 2.2 applications to quickly develop distributed control applications.

  • IzoT ShortStack FT is used to implement LonWorks on more capable 16 or 32 bit micro-controllers connected to the FT-10 channel using a 31x0, 5000, or 6000 family Smart Transceiver to implement the lower layers of the LonWorks stack.

  • IzoT SDK 2 is used to create devices connected to the LonWorks IP channel, and runs on popular Linux targets using Python as the programming language.  It is also used to run LonWorks on more powerful 16 or 32 bit micro-controllers. 

There are many choices available when designing a device to communicate with LonWorks, but common to all devices is an XIF file to define the Interface, and one or more resource files originating from the IzoT Resource Editor.  On the pages Selecting a Profile and Editing Resources, we reviewed concepts and the mechanics of Device Resource file management.  It is the resource files that provide the rich definition for the network variable inputs/outputs, configuration properties, and functional profiles.  

Preparing Resource Files for SmartServer IoT

The SmartServer IoT does not support the native binary file format for files generated by the IzoT Resource Editor.  The IzoT Resource Editor does provide a report generation facility to create XML coded files that are handled by the SmartServer IoT.  The files behind http://types.lonmark.org/index.html are actually generate based on the following instructions.  These instructions assume you have completed the exercises in the pages: Selecting a Profile and Editing Resources.

  1. Launch the IzoT Resource Editor.

  2. Navigate to the myAppolloDev resource fileset, right-click this node in the tree and select Report... 
        
  3. Select a location for the report, and select XML format as shown below.
  4. Click Next and Next again without selecting options and your will see the following verbose result.
  5. Click Finish, and in the File Explorer, navigate to the location you specified for this report.  You will see two folders that contain the XML versions for the Standard types, and the myApolloDev type that has been created by following the instructions of previous exercises.
  6. Take note how the Program ID 9f88010600000000-4 from the resource file set you created from the ApolloDev resources you copied and modified.  If you open the folder for the myApolloDev resources, you will see the following files, which are always to travel as a matched set when used on the SmartServer IoT.

    The above highlighted files are ready to import to the SmartServer IoT using the CMS Device Types widget.  It is typical to have several sets of resources that end up with the same common file names (cps, enums, fps, nvs).  The files are often contained in a Device Type Package (dtd or zip file extension) for easy reuse with a single import operation from the CMS.  

IzoT Interface Interpreter

The IzoT Inerface Interperter (III.exe) provides a convenient method of generating XIF files for internal LON devices for the SmartServer IoT.  LON device developers normally generate XIF files from Neurons C version 2.2 source files compiled by the NodeBuilder, or in the case of IzoT Shortstack SDK developers, the LonTalk Interface Developer tool.  In both cases, you need to understand the Neuron C 2.2 syntax to define an XIF file.  The rules and syntax for creating an interface can be a challenge to learn.  In the IzoT SKD 2, Dialog introduced the IzoT Markup Language (IML) to simplify interface definition.

Preparing Resource Files for iii.exe

Follow this procedure to generate files that may be used with by iii.exe to generate XIF files for internal devices.  To continue, you will need to download and install III.exe Windows Installer.


  1. Launch the IzoT Resource Editor.

  2. Select the resource fileset myApolloDev from the catalog, right-click to select Report...
  3. In the Report generator dialog, select a location for the generated report, and specify IzoT Target Platform as shown in the following screenshot.
  4. Review the results of the report to determine success.
  5. In Windows explorer, navigate to the folder you specified to the Report generator.  This folder represents the fileset needed by iii.exe.  You should copy the folder to a location on your computer where you will develop XIF files for your internal device development.  You can choose any name for this folder.  The report generator names the file based on the Program ID of the resources, but you can decide to name it something else. 

We are now ready to create the XIF file for a device that uses the UFPTsscVAV we created from a copy of the SFPTsccVAV functional profile.  We will use iii.exe to accomplish this using a small model file that follows C syntax, and uses the IML markup language to guide the iii.exe tool on what should exist in the XIF file.  The syntax is simple when compared to that used by a developer using Neuron C 2.2.  Here is an example:

VAV.c Model FIle
/*
 * Interface definition using IML to define the Internal Application Example interface.
 * This file is the input to the iii.exe application, to produce an XIF file. You need
 * to place the myApolloDev files produced by the report generator in the location that
 * matches the location tagged below in the last line.
 */
//@Izot option target("shortstack-classic")
//@Izot option server("SS430_FT6050_SYS20000kHz")
//@Izot option programId("90:00:01:06:00:03:04:85")

UFPTsccVAV (VAV) myVav; //@Izot block (location="./P9f88010600000000_4") external("VAV")

Description of VAV.c:

  • Lines 7-8 are copied without change in all cases.  

  • //@Izot  is the tag to indicate the beginning of IML markup. 

  • In the last line, you see the core definition of the interface as described by the a functional profile.  In this case, UFPTsccVAV is the name of the device in the resource fileset myApolloDev.

  • The (VAV) and identifier myVAV in the last line of the interface are not important in the XIF definition based on the functional profile.  

  • The block keyword informs iii.exe that this line declares a functional block, and the first word in this program line represents the name of the functional block profile.  If the type name has a SFPT prefix, it is assumed to be defined as a standard resource.  In our case, the name UFPTsccVAV was used when we created the copy of SFPTsccVAV that was extended to include the UNVT_hvac_status_plus typed network variable. 

  • The (location...) option after the block keyword provides the relative location to the folder containing the IzoT targeted resource report.  In this case: ./P9f880100000000-4

  • Finally, the external key word is used to specify the name that will be used for the function block in the exposed interface.  If specified, this name will appear in place of UFPTsccVAV, which is created to guide programmers and not users.

Generating Your XIF File

Do the following to generate your XIF file:

  1. In Windows File Explorer, navigate to the folder you are using for Interface development.

  2. Verify your IzoT targeted resource report folder is in this directory.  
  3. Create a file in a text editor that contains the contents of the model file example above, and save as file vav.nc.

  4. In the address bar of Windows File explorer, type cmd to open a command box with the above working directory that contains your model file.

  5. Type iii vav.c to run the IzoT Interface interpreter, and generate the xif file vav.xif
    This file will include all of the network variables, and configuration property definitions called out in the UFPTsccVAV functional profile template of the myApolloDev resource fileset.

Next Step

In this section you generated reports to convert device resources for use in the SmartServer IoT, and for the IzoT Interface Interpreter that is used to generate XIF files you can use for Internal App device development. 

Go to:  Setting up an Internal Application Program Example Network






  • No labels