Echelon i.LON SmartServer 2.0 Manuale Utente

Navigare online o scaricare Manuale Utente per Sensori Echelon i.LON SmartServer 2.0. Echelon i.LON SmartServer 2.0 User Manual Manuale Utente

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 266
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti

Sommario

Pagina 1 - SmartServer 2.0

078-0349-01D®i.LON®SmartServer 2.0 Programming Tools User’s Guide

Pagina 2

x Preface ○ A sample license generator configuration file (an XML file named iLONLicenseGenValuesSample.xml) that demonstrates the structure of the

Pagina 3 - Table of Contents

86 Creating Freely Programmable Modules void CUFPTHVACController::Shutdown() { m_oTimer1.Stop(); StopAllTimers(); } See the Programmer’s Ref

Pagina 4

i.LON SmartServer 2.0 Programming Tools User’s Guide 87 Line1.SetDpProperty(FPM::Dp::cfgUCPTpersist, bValue); //write data point poll rate in mill

Pagina 5

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-

Pagina 6

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

Pagina 7

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

Pagina 8 - Preface

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

Pagina 9

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

Pagina 10 - SmartServer Requirements

i.LON SmartServer 2.0 Programming Tools User’s Guide 93 • To reboot your SmartServer using the SmartServer console application, enter the reboot

Pagina 11 - Related Reading

94 Creating Freely Programmable Modules c. This dialog lists the build configurations available for your FPM. If the Debug 4.03 configuration is

Pagina 12 - Content

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

Pagina 13

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

Pagina 14

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

Pagina 15 - Introduction

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

Pagina 16 - Creating and Deploying FPMs

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

Pagina 17

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

Pagina 18

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

Pagina 19

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

Pagina 20 - Quick-Start FPM Exercise

102 Creating Freely Programmable Modules • Add your user help functions to the UFPT<FPM>_Utils.cpp file (this file is created when you creat

Pagina 21

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

Pagina 22

104 Creating Freely Programmable Modules

Pagina 23

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

Pagina 24

xii Preface • Neuron C Programmer’s Guide. Describes how to write programs using the Neuron® C Version 2.1 language. • Neuron C Reference Guide.

Pagina 25

106 Deploying Freely Programmable Modules on a SmartServer FPM Deployment Overview After you write and compile an FPM application or driver, you can

Pagina 26

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

Pagina 27

108 Deploying Freely Programmable Modules on a SmartServer 4. The Install FPM Module dialog opens with the Deployment Settings window.

Pagina 28 - 14 Introduction

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

Pagina 29

110 Deploying Freely Programmable Modules on a SmartServer 7. This window lists the tasks to be performed, which consists of uploading the FPM to

Pagina 30

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.

Pagina 31

112 Deploying Freely Programmable Modules on a SmartServer Selecting a Network Management Service Before you create your FPM devices on the SmartSe

Pagina 32

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

Pagina 33

114 Deploying Freely Programmable Modules on a SmartServer If you are using the SmartServer in Standalone mode and your internal FPM devices are usi

Pagina 34

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

Pagina 35

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

Pagina 36

116 Deploying Freely Programmable Modules on a SmartServer 7. Click OK. An internal device representing your FPM application is added to the bott

Pagina 37 - Programming Tools

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

Pagina 38

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

Pagina 39

i.LON SmartServer 2.0 Programming Tools User’s Guide 119 10. Click OK. 11. Click Submit. A functional block representing the FPM application

Pagina 40

120 Deploying Freely Programmable Modules on a SmartServer Commissioning FPM Devices If you are running your LONWORKS network in LNS mode (LNS Auto

Pagina 41

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

Pagina 42

122 Deploying Freely Programmable Modules on a SmartServer Testing FPM Applications After you add an FPM application on the SmartServer, you can tes

Pagina 43

i.LON SmartServer 2.0 Programming Tools User’s Guide 123 The major difference between LONWORKS connections and Web connections is that LONWORKS co

Pagina 44 - Importing FPM Projects

124 Deploying Freely Programmable Modules on a SmartServer 5. The Configure – WebBinder Web page opens and the hostname of the LNS Server and the

Pagina 45

i.LON SmartServer 2.0 Programming Tools User’s Guide 125 7. References to the target LONWORKS network variables ( ) are added underneath the hub

Pagina 46

xiv Preface Region Languages Supported Contact Information China Chinese English Echelon Greater China Rm. 1007-1008, IBM Tower Pacific Century P

Pagina 47

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

Pagina 48

i.LON SmartServer 2.0 Programming Tools User’s Guide 127 Note: For more information on creating LONWORKS connections with the LNS tree, including

Pagina 49

128 Deploying Freely Programmable Modules on a SmartServer To create Web connections with the data points declared in your FPM application, follow t

Pagina 50

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

Pagina 51

130 Deploying Freely Programmable Modules on a SmartServer e. Click Submit. 3. From the local SmartServer tree on the left frame, right-click a

Pagina 52

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

Pagina 53

132 Deploying Freely Programmable Modules on a SmartServer 6. Click Submit. References to the target data points are added underneath the source d

Pagina 54

i.LON SmartServer 2.0 Programming Tools User’s Guide 133 Note: For more information on using Web connections, including how to validate, delete,

Pagina 55 - Creating FPM Templates

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

Pagina 56

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

Pagina 57

i.LON SmartServer 2.0 Programming Tools User’s Guide 1 1 Introduction This chapter provides an overview of freely programmable modules (FPMs) and

Pagina 58

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

Pagina 59

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

Pagina 60

138 Deploying Freely Programmable Modules on a SmartServer 13. Click Publish on the Editor toolbar (), click File and then click Publish, or click

Pagina 61

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/<

Pagina 62

140 Deploying Freely Programmable Modules on a SmartServer 5. Select the XIF file to be activated, following these steps: a. In the Template prop

Pagina 63

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.

Pagina 64

142 Deploying Freely Programmable Modules on a SmartServer 8. If you switched a static device interface to a dynamic interface, add a functional b

Pagina 65

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

Pagina 66

144 Deploying Freely Programmable Modules on a SmartServer

Pagina 67

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

Pagina 68

2 Introduction Overview of Freely Programmable Modules Freely Programmable Modules (FPMs) are custom C/C++ applications and drivers that you can use

Pagina 69

146 Creating FPM Application Licenses Licensing Overview You can create FPM application licenses and let customers order and implement your FPMs on

Pagina 70 - Creating a Model File

i.LON SmartServer 2.0 Programming Tools User’s Guide 147 demonstrates the structure of the <PredefinedFeatures> element and the properties y

Pagina 71

148 Creating FPM Application Licenses indexes. LicenseType Specify the type of license to be issued. The default LicenseType is “Unlimited”. You

Pagina 72 - Declaring Functional Blocks

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

Pagina 73 - Example Model Files

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

Pagina 74

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

Pagina 75

152 Creating FPM Application Licenses Tips for Securing your Licensing Scheme: You can implement a number of security measures in your licensing sc

Pagina 76 - Saving your Model File

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

Pagina 77

154 Creating FPM Application Licenses 2. Insert code similar to the following somewhere after the FPM constructor: // flag defining whether FPM

Pagina 78 - Other Command Switches

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

Pagina 79 - Creating FPMs

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

Pagina 80 - Creating FPMs Overview

156 Creating FPM Application Licenses Step 4: Writing the License Validation Algorithm You need to write a license validation algorithm that (1) ve

Pagina 81 - Creating New FPM Projects

i.LON SmartServer 2.0 Programming Tools User’s Guide 157 Generator Configuration File for more information on the CompanyName and FeatureName prop

Pagina 82 - Creating an FPM

158 Creating FPM Application Licenses Verifying the License Key To write your license validation algorithm so that it verifies the license key in t

Pagina 83

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

Pagina 84

160 Creating FPM Application Licenses char msg[100]; sprintf(msg, "FPM license key is invalid: file \"%s\"\n", taskCal

Pagina 85

i.LON SmartServer 2.0 Programming Tools User’s Guide 161 set path=%path%;C:\LonWorks\iLON\Development\eclipse\plugins\ com.echelon.eclipse.ilon100

Pagina 86

162 Creating FPM Application Licenses 2. By default, the first pre-defined feature specified in the license configuration file (iLONLicenseGenVal

Pagina 87

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

Pagina 88

164 Creating FPM Application Licenses The FPM application license log file lists the following information: • The date on which the FPM applicat

Pagina 89 - Using UFPT Local Variables

i.LON SmartServer 2.0 Programming Tools User’s Guide 165 LonWorks\iLON\Development\eclipse\workspace.fpm\<company program ID>.UFPT<FPT Na

Pagina 90 - Writing an FPM Application

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

Pagina 91 - Using the Start() Method

166 Creating FPM Application Licenses

Pagina 92

i.LON SmartServer 2.0 Programming Tools User’s Guide 167 8 Localizing the SmartServer Web Interface This chapter describes how to translate cus

Pagina 93

168 Localizing the SmartServer Web Interface Language Localization Overview You can localize the language of the SmartServer Web interface using th

Pagina 94

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

Pagina 95 - Reading Scalar Data Points

170 Localizing the SmartServer Web Interface 5. Expand the General folder, click Existing Projects into Workspace, and then click Next. The Impo

Pagina 96

i.LON SmartServer 2.0 Programming Tools User’s Guide 171 7. Browse to the LonWorks\iLon100\images\iLon100 4.0<x> <Language> folder

Pagina 97 - Writing Data Point Values

172 Localizing the SmartServer Web Interface 9. Expand the NLS folder. All the English, German, and French .properties files for the SmartServe

Pagina 98

i.LON SmartServer 2.0 Programming Tools User’s Guide 173 8000010128000000[4].UFPTscheduler.properties files in the root/web/nls/echelon/ folder wi

Pagina 99

174 Localizing the SmartServer Web Interface 3. The left frame in the view lists all the common properties in the SmartServer Web interface. The

Pagina 100 - Writing an FPM Driver

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

Pagina 101

i.LON SmartServer 2.0 Programming Tools User’s Guide 5 iLonSystemWbdEnd image on your SmartServer to iLonSystem, reboot the SmartServer, create a

Pagina 102 - {

176 Localizing the SmartServer Web Interface 8. A new COMMON<_language[_REGION] [_variant]>.properties file is added to the C/C++ Projects

Pagina 103 - Compiling an FPM

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

Pagina 104 - Using Non-Latin Characters

178 Localizing the SmartServer Web Interface a. Browse to the LonWorks\iLon100\images\iLon100 4.0<x> <Language>\web\nls\echelon direct

Pagina 105 - Debugging FPMs

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[

Pagina 106 - Using Wind River Workbench

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

Pagina 107

i.LON SmartServer 2.0 Programming Tools User’s Guide 181 8. The iLON Vision -Object – <Application> dialog opens. 9. Configure the applic

Pagina 108

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

Pagina 109

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

Pagina 110

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

Pagina 111

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

Pagina 112

ii Preface Echelon, i.LON, LON, LONWORKS, LonTalk, Neuron, LONMARK, 3120, 3150, LNS, LonMaker, and the Echelon logo are trademarks of Echelon Corpora

Pagina 113

6 Introduction just re-name the sample DLL file LicenseSecurity.dll; however, you are solely responsible for the creation of the security DLL file.

Pagina 114

186 Localizing the SmartServer Web Interface To create a new web/user/echelon/<language[_REGION] [_variant]> folder, follow these steps: 1.

Pagina 115

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

Pagina 116 - Using SNMP Support

188 Localizing the SmartServer Web Interface opens. Click New Site, the Edit Site dialog opens. Enter your SmartServer’s information, and then cli

Pagina 117

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

Pagina 118

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

Pagina 119 - ONWORKS network. It

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

Pagina 120 - FPM Deployment Overview

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

Pagina 121

i.LON SmartServer 2.0 Programming Tools User’s Guide 193 8. Expand SETUP to display its submenu items.

Pagina 122

194 Localizing the SmartServer Web Interface 9. Click Edit. The Navigation Subtree dialog opens. 10. In the Label box, translate SETUP to you

Pagina 123

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

Pagina 124

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

Pagina 125 - Deploying FPM Drivers

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

Pagina 126 - ONWORKS

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

Pagina 127

198 Localizing the SmartServer Web Interface • Lines 85–93 in this example correspond to the “Settings”, “Help”, and “Log Off” menus. Note that t

Pagina 128 - ONWORKS channel, and then

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

Pagina 129

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

Pagina 130

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\

Pagina 131

202 Localizing the SmartServer Web Interface 3. Click Login. The localized i.LON SmartServer 2.0 - Welcome Web page opens. 4. The menus, the

Pagina 132

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

Pagina 133

204 Appendix A - Programmer’s Reference Overview This chapter provides details you will need when programming your module. It includes the followi

Pagina 134 - Commissioning FPM Devices

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

Pagina 135 - Recommissioning FPM Devices

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

Pagina 136 - Connecting FPM Data Points

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

Pagina 137 - ONWORKS Connections

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,

Pagina 138

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

Pagina 139

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

Pagina 140

210 Appendix A - Programmer’s Reference { Note: You can use the NotifyOnAllUpdates() method modify so that the Changed()method checks whether any

Pagina 141 - Creating Web Connections

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

Pagina 142

212 Appendix A - Programmer’s Reference If the priority specified in the nPrioAuthority parameter is equal to or higher than the priority currentl

Pagina 143

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

Pagina 144

214 Appendix A - Programmer’s Reference SYNTAX const timespec GetDpPropertyAsTimeSpec(FPM::Dp::dataUCPTlastupdate) This method returns the UCPTlast

Pagina 145

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

Pagina 146

i.LON SmartServer 2.0 Programming Tools User’s Guide 9 fblock UFPTMath { in1 implements in1; in2 implements in2; out1 implements out1; } fbM

Pagina 147

216 Appendix A - Programmer’s Reference void SetDpProperty(FPM::Dp::dataUCPTAliasName, const char* const pszValue) The pszValue parameter specifie

Pagina 148

i.LON SmartServer 2.0 Programming Tools User’s Guide 217 EXAMPLE F1.SetDpProperty(FPM::Dp::cfgUCPTdefOutput, 100); SetDpProperty(persist) You can

Pagina 149

218 Appendix A - Programmer’s Reference External SmartServer Data Point Methods In an FPM application, you can use the List() method with a specifi

Pagina 150

i.LON SmartServer 2.0 Programming Tools User’s Guide 219 v.GetDpPropertyAsString(Dp::cfgUCPTname), v.GetDpPropertyAsString(Dp::cfgUCPTaliasName),

Pagina 151

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

Pagina 152 - Updating FPMs

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

Pagina 153 - Updating Device Interfaces

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

Pagina 154

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

Pagina 155

224 Appendix A - Programmer’s Reference if (m_oTimer1.lsRunning()) { //execute code } GetMode() You can use the GetMode()method to check the typ

Pagina 156

i.LON SmartServer 2.0 Programming Tools User’s Guide 225 extern "C" STATUS fnRebootSmartServer (int a_nBootFlag); #endif … void CUFPTma

Pagina 157

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

Pagina 158

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

Pagina 159

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

Pagina 160 - Licensing Overview

228 Appendix A - Programmer’s Reference int nBytesRead = ReadBytes(RS232_fd, rxBuf, MAX_RX_BYTE_SIZE); //check whether something h

Pagina 161 - ONMARK ID

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

Pagina 162

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()

Pagina 163 - Creating a Security DLL File

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

Pagina 164

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

Pagina 165

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

Pagina 166

234 Appendix A - Programmer’s Reference EXAMPLE The following example demonstrates an fopen()method that creates a new text file for writing and as

Pagina 167

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

Pagina 168

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

Pagina 169

236 Appendix A - Programmer’s Reference if((pFile = fopen(Filename,"a")) == NULL) { printf(“Can't open or create i.LON 100 file = %

Pagina 170 - Verifying the Lock ID

i.LON SmartServer 2.0 Programming Tools User’s Guide 237 Appendix B FPM Development and Deployment Checklist This checklist outlines the steps r

Pagina 171

238 Appendix B – FPM Development and Deployment Checklist 1. Create User-Defined Functional Profile Template (UFPT) NodeBuilder Resource Editor

Pagina 172 - Verifying the License Key

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

Pagina 173

240 Appendix B – FPM Development and Deployment Checklist à Use Adobe Contribute CS3 with i.LON Vision 2.0 toolkit to create custom FPM configurati

Pagina 174

i.LON SmartServer 2.0 Programming Tools User’s Guide 241 Appendix C FPM FAQ This FAQ answers common question related to FPMs. .

Pagina 175

242 Appendix D – i.LON SmartServer Software License Agreement SmartServer FPM FAQs 1. What are Freely Programmable Modules (FPMs)? FPMs are custom

Pagina 176

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

Pagina 177

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

Pagina 178 - Supplying FPMs to Customers

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

Pagina 179

12 Introduction 9. You can observe that the Data Point Variable Declarations section automatically includes DECLARE statements for each data point

Pagina 180

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

Pagina 181 - Interface

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

Pagina 182

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

Pagina 183

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

Pagina 184

250 Appendix D – i.LON SmartServer Software License Agreement void CUFPTfpmTempController::Initialize()] {] // Determine FB index by looking at one

Pagina 185

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

Pagina 186

www.echelon.com

Pagina 187

i.LON SmartServer 2.0 Programming Tools User’s Guide 13 void CUFPTMath::Work() { if (Changed(in1) || Changed(in2)) { out1 = in1 + in2; printf(&quo

Pagina 188

14 Introduction 3. The Install FPM Module dialog opens with the Deployment Settings window.

Pagina 189

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

Pagina 190

i.LON SmartServer 2.0 Programming Tools User’s Guide iii Table of Contents Preface ...

Pagina 191

16 Introduction 5. Expand the LonMark (XIF) folder, expand the root/lonworks/import/<YourCompany> folder, and then select the XIF for your Ma

Pagina 192

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

Pagina 193

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

Pagina 194

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

Pagina 195

20 Introduction d. Click OK. Two copies of the data point named “Copy of <DP name>” are added underneath the VirtFB functional block. Note

Pagina 196

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

Pagina 197

22 Introduction 14. Enter values for both the VirtFB/count1 and VirtFB/count2 points. Observe the following: • The Math Function/in1 and Math Fu

Pagina 198

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

Pagina 199 - Translating Property Files

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

Pagina 200

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

Pagina 201

iv Preface Using Include Directives...59 Example Model Files ...

Pagina 202

26 Installing i.LON SmartServer 2.0 Programming Tools 6. A dialog opens prompting to close all applications currently running on your computer. Cl

Pagina 203

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

Pagina 204

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

Pagina 205

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

Pagina 206

30 Installing i.LON SmartServer 2.0 Programming Tools 1. Browse to the LonWorks\iLON\Development\eclipse\workspace.fpm folder on your computer. Thi

Pagina 207

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

Pagina 208

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

Pagina 209

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

Pagina 210

34 Installing i.LON SmartServer 2.0 Programming Tools 2. Click C/C++ Build. 3. Click Manage Configurations. The Manage Configurations dialog op

Pagina 211

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

Pagina 212

i.LON SmartServer 2.0 Programming Tools User’s Guide v Updating Device Interfaces ...139 De

Pagina 213

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

Pagina 214

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).

Pagina 215

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

Pagina 216

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

Pagina 217 - FPM Programmer’s Reference

40 Installing i.LON SmartServer 2.0 Programming Tools

Pagina 218 - Routines

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

Pagina 219 - Work()

42 Creating FPM Templates Creating FPM Templates Overview Before you can begin writing an FPM, you need to create its user-defined functional profil

Pagina 220 - OnTimer()

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

Pagina 221 - FPM Driver

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

Pagina 222 - Methods

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

Pagina 223 - Changed()

vi Preface Internal FPM Data Point Methods...209 Changed()...

Pagina 224 - Propagate()

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

Pagina 225 - ResetPriority()

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

Pagina 226

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

Pagina 227

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

Pagina 228

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

Pagina 229

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

Pagina 230 - SetDpProperty(defOutput)

52 Creating FPM Templates Application Layer Interoperability Guidelines for more information about configuration property restriction flags. • con

Pagina 231 - UFPT Local Variables

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.

Pagina 232

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

Pagina 233

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

Pagina 234

i.LON SmartServer 2.0 Programming Tools User’s Guide vii Appendix C FPM FAQ ...

Pagina 235 - Timer Methods

56 Creating FPM Device Interface (XIF) Files Creating FPM Device Interface (XIF) Files Overview In order to deploy an FPM application on the SmartSe

Pagina 236 - Expired()

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.

Pagina 237 - IsRunning()

58 Creating FPM Device Interface (XIF) Files The type property corresponds to the standard or user-defined network variable type (SCPT or UCPT) use

Pagina 238 - Reboot Method

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

Pagina 239 - RS-232 Interface Methods

60 Creating FPM Device Interface (XIF) Files nviSetPoint implements nviSetPoint; nviTemp implements nviTemp; nvoAC_OnOff implements nvoAirCond

Pagina 240

i.LON SmartServer 2.0 Programming Tools User’s Guide 61 nviTemp implements nviTemp; nvoAC_OnOff implements nvoAirConditioner_OnOff; nvoFurna

Pagina 241

62 Creating FPM Device Interface (XIF) Files nciHeartbeat[0],nciOffline[0],nciThrottle[0],nciHysteresis[0] }; /////////////second FB array insta

Pagina 242

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:\

Pagina 243 - RS-485 Interface Methods

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

Pagina 244 - ONWORKS directory

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

Pagina 245

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

Pagina 246

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

Pagina 247 - File Access Methods

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

Pagina 248 - if(iTemp)

68 Creating Freely Programmable Modules Creating an FPM To create an FPM application or an FPM driver, follow these steps: 1. Expand the SmartSer

Pagina 249

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 ()

Pagina 250

70 Creating Freely Programmable Modules 5. Optionally, you can specify the project name and the location where the FPM project is to be stored

Pagina 251 - Checklist

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

Pagina 252

72 Creating Freely Programmable Modules 10. In the Data Point Variable Declarations section, located just below the namespace declaration, you ca

Pagina 253 - ONWORKS channel

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

Pagina 254

74 Creating Freely Programmable Modules Manually Importing Individual Data Point Declarations In the source file (.cpp extension) of your FPM, you

Pagina 255 - FPM FAQ

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

Pagina 256 - SmartServer FPM FAQs

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

Pagina 257

76 Creating Freely Programmable Modules SYNTAX DECLARE_FB_INSTANCE_LOCAL(dataType, variableName) EXAMPLE // <= section datapoint variable declar

Pagina 258

i.LON SmartServer 2.0 Programming Tools User’s Guide 77 //set initial data point values nviSetPoint = 0; nviTemp = 0; nciHystereis = -17

Pagina 259

78 Creating Freely Programmable Modules The following code demonstrates how to create repeating and one-time timers using the Start() method: CFPM_

Pagina 260

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

Pagina 261

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

Pagina 262

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

Pagina 263

82 Creating Freely Programmable Modules } } Reading Structured Data Points To read the value of a structured data point, you first need to store t

Pagina 264

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

Pagina 265

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

Pagina 266

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

Commenti su questo manuale

Nessun commento