Echelon i.LON SmartServer Guia do Utilizador

Consulte online ou descarregue Guia do Utilizador para Servidores Echelon i.LON SmartServer. Echelon i.LON SmartServer User`s guide Manual do Utilizador

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 266
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes

Resumo do Conteúdo

Página 1 - SmartServer 2.0

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

Página 2

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

Página 3 - Table of Contents

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

Página 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

Página 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-

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 22

104 Creating Freely Programmable Modules

Página 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

Página 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.

Página 25

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

Página 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

Página 27

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

Página 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

Página 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

Página 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.

Página 31

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

Página 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

Página 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

Página 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

Página 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

Página 36

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

Página 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

Página 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

Página 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

Página 40

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

Página 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

Página 42

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

Página 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

Página 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

Página 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

Página 46

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

Página 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

Página 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

Página 49

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

Página 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

Página 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

Página 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

Página 53

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

Página 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,

Página 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

Página 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

Página 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

Página 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

Página 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

Página 60

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

Página 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/<

Página 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

Página 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.

Página 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

Página 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

Página 66

144 Deploying Freely Programmable Modules on a SmartServer

Página 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

Página 68

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

Página 69

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

Página 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

Página 71

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

Página 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

Página 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

Página 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

Página 75

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

Página 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

Página 77

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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 84

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

Página 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

Página 86

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

Página 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

Página 88

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

Página 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

Página 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

Página 91 - Using the Start() Method

166 Creating FPM Application Licenses

Página 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

Página 93

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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 101

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

Página 102 - {

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

Página 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

Página 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

Página 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[

Página 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

Página 107

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

Página 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

Página 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

Página 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

Página 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

Página 112

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

Página 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.

Página 114

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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 121

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

Página 122

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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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\

Página 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

Página 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

Página 133

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

Página 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

Página 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

Página 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

Página 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,

Página 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

Página 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

Página 140

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

Página 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

Página 142

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

Página 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

Página 144

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

Página 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

Página 146

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

Página 147

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

Página 148

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

Página 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

Página 150

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

Página 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

Página 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

Página 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

Página 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

Página 155

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

Página 156

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

Página 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

Página 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

Página 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

Página 160 - Licensing Overview

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

Página 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

Página 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()

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 169

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

Página 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

Página 171

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

Página 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

Página 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

Página 174

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

Página 175

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

Página 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

Página 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

Página 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

Página 179

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

Página 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

Página 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

Página 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

Página 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

Página 184

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

Página 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

Página 186

www.echelon.com

Página 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

Página 188

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

Página 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

Página 190

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

Página 191

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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 201

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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 210

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

Página 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

Página 212

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

Página 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

Página 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).

Página 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

Página 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

Página 217 - FPM Programmer’s Reference

40 Installing i.LON SmartServer 2.0 Programming Tools

Página 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

Página 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

Página 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

Página 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

Página 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

Página 223 - Changed()

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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 230 - SetDpProperty(defOutput)

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

Página 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.

Página 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

Página 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

Página 234

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

Página 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

Página 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.

Página 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

Página 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

Página 239 - RS-232 Interface Methods

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

Página 240

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

Página 241

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

Página 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:\

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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 ()

Página 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

Página 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

Página 252

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

Página 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

Página 254

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

Página 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

Página 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

Página 257

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

Página 258

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

Página 259

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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Comentários a estes Manuais

Sem comentários