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

In this section, an XIF file is created for the Internal App that monitors VAV cooling demand to establish the required duct static pressure set point to optimize energy usage.  In this example, you are creating an application to control the nviDuctStaticSP (SNVT_press_p). If you have not done so yet, use git to clone the following github repo: https://github.com/izot/smartserver-iot

To support this application, the IzoT Resource Editor was used to define the functional profile UFPTDspSPcontroller within the ApolloDev resource file.  At this point, you should already have the ApolloDev resources installed on your computer and visible in the Resource catalog using the IzoT Resource Editor.  (If the ApolloDev resource set is not in your Resource catalog, follow the steps described under Selecting a Profile.)

In the IzoT Resource Editor, drill down to the Functional Profiles folder of the ApolloDev resources, and double click the UFPTDspSPcontroller node to see the details of this functional profile. 

Please spend some time reviewing each network variable and configuration property defined for this functional profile.  You should note how the Comment field is used to describe each network variable. For configuration properties, default, minimum, and maximum values can be defined. For example, it is important to limit the duct static pressure below 1000 Pascal to avoid conditions that may damage the duct work.

Defining your own functional profile in the IzoT Resource Editor is straight forward, but not needed now because the UFPTDspSPcontroller is already in the system.

If you have followed this example in order, there are several things that are prepared for you in advance. The folders shown in the following screenshot are part of the example linked above, and are described in the table below.

Folder/File Name

Description

dspSPcontrollerThis folder contains a Node.js application developed as an internal application example.
Interface Dev

This folder contains IzoT target Resource reports and Input files for defining the XIF file for the internal LON App.

Internal App Evb FIles

The folder contains XIF, APB, and NDL image files for FT 5000 and 6050 Evaluation boards. It is typically used to load the example applications before the exercise is started.

SmartServer Support

The files in this folder are imported using the SmartServer IoT CMS.  They represent the target simulation nodes and the internal App node being developed.

DspSPControllerExample.dtp

This is the complete package file for the internal application example defining the Internal device, as well as the devices emulating devices in the simulated network.

Follow these steps to create an XIF file for this application example:

  1. In Windows File Explorer, navigate to the folder ../smartserver-iot/apps/Dsp SP Controller Example/Interface Dev.

  2. Open the DspSPcontroller.c interface model to inspect  it.  The contents are shown below.

    DspSpController Model file - DspSpController.c
    /*
     * 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 ApolloDev.* resouce files in a location that matches the location
     * in the IML belowUDPTDspSPcontroller. 
     * *** Note iii.exe 1.30.009 or higher is required ***
     */
    //@Izot option target("xif")
    //@Izot option programId("90:00:01:06:00:03:85:00")
    //@IzoT option dynamic(blocks=0, datapoints=0) 
    //@IzoT option addresses(15)
    //@IzoT option aliases(15)
    
    UFPTDspSPcontroller(DspCntl) DspCntl; //@Izot block (location="./P9000010600000000_4") external("SpController") 
  3. This file uses the IzoT Markup Language (IML) to simplify the definition of this interface.  Complete details for IML are found here: IzoT_Markup_Language.  What you need to understand is as follows;
    1. //@Izot is the tag that starts a block of IML.

    2. Lines 7-8 are common to all SmartServer IoT internal applications, and should be replicated verbatim in interfaces you design.

    3. Line 9 is your choice, according to the application you are building. The hex code bytes 90:00:01:06:00 should be part of applications that will target the apolloDev resources. The second to last hex coded byte (85) represents the channel ID for the device.  SmartServer Internal Apps use the internal IP-70 channel, so 85 is the correct value to use in all cases.

    4. The UFPT name UFPTDspSPcontroller at the start of line 11, calls out the functional profile detailed above in the ApolloDev resource fileset.

    5. The location="./P900010600000000_4" option specifies the realative path to the IzoT targeted report that was generated and included in the Interface Dev folder.

    6. The last part of the IML defines the name that is used for this profile when exposed to users and other tools.  In this case, the user would see SpController instead of UFPTDspSPcontroller.

  4. In Windows File Explorer, type cmd in the address bar to make the folder Interface Dev the current working directory in a windows command window.

  5. At the Windows command prompt, type: iii DspSPcontroller.c and look for the result shown in the following screenshot.  The file dspcontrollersp.xif is the primary output of interest.  You now have an XIF file that describes the Lon interface for the internal App under development.  


  6. The output file form iii.exe is the file dspspcontroller.xif.  

Next Step

Return to Creating a Custom LON App.





  • No labels