078-0349-01D®i.LON®SmartServer 2.0 Programming Tools User’s Guide
x Preface ○ A sample license generator configuration file (an XML file named iLONLicenseGenValuesSample.xml) that demonstrates the structure of the
86 Creating Freely Programmable Modules void CUFPTHVACController::Shutdown() { m_oTimer1.Stop(); StopAllTimers(); } See the Programmer’s Ref
i.LON SmartServer 2.0 Programming Tools User’s Guide 87 Line1.SetDpProperty(FPM::Dp::cfgUCPTpersist, bValue); //write data point poll rate in mill
88 Creating Freely Programmable Modules FPM and the devices connected to the RS-232 and RS-485 serial interfaces, read data from the RS-232 or RS-
i.LON SmartServer 2.0 Programming Tools User’s Guide 89 Compiling an FPM Once you finish writing an FPM, you can compile it with the i.LON SmartSe
90 Creating Freely Programmable Modules Once you correct all the compile errors and the warnings, click File and then Save to re-compile your code
i.LON SmartServer 2.0 Programming Tools User’s Guide 91 2. In the Text File Encoding box, click Other and then select UTF-8 from the bottom of t
92 Creating Freely Programmable Modules debug configuration of your FPM in the i.LON SmartServer 2.0 Programming Tool and upload it to your SmartSe
i.LON SmartServer 2.0 Programming Tools User’s Guide 93 • To reboot your SmartServer using the SmartServer console application, enter the reboot
94 Creating Freely Programmable Modules c. This dialog lists the build configurations available for your FPM. If the Debug 4.03 configuration is
i.LON SmartServer 2.0 Programming Tools User’s Guide 95 h. Click OK to return to the C/C++ Projects view. 6. Set the Debug 4.03 or Debug confi
i.LON SmartServer 2.0 Programming Tools User’s Guide xi Web site at www.echelon.com/products/cis/activate. To run Echelon first-party FPMs or thi
96 Creating Freely Programmable Modules 8. Upload the debug configuration of your FPM to your SmartServer. To do this, expand the Debug 4.03 or D
i.LON SmartServer 2.0 Programming Tools User’s Guide 97 c. The New Connection dialog opens. In the Connection Type window, select the WindRiver
98 Creating Freely Programmable Modules d. In the Target Server Options window, enter the IP address or hostname of the SmartServer on which the F
i.LON SmartServer 2.0 Programming Tools User’s Guide 99 b. The Load/Add Symbols to Debug Server dialog opens. In the Symbol Files and Order box
100 Creating Freely Programmable Modules c. Click OK. The symbols in your FPM are now loaded in the Target Manager view. Symbol icons should app
i.LON SmartServer 2.0 Programming Tools User’s Guide 101 d. If you are using the iLonSystemWdbEnd image and want to switch to System Mode, right
102 Creating Freely Programmable Modules • Add your user help functions to the UFPT<FPM>_Utils.cpp file (this file is created when you creat
i.LON SmartServer 2.0 Programming Tools User’s Guide 103 • Math. This FPM application adds two SNVT_count input data points when one of the data
104 Creating Freely Programmable Modules
i.LON SmartServer 2.0 Programming Tools User’s Guide 105 6 Deploying FPMs on a SmartServer This chapter describes how to use the i.LON SmartServe
xii Preface • Neuron C Programmer’s Guide. Describes how to write programs using the Neuron® C Version 2.1 language. • Neuron C Reference Guide.
106 Deploying Freely Programmable Modules on a SmartServer FPM Deployment Overview After you write and compile an FPM application or driver, you can
i.LON SmartServer 2.0 Programming Tools User’s Guide 107 • An FPM programming license must be installed on your SmartServer in order for an FPM t
108 Deploying Freely Programmable Modules on a SmartServer 4. The Install FPM Module dialog opens with the Deployment Settings window.
i.LON SmartServer 2.0 Programming Tools User’s Guide 109 5. Enter the following properties: FTP Settings Host Enter the IP address or hostname
110 Deploying Freely Programmable Modules on a SmartServer 7. This window lists the tasks to be performed, which consists of uploading the FPM to
i.LON SmartServer 2.0 Programming Tools User’s Guide 111 To order an FPM programming license for your SmartServer, go to the i.LON SmartServer 2.
112 Deploying Freely Programmable Modules on a SmartServer Selecting a Network Management Service Before you create your FPM devices on the SmartSe
i.LON SmartServer 2.0 Programming Tools User’s Guide 113 2. Install the Echelon Enterprise Services 2.0 (EES 2.0) and LNS Server Service Pack 5 o
114 Deploying Freely Programmable Modules on a SmartServer If you are using the SmartServer in Standalone mode and your internal FPM devices are usi
i.LON SmartServer 2.0 Programming Tools User’s Guide 115 3. The Create Device dialog opens. 4. In the Name property, enter a meaningful name f
i.LON SmartServer 2.0 Programming Tools User’s Guide xiii For More Information and Technical Support The i.LON SmartServer 2.0 Programming Tools R
116 Deploying Freely Programmable Modules on a SmartServer 7. Click OK. An internal device representing your FPM application is added to the bott
i.LON SmartServer 2.0 Programming Tools User’s Guide 117 Using a Dynamic Device Interface If you are running your network with the SmartServer ope
118 Deploying Freely Programmable Modules on a SmartServer 7. The Add Functional Block dialog opens. 8. In the Name property, enter a name for t
i.LON SmartServer 2.0 Programming Tools User’s Guide 119 10. Click OK. 11. Click Submit. A functional block representing the FPM application
120 Deploying Freely Programmable Modules on a SmartServer Commissioning FPM Devices If you are running your LONWORKS network in LNS mode (LNS Auto
i.LON SmartServer 2.0 Programming Tools User’s Guide 121 2. Follow the instructions in the Commission Device Wizard and then click Finish. See
122 Deploying Freely Programmable Modules on a SmartServer Testing FPM Applications After you add an FPM application on the SmartServer, you can tes
i.LON SmartServer 2.0 Programming Tools User’s Guide 123 The major difference between LONWORKS connections and Web connections is that LONWORKS co
124 Deploying Freely Programmable Modules on a SmartServer 5. The Configure – WebBinder Web page opens and the hostname of the LNS Server and the
i.LON SmartServer 2.0 Programming Tools User’s Guide 125 7. References to the target LONWORKS network variables ( ) are added underneath the hub
xiv Preface Region Languages Supported Contact Information China Chinese English Echelon Greater China Rm. 1007-1008, IBM Tower Pacific Century P
126 Deploying Freely Programmable Modules on a SmartServer See Chapter 5 of the i.LON SmartServer 2.0 User’s Guide for more information on selectin
i.LON SmartServer 2.0 Programming Tools User’s Guide 127 Note: For more information on creating LONWORKS connections with the LNS tree, including
128 Deploying Freely Programmable Modules on a SmartServer To create Web connections with the data points declared in your FPM application, follow t
i.LON SmartServer 2.0 Programming Tools User’s Guide 129 c. In the tree of the target SmartServer, right-click the any object in the network bra
130 Deploying Freely Programmable Modules on a SmartServer e. Click Submit. 3. From the local SmartServer tree on the left frame, right-click a
i.LON SmartServer 2.0 Programming Tools User’s Guide 131 5. From the Webbinder Destinations tree on the right frame, expand the SmartServer Webb
132 Deploying Freely Programmable Modules on a SmartServer 6. Click Submit. References to the target data points are added underneath the source d
i.LON SmartServer 2.0 Programming Tools User’s Guide 133 Note: For more information on using Web connections, including how to validate, delete,
134 Deploying Freely Programmable Modules on a SmartServer If an .htm file for your FPM application is not in the folder, use the i.LON Development
i.LON SmartServer 2.0 Programming Tools User’s Guide 135 The NLS Text object is used to translate custom SmartServer Web pages into multiple lang
i.LON SmartServer 2.0 Programming Tools User’s Guide 1 1 Introduction This chapter provides an overview of freely programmable modules (FPMs) and
136 Deploying Freely Programmable Modules on a SmartServer 9. Specify the data point to be monitored and controlled by the i.LON Vision 2.0 object
i.LON SmartServer 2.0 Programming Tools User’s Guide 137 10. Configure the other object properties in the dialog following the i.LON Vision 2.0
138 Deploying Freely Programmable Modules on a SmartServer 13. Click Publish on the Editor toolbar (), click File and then click Publish, or click
i.LON SmartServer 2.0 Programming Tools User’s Guide 139 2. Upload your company’s updated resource file set to the root/LonWorks /types/User/<
140 Deploying Freely Programmable Modules on a SmartServer 5. Select the XIF file to be activated, following these steps: a. In the Template prop
i.LON SmartServer 2.0 Programming Tools User’s Guide 141 d. Click OK to return to the Setup - LON Device Driver Web page. e. Click Submit.
142 Deploying Freely Programmable Modules on a SmartServer 8. If you switched a static device interface to a dynamic interface, add a functional b
i.LON SmartServer 2.0 Programming Tools User’s Guide 143 • If you are deploying an FPM application that uses static functional blocks, copy the d
144 Deploying Freely Programmable Modules on a SmartServer
i.LON SmartServer 2.0 Programming Tools User’s Guide 145 7 Creating FPM Application Licenses This chapter describes how to create licenses for yo
2 Introduction Overview of Freely Programmable Modules Freely Programmable Modules (FPMs) are custom C/C++ applications and drivers that you can use
146 Creating FPM Application Licenses Licensing Overview You can create FPM application licenses and let customers order and implement your FPMs on
i.LON SmartServer 2.0 Programming Tools User’s Guide 147 demonstrates the structure of the <PredefinedFeatures> element and the properties y
148 Creating FPM Application Licenses indexes. LicenseType Specify the type of license to be issued. The default LicenseType is “Unlimited”. You
i.LON SmartServer 2.0 Programming Tools User’s Guide 149 Creating a Security DLL File The i.LON License Generator requires a security DLL file nam
150 Creating FPM Application Licenses the C macro DONT_TRANSLATE_NAMES before each of these files. The names of the routines to be used all begin w
i.LON SmartServer 2.0 Programming Tools User’s Guide 151 To verify that the license key in the FPM license file is valid, your license validation
152 Creating FPM Application Licenses Tips for Securing your Licensing Scheme: You can implement a number of security measures in your licensing sc
i.LON SmartServer 2.0 Programming Tools User’s Guide 153 3. Click the header file. The header file view opens to the right of the C/C++ Projects
154 Creating FPM Application Licenses 2. Insert code similar to the following somewhere after the FPM constructor: // flag defining whether FPM
i.LON SmartServer 2.0 Programming Tools User’s Guide 155 Tips: • You should obscure the name of the license validation routine (and other symb
i.LON SmartServer 2.0 Programming Tools User’s Guide 3 You can create up to 10 internal FPM devices on the SmartServer. Each internal FPM device
156 Creating FPM Application Licenses Step 4: Writing the License Validation Algorithm You need to write a license validation algorithm that (1) ve
i.LON SmartServer 2.0 Programming Tools User’s Guide 157 Generator Configuration File for more information on the CompanyName and FeatureName prop
158 Creating FPM Application Licenses Verifying the License Key To write your license validation algorithm so that it verifies the license key in t
i.LON SmartServer 2.0 Programming Tools User’s Guide 159 Note: Pointers to strings will not be NULL if they are not used, instead some may point
160 Creating FPM Application Licenses char msg[100]; sprintf(msg, "FPM license key is invalid: file \"%s\"\n", taskCal
i.LON SmartServer 2.0 Programming Tools User’s Guide 161 set path=%path%;C:\LonWorks\iLON\Development\eclipse\plugins\ com.echelon.eclipse.ilon100
162 Creating FPM Application Licenses 2. By default, the first pre-defined feature specified in the license configuration file (iLONLicenseGenVal
i.LON SmartServer 2.0 Programming Tools User’s Guide 163 • To locate the LUID (Neuron ID) from the SmartServer Web pages, click Driver at the top
164 Creating FPM Application Licenses The FPM application license log file lists the following information: • The date on which the FPM applicat
i.LON SmartServer 2.0 Programming Tools User’s Guide 165 LonWorks\iLON\Development\eclipse\workspace.fpm\<company program ID>.UFPT<FPT Na
4 Introduction You can move your mouse pointer over an object in your FPM to open a tooltip that provides a description and the API of the selected
166 Creating FPM Application Licenses
i.LON SmartServer 2.0 Programming Tools User’s Guide 167 8 Localizing the SmartServer Web Interface This chapter describes how to translate cus
168 Localizing the SmartServer Web Interface Language Localization Overview You can localize the language of the SmartServer Web interface using th
i.LON SmartServer 2.0 Programming Tools User’s Guide 169 b. Paste the folder in the same directory. c. Rename the folder to something meanin
170 Localizing the SmartServer Web Interface 5. Expand the General folder, click Existing Projects into Workspace, and then click Next. The Impo
i.LON SmartServer 2.0 Programming Tools User’s Guide 171 7. Browse to the LonWorks\iLon100\images\iLon100 4.0<x> <Language> folder
172 Localizing the SmartServer Web Interface 9. Expand the NLS folder. All the English, German, and French .properties files for the SmartServe
i.LON SmartServer 2.0 Programming Tools User’s Guide 173 8000010128000000[4].UFPTscheduler.properties files in the root/web/nls/echelon/ folder wi
174 Localizing the SmartServer Web Interface 3. The left frame in the view lists all the common properties in the SmartServer Web interface. The
i.LON SmartServer 2.0 Programming Tools User’s Guide 175 6. The Lang. and Country properties are filled in. Optionally, you can enter a Variant
i.LON SmartServer 2.0 Programming Tools User’s Guide 5 iLonSystemWbdEnd image on your SmartServer to iLonSystem, reboot the SmartServer, create a
176 Localizing the SmartServer Web Interface 8. A new COMMON<_language[_REGION] [_variant]>.properties file is added to the C/C++ Projects
i.LON SmartServer 2.0 Programming Tools User’s Guide 177 You can comment out the text in a translation by selecting the checkbox () in the upper
178 Localizing the SmartServer Web Interface a. Browse to the LonWorks\iLon100\images\iLon100 4.0<x> <Language>\web\nls\echelon direct
i.LON SmartServer 2.0 Programming Tools User’s Guide 179 2. Re-name the copy by deleting the “Copy of” pre-fix and inserting the “<_language[
180 Localizing the SmartServer Web Interface 2. Connect i.LON Vision 2.0 to your SmartServer. To do this, click Manage Connections in the Sites p
i.LON SmartServer 2.0 Programming Tools User’s Guide 181 8. The iLON Vision -Object – <Application> dialog opens. 9. Configure the applic
182 Localizing the SmartServer Web Interface 12. In the File Name property, enter the name of the .htm file (one word with no spaces), and then cl
i.LON SmartServer 2.0 Programming Tools User’s Guide 183 5. Click Browse. The Browse to Folder dialog opens. 6. Browse to the web/config/Fb/N
184 Localizing the SmartServer Web Interface 7. Click Finish. A web-config-Fb (custom NLS) project appears in the C/C++ Projects view. 8. Expa
i.LON SmartServer 2.0 Programming Tools User’s Guide 185 Localizing the Language of the SmartServer Web Interface Localizing the language of the S
ii Preface Echelon, i.LON, LON, LONWORKS, LonTalk, Neuron, LONMARK, 3120, 3150, LNS, LonMaker, and the Echelon logo are trademarks of Echelon Corpora
6 Introduction just re-name the sample DLL file LicenseSecurity.dll; however, you are solely responsible for the creation of the security DLL file.
186 Localizing the SmartServer Web Interface To create a new web/user/echelon/<language[_REGION] [_variant]> folder, follow these steps: 1.
i.LON SmartServer 2.0 Programming Tools User’s Guide 187 4. Save the index.htm file. 5. Copy the index.htm file to the SmartServer. To do thi
188 Localizing the SmartServer Web Interface opens. Click New Site, the Edit Site dialog opens. Enter your SmartServer’s information, and then cli
i.LON SmartServer 2.0 Programming Tools User’s Guide 189 a. In the Page Title box, enter a descriptive page title. b. Click OK. 8. Click Pu
190 Localizing the SmartServer Web Interface • Line 8 corresponds to the “i.LON SmartServer 2.0 – Welcome” title at the top of the SmartServer We
i.LON SmartServer 2.0 Programming Tools User’s Guide 191 Translating the Menu.htm File You can translate the Welcome.htm and Menu.htm files in the
192 Localizing the SmartServer Web Interface 6. Click Edit on the Editor toolbar () or click the Layout tab. 7. Double-click the Menu bar and
i.LON SmartServer 2.0 Programming Tools User’s Guide 193 8. Expand SETUP to display its submenu items.
194 Localizing the SmartServer Web Interface 9. Click Edit. The Navigation Subtree dialog opens. 10. In the Label box, translate SETUP to you
i.LON SmartServer 2.0 Programming Tools User’s Guide 195 13. When you have finished translating the menus and menu items to your localized langua
i.LON SmartServer 2.0 Programming Tools User’s Guide 7 Note: An FPM programming license must be installed on your SmartServer for the FPM to run
196 Localizing the SmartServer Web Interface c. Repeat steps a–b to change the language of the Back button to your localized language. 15. Click
i.LON SmartServer 2.0 Programming Tools User’s Guide 197 • Lines 32–44 in this example correspond to the “Setup” menu and its menu items. • Li
198 Localizing the SmartServer Web Interface • Lines 85–93 in this example correspond to the “Settings”, “Help”, and “Log Off” menus. Note that t
i.LON SmartServer 2.0 Programming Tools User’s Guide 199 2. Connect i.LON Vision 2.0 to your SmartServer. To do this, click Manage Connections i
200 Localizing the SmartServer Web Interface 6. Double-click the Menu bar and the top of the Web page, or right-click the Menu bar and click Objec
i.LON SmartServer 2.0 Programming Tools User’s Guide 201 1. Browse to the LonWorks\iLon100\images\iLon100 4.0<x> <Language>\web\user\
202 Localizing the SmartServer Web Interface 3. Click Login. The localized i.LON SmartServer 2.0 - Welcome Web page opens. 4. The menus, the
i.LON SmartServer 2.0 Programming Tools User’s Guide 203 Appendix A FPM Programmer’s Reference This appendix details the files, routines and m
204 Appendix A - Programmer’s Reference Overview This chapter provides details you will need when programming your module. It includes the followi
i.LON SmartServer 2.0 Programming Tools User’s Guide 205 Initialize() The Initialize() routine in the .cpp file is called when your FPM applicatio
8 Introduction e. In the channel (TT) field of the Program ID box, enter 04 if you have an FT-10 model of the SmartServer or enter 10 if you have a
206 Appendix A - Programmer’s Reference For an FPM application, you can also use the Work() routine to start and stop timers, and you can use it to
i.LON SmartServer 2.0 Programming Tools User’s Guide 207 For an FPM application, you can also use the OnTimer() routine to start and stop timers,
208 Appendix A - Programmer’s Reference Shutdown() The Shutdown() routine in the .cpp file is called when your FPM stops or is disabled. You can
i.LON SmartServer 2.0 Programming Tools User’s Guide 209 Variable Type Size unsigned long 32 Bits long 32 Bits unsigned int 32 Bits int 32 Bits
210 Appendix A - Programmer’s Reference { Note: You can use the NotifyOnAllUpdates() method modify so that the Changed()method checks whether any
i.LON SmartServer 2.0 Programming Tools User’s Guide 211 Note: You can also use temporary data point variables to write values to the fields with
212 Appendix A - Programmer’s Reference If the priority specified in the nPrioAuthority parameter is equal to or higher than the priority currentl
i.LON SmartServer 2.0 Programming Tools User’s Guide 213 This method returns the UCPTname configuration property of the data point in the followin
214 Appendix A - Programmer’s Reference SYNTAX const timespec GetDpPropertyAsTimeSpec(FPM::Dp::dataUCPTlastupdate) This method returns the UCPTlast
i.LON SmartServer 2.0 Programming Tools User’s Guide 215 AL_FIR_MONITOR_COND =20 AL_FIR_MAINT_ALERT =21 AL_FATAL_ERROR =30 AL_ERROR =31
i.LON SmartServer 2.0 Programming Tools User’s Guide 9 fblock UFPTMath { in1 implements in1; in2 implements in2; out1 implements out1; } fbM
216 Appendix A - Programmer’s Reference void SetDpProperty(FPM::Dp::dataUCPTAliasName, const char* const pszValue) The pszValue parameter specifie
i.LON SmartServer 2.0 Programming Tools User’s Guide 217 EXAMPLE F1.SetDpProperty(FPM::Dp::cfgUCPTdefOutput, 100); SetDpProperty(persist) You can
218 Appendix A - Programmer’s Reference External SmartServer Data Point Methods In an FPM application, you can use the List() method with a specifi
i.LON SmartServer 2.0 Programming Tools User’s Guide 219 v.GetDpPropertyAsString(Dp::cfgUCPTname), v.GetDpPropertyAsString(Dp::cfgUCPTaliasName),
220 Appendix A - Programmer’s Reference • -1. The data point value is read from the SmartServer’s internal data server. The poll rate used by t
i.LON SmartServer 2.0 Programming Tools User’s Guide 221 The pbyValue parameter specifies the value to be written to the data point. The STATUS va
222 Appendix A - Programmer’s Reference in the Initialize(), Work(), and OnTimer()routines of an FPM application, and you can use it in the Initial
i.LON SmartServer 2.0 Programming Tools User’s Guide 223 m_oTimer2.Start(FPM_TF_ONETIME, 0); } void CUFPT_FPM_Application::OnTimer() { if (m_o
224 Appendix A - Programmer’s Reference if (m_oTimer1.lsRunning()) { //execute code } GetMode() You can use the GetMode()method to check the typ
i.LON SmartServer 2.0 Programming Tools User’s Guide 225 extern "C" STATUS fnRebootSmartServer (int a_nBootFlag); #endif … void CUFPTma
10 Introduction 3. In the Server/IP-Address box in the LonMark Resource View, enter the hostname or IP address of your SmartServer and then click t
226 Appendix A - Programmer’s Reference int fd = rs232_open(9600); rs232_ioctl() You can use the rs232_ioctl() method in the Initialize() routine t
i.LON SmartServer 2.0 Programming Tools User’s Guide 227 parameter is set to IOCTL_SIO_HW_OPTS_SET. This method returns the 0 upon success, and it
228 Appendix A - Programmer’s Reference int nBytesRead = ReadBytes(RS232_fd, rxBuf, MAX_RX_BYTE_SIZE); //check whether something h
i.LON SmartServer 2.0 Programming Tools User’s Guide 229 The buf parameter specifies a pointer to the memory area containing the data to be writte
230 Appendix A - Programmer’s Reference Verify that the file handle is specified in a global variable so that you can reference it from the Work()
i.LON SmartServer 2.0 Programming Tools User’s Guide 231 iLON/Development/eclipse/plugins/com.echelon.eclipse.ilon100.fpm_0.9.0/compiler/echelon/f
232 Appendix A - Programmer’s Reference The length parameter specifies the maximum number of bytes that are to be read. This method returns the num
i.LON SmartServer 2.0 Programming Tools User’s Guide 233 File Access Methods You can read and write to data files on the SmartServer using the fol
234 Appendix A - Programmer’s Reference EXAMPLE The following example demonstrates an fopen()method that creates a new text file for writing and as
i.LON SmartServer 2.0 Programming Tools User’s Guide 235 fclose(pFile); } } fseek() You can use the fseek()method to set the position i
i.LON SmartServer 2.0 Programming Tools User’s Guide 11 7. If you will be deploying this example FPM on a SmartServer 2.0, click Finish to acc
236 Appendix A - Programmer’s Reference if((pFile = fopen(Filename,"a")) == NULL) { printf(“Can't open or create i.LON 100 file = %
i.LON SmartServer 2.0 Programming Tools User’s Guide 237 Appendix B FPM Development and Deployment Checklist This checklist outlines the steps r
238 Appendix B – FPM Development and Deployment Checklist 1. Create User-Defined Functional Profile Template (UFPT) NodeBuilder Resource Editor
i.LON SmartServer 2.0 Programming Tools User’s Guide 239 à Use i.LON SmartServer 2.0 Programming Tool to upload FPM executable module (.app or .dr
240 Appendix B – FPM Development and Deployment Checklist à Use Adobe Contribute CS3 with i.LON Vision 2.0 toolkit to create custom FPM configurati
i.LON SmartServer 2.0 Programming Tools User’s Guide 241 Appendix C FPM FAQ This FAQ answers common question related to FPMs. .
242 Appendix D – i.LON SmartServer Software License Agreement SmartServer FPM FAQs 1. What are Freely Programmable Modules (FPMs)? FPMs are custom
i.LON SmartServer 2.0 Programming Tools User’s Guide 243 • For FPM Applications. o Add an internal device using the above XIF (Static FBs) or th
244 Appendix D – i.LON SmartServer Software License Agreement If you use Static FBs for the figure above then you would have to create two XIF fi
i.LON SmartServer 2.0 Programming Tools User’s Guide 245 For Static FBs, you need to create a model file (*.nc extension) in which you declare al
12 Introduction 9. You can observe that the Data Point Variable Declarations section automatically includes DECLARE statements for each data point
246 Appendix D – i.LON SmartServer Software License Agreement (UFPT), which defines the NVs and CPs to which your FPM will read and write. The Nod
i.LON SmartServer 2.0 Programming Tools User’s Guide 247 File: fpmMathAdder.xif generated by LonTalk Interface Developer Revision 3.00.35, XIF Ve
248 Appendix D – i.LON SmartServer Software License Agreement No. You can only use one NV type (SNVT or UNVT) for each FPM NV which you specify wit
i.LON SmartServer 2.0 Programming Tools User’s Guide 249 data points on external devices, dynamic network variables added to the SmartServer’s int
250 Appendix D – i.LON SmartServer Software License Agreement void CUFPTfpmTempController::Initialize()] {] // Determine FB index by looking at one
i.LON SmartServer 2.0 Programming Tools User’s Guide 251 Yes. This how you pass data from the FPM driver to the FPM applications. 44. Can a FPM a
www.echelon.com
i.LON SmartServer 2.0 Programming Tools User’s Guide 13 void CUFPTMath::Work() { if (Changed(in1) || Changed(in2)) { out1 = in1 + in2; printf(&quo
14 Introduction 3. The Install FPM Module dialog opens with the Deployment Settings window.
i.LON SmartServer 2.0 Programming Tools User’s Guide 15 4. Enter the following information if different than the defaults: • The IP address or
i.LON SmartServer 2.0 Programming Tools User’s Guide iii Table of Contents Preface ...
16 Introduction 5. Expand the LonMark (XIF) folder, expand the root/lonworks/import/<YourCompany> folder, and then select the XIF for your Ma
i.LON SmartServer 2.0 Programming Tools User’s Guide 17 Step 6: Testing the FPM Application After you deploy an FPM application, you can test your
18 Introduction in2 data points declared in the FPM device and that the out1 data point in the FPM device is updating the dynamic data point on the
i.LON SmartServer 2.0 Programming Tools User’s Guide 19 6. Click OK. A data point with the name you specified in step d is added underneath the
20 Introduction d. Click OK. Two copies of the data point named “Copy of <DP name>” are added underneath the VirtFB functional block. Note
i.LON SmartServer 2.0 Programming Tools User’s Guide 21 5. The Configure – Web Binder Web page opens and the hostnames of the local SmartServer a
22 Introduction 14. Enter values for both the VirtFB/count1 and VirtFB/count2 points. Observe the following: • The Math Function/in1 and Math Fu
i.LON SmartServer 2.0 Programming Tools User’s Guide 23 2 Installing i.LON SmartServer 2.0 Programming Tools This chapter describes how to instal
24 Installing i.LON SmartServer 2.0 Programming Tools Installation and Upgrading Overview The i.LON SmartServer 2.0 DVD includes a demo version of th
i.LON SmartServer 2.0 Programming Tools User’s Guide 25 3. Click Install Products. The Install Products dialog opens. 4. Click Echelon i.LON
iv Preface Using Include Directives...59 Example Model Files ...
26 Installing i.LON SmartServer 2.0 Programming Tools 6. A dialog opens prompting to close all applications currently running on your computer. Cl
i.LON SmartServer 2.0 Programming Tools User’s Guide 27 9. Read the license agreement (you can read a printed copy of this license agreement in
28 Installing i.LON SmartServer 2.0 Programming Tools 11. By default, the i.LON SmartServer 2.0 Programming Tools software will be installed in the
i.LON SmartServer 2.0 Programming Tools User’s Guide 29 13. Click Install to begin the installation. After the i.LON SmartServer 2.0 Programmin
30 Installing i.LON SmartServer 2.0 Programming Tools 1. Browse to the LonWorks\iLON\Development\eclipse\workspace.fpm folder on your computer. Thi
i.LON SmartServer 2.0 Programming Tools User’s Guide 31 4. The Import Projects window opens. 5. Click Browse. The Browse for Folder dialog op
32 Installing i.LON SmartServer 2.0 Programming Tools 6. The selected FPM projects are listed in the Import Projects dialog. Select the Copy Proje
i.LON SmartServer 2.0 Programming Tools User’s Guide 33 9. The selected FPM projects appear in the C/C++ Projects View. Converting FPM Projects
34 Installing i.LON SmartServer 2.0 Programming Tools 2. Click C/C++ Build. 3. Click Manage Configurations. The Manage Configurations dialog op
i.LON SmartServer 2.0 Programming Tools User’s Guide 35 4. Click New. The Create New Configurations dialog opens. 5. In the Name property, e
i.LON SmartServer 2.0 Programming Tools User’s Guide v Updating Device Interfaces ...139 De
36 Installing i.LON SmartServer 2.0 Programming Tools 7. Click OK twice to return to the C/C++ Build window. 8. In the Configuration property, sel
i.LON SmartServer 2.0 Programming Tools User’s Guide 37 b. Click Debugging in the Tool Settings tab. c. In the Level box, select Default (-g).
38 Installing i.LON SmartServer 2.0 Programming Tools d. Click OK to return to the C/C++ Projects view. 10. Set the build target for your FPM to
i.LON SmartServer 2.0 Programming Tools User’s Guide 39 11. You can upgrade your FPM application or driver, rebuild it, and then upload it to yo
40 Installing i.LON SmartServer 2.0 Programming Tools
i.LON SmartServer 2.0 Programming Tools User’s Guide 41 3 Creating FPM Templates This chapter describes how to use the NodeBuilder Resource Edit
42 Creating FPM Templates Creating FPM Templates Overview Before you can begin writing an FPM, you need to create its user-defined functional profil
i.LON SmartServer 2.0 Programming Tools User’s Guide 43 2. Create a <YourCompany> folder under the LonWorks\types\user directory on your co
44 Creating FPM Templates b. The New Resource File Set dialog opens. c. If you plan on integrating your FPM applications with an LNS application
i.LON SmartServer 2.0 Programming Tools User’s Guide 45 Note: If your company does not have a manufacturer ID, you can get a temporary manufactur
vi Preface Internal FPM Data Point Methods...209 Changed()...
46 Creating FPM Templates 5. Create a UFPT. You can create a new UFPT, or you can create one by copying an existing SFPT to your resource file se
i.LON SmartServer 2.0 Programming Tools User’s Guide 47 6. To create a UFPT from an SFPT, follow these steps: a. Expand the STANDARD resource fi
48 Creating FPM Templates c. You can then add, delete, and edit the network variable and configuration property members in the SFPT to fit your FP
i.LON SmartServer 2.0 Programming Tools User’s Guide 49 resource file set (the resource file set that has your manufacturer ID). To add network v
50 Creating FPM Templates 4. The selected data type appears below the folder to which it was added in the Profile (center) pane, and the selected
i.LON SmartServer 2.0 Programming Tools User’s Guide 51 Name Enter the name of the network variable within the functional profile template. The
52 Creating FPM Templates Application Layer Interoperability Guidelines for more information about configuration property restriction flags. • con
i.LON SmartServer 2.0 Programming Tools User’s Guide 53 7. Repeat steps 3–6 for each data type to be added to the functional profile template.
54 Creating FPM Templates 2. The Generate Resources Set dialog opens. 3. Click Yes to generate the updated FPM resource file set. 4. Use FTP
i.LON SmartServer 2.0 Programming Tools User’s Guide 55 4 Creating FPM Device Interface (XIF) Files This chapter describes how to write a model f
i.LON SmartServer 2.0 Programming Tools User’s Guide vii Appendix C FPM FAQ ...
56 Creating FPM Device Interface (XIF) Files Creating FPM Device Interface (XIF) Files Overview In order to deploy an FPM application on the SmartSe
i.LON SmartServer 2.0 Programming Tools User’s Guide 57 You must declare all the mandatory network variables in the UFPT you created for your FPM.
58 Creating FPM Device Interface (XIF) Files The type property corresponds to the standard or user-defined network variable type (SCPT or UCPT) use
i.LON SmartServer 2.0 Programming Tools User’s Guide 59 external_name property, the SmartServer uses the FPT key of the UFPT for the functional bl
60 Creating FPM Device Interface (XIF) Files nviSetPoint implements nviSetPoint; nviTemp implements nviTemp; nvoAC_OnOff implements nvoAirCond
i.LON SmartServer 2.0 Programming Tools User’s Guide 61 nviTemp implements nviTemp; nvoAC_OnOff implements nvoAirConditioner_OnOff; nvoFurna
62 Creating FPM Device Interface (XIF) Files nciHeartbeat[0],nciOffline[0],nciThrottle[0],nciHysteresis[0] }; /////////////second FB array insta
i.LON SmartServer 2.0 Programming Tools User’s Guide 63 In addition, you should create a <YourCompany> folder for your company under the C:\
64 Creating FPM Device Interface (XIF) Files Using Long and Short Command Switch Forms Most command switches come in long and short forms. The long
i.LON SmartServer 2.0 Programming Tools User’s Guide 65 5 Creating FPMs This chapter describes how to use the i.LON SmartServer 2.0 Programming T
viii Preface Preface You can use i.LON SmartServer 2.0 Programming Tools to create custom embedded applications and drivers, which are referred to as
66 Creating Freely Programmable Modules Creating FPMs Overview You can use the full version of the i.LON SmartServer 2.0 Programming Tool to create
i.LON SmartServer 2.0 Programming Tools User’s Guide 67 Creating New FPM Projects You can create a new FPM project using the i.LON SmartServer 2.0
68 Creating Freely Programmable Modules Creating an FPM To create an FPM application or an FPM driver, follow these steps: 1. Expand the SmartSer
i.LON SmartServer 2.0 Programming Tools User’s Guide 69 Alternatively, you can click the resource file set and then click the Create FPM icon ()
70 Creating Freely Programmable Modules 5. Optionally, you can specify the project name and the location where the FPM project is to be stored
i.LON SmartServer 2.0 Programming Tools User’s Guide 71 8. Clear the check boxes for any of the configuration you do not plan on deploying. For
72 Creating Freely Programmable Modules 10. In the Data Point Variable Declarations section, located just below the namespace declaration, you ca
i.LON SmartServer 2.0 Programming Tools User’s Guide 73 disk. See Chapter 3 for more information on generating an updated resource file set and u
74 Creating Freely Programmable Modules Manually Importing Individual Data Point Declarations In the source file (.cpp extension) of your FPM, you
i.LON SmartServer 2.0 Programming Tools User’s Guide 75 3. An updated DECLARE statement for the selected data point is added to the data point d
i.LON SmartServer 2.0 Programming Tools User’s Guide ix Welcome The SmartServer includes i.LON SmartServer 2.0 Programming Tools for creating cust
76 Creating Freely Programmable Modules SYNTAX DECLARE_FB_INSTANCE_LOCAL(dataType, variableName) EXAMPLE // <= section datapoint variable declar
i.LON SmartServer 2.0 Programming Tools User’s Guide 77 //set initial data point values nviSetPoint = 0; nviTemp = 0; nciHystereis = -17
78 Creating Freely Programmable Modules The following code demonstrates how to create repeating and one-time timers using the Start() method: CFPM_
i.LON SmartServer 2.0 Programming Tools User’s Guide 79 In the algorithm, you can directly read and write values to the data points declared in yo
80 Creating Freely Programmable Modules Note: You can modify the behavior of the Changed()method so that it can determine whether any data point pr
i.LON SmartServer 2.0 Programming Tools User’s Guide 81 Reading Data Point Properties You can read the name, alias name, time of last update, and
82 Creating Freely Programmable Modules } } Reading Structured Data Points To read the value of a structured data point, you first need to store t
i.LON SmartServer 2.0 Programming Tools User’s Guide 83 Writing Data Point Values You can write updated values to the scalar and structured data p
84 Creating Freely Programmable Modules Writing to Enumerated Data Points To write to an enumerated data point, you need to use the values of the c
i.LON SmartServer 2.0 Programming Tools User’s Guide 85 The following code demonstrates how to create an OnTimer()routine that handles the expira
Comments to this Manuals