LNS Programmer's Guide Turbo Edition @echelon C o r p o r a t i o n 078-0177-01F
LNS Programmer's Guide viii LNS Licensing Considerations ...
LNS Programmer's Guide 86 Initialize the Object Server, create the network, and open the system. Makesure that your application is attached
LNS Programmer's Guide 872. You can now begin defining the devices and connections on your network. Fetch the Subsystems collection from th
LNS Programmer's Guide 88 properties for that template were not uploaded after another device with the same template was commissioned. The n
LNS Programmer's Guide 89Automatic Installation In the automatic installation scenario, an embedded network tool automates installation task
LNS Programmer's Guide 90 Initialize the Object Server andcreate the network. Make surethat the application has specifieda network interface
LNS Programmer's Guide 91Discovering and Installing Devices There are several main phases involved in the automatic installation scenario de
LNS Programmer's Guide 92 network database when your application receives the OnAttachment event. • Force the LNS Object Server to discover
LNS Programmer's Guide 93For a device to provide location information to the application, there must be some way for the device to know its
LNS Programmer's Guide 94 another subsystem before installing the device. Iterate through the AppDevices collection to find the device you w
LNS Programmer's Guide 954. For each device, start a transaction, and commission the device with the Commission() or CommissionEx() methods
LNS Programmer's Guide ixInstalling Devices With Multiple Channels...
LNS Programmer's Guide 96 each method. For more information on this, see System Management Mode Considerations on page 97. Discovering When
LNS Programmer's Guide 97When you discover that a physical device has been permanently removed from the network, you should remove the AppDe
LNS Programmer's Guide 98 addition, any changes that affect the configuration of devices that have not yet been commissioned are deferred un
LNS Programmer's Guide 99engineered mode. This will ensure that the configuration of the network is always synchronized with the information
LNS Programmer's Guide 100 Tracking System Management Mode Changes The system management mode is global and affects all clients that are acc
LNS Programmer's Guide 101• You should be aware that in some cases, remote Full client applications cannot open networks when the system ma
LNS Programmer's Guide 102
LNS Programmer's Guide 103 Chapter 6 - Network Management: Defining, Commissioning and Connecting Devices This chapter provides additional
LNS Programmer's Guide 104 Defining, Commissioning and Connecting Devices Chapter 5 of this document lists the tasks you need to perform whe
LNS Programmer's Guide 105• A device interface file may include information that is not included in the device itself, such as network vari
LNS Programmer's Guide x Data Source Options ...
LNS Programmer's Guide 106 4. Call the Import() method on the new DeviceTemplate object to import the device’s external interface file. You
LNS Programmer's Guide 107Table 6.1 Program ID Format Program ID Segment Description F This represents the format identifier. This will be
LNS Programmer's Guide 108 between different measurement systems, to provide alternate industry-specific measurement units, or to provide lo
LNS Programmer's Guide 109Scope Selector Scope Enumeration Scope Definition 0 lcaResourceScopeStandard Used for resource files containing
LNS Programmer's Guide 110 5 lcaResourceScopeMfgSubclass Used for resource files containing user definitions for all devices of a specified
LNS Programmer's Guide 111SFPTnodeObject implements two network variables: nviRequest of type SNVT_obj_request, and nvoStatus of type SNVT_o
LNS Programmer's Guide 112 Maintaining Device Interfaces With LNS The recommended way to manage your device interface and resource file sets
LNS Programmer's Guide 113Defining and Commissioning Devices This section describes the steps you need to take when installing and configuri
LNS Programmer's Guide 114 physical or logical segment of your network, and each Subsystem has its own AppDevices and Routers collections. T
LNS Programmer's Guide 1154. You should note that devices can be installed in multiple subsystems. You can use the AddReference() method to
LNS Programmer's Guide xiImplementing an LNS Device Plug-In ...
LNS Programmer's Guide 116 3. Assign the Neuron ID acquired in step 2 to the AppDevice object you created for the device whose service pin
LNS Programmer's Guide 117Find and Wink When it is impractical to activate a device’s service pin (for example, if the device is behind a wa
LNS Programmer's Guide 118 2. Get the AppDevices collection from this subsystem and iterate through the devices by index, using the Item pro
LNS Programmer's Guide 119foreground task. For more information, see the help page for the DiscoverDevices() method in the LNS Object Server
LNS Programmer's Guide 120 LonWorks\Import\Acme folder on the C: drive of the LNS Server PC. Application image files can also reside outside
LNS Programmer's Guide 121the device’s configuration as possible. These features are described in more detail later in the chapter. • If th
LNS Programmer's Guide 122 was created. If a DeviceTemplate and Channel were specified, the network address was assigned at that time. • E
LNS Programmer's Guide 123NOTE: As of LNS Turbo Edition, each DeviceTemplate object includes a DeviceValidation property. The DeviceValidati
LNS Programmer's Guide 124 Device Configuration Considerations Before commissioning a device, you should make sure that the configuration pr
LNS Programmer's Guide 125Configuring Devices Application devices have many different types of configuration information. This data can be r
LNS Programmer's Guide xii Initializing a Network ...
LNS Programmer's Guide 126 that template. The configuration property defaults are also defined for the DeviceTemplate, but the configuration
LNS Programmer's Guide 127To set unknown configuration property values, use one of the following two methods: • If the device is using a de
LNS Programmer's Guide 128 Writing Configuration Property Values You can also use LNS to read or write to the values of the configuration pr
LNS Programmer's Guide 129Note: If you are using an explicit transaction to install and configure a device, you must commit the transaction
LNS Programmer's Guide 130 return the expected and actual values of the device attributes tested. If a test fails, the AuxResultData propert
LNS Programmer's Guide 131notify some other component of your application to perform a thorough test on any suspect devices. For more guidel
LNS Programmer's Guide 132 Read the SelfTestResults property of a LonMarkObject toperform a self-test on the LonMarkObject:Dim MyObjectStatu
LNS Programmer's Guide 133application configuration data, it might also be necessary to set the configuration properties of the new device t
LNS Programmer's Guide 134 automatically. However, you may need to manually replace your Network Service Device in some cases. You will need
LNS Programmer's Guide 1351. Call the System object's StartTransaction() method. You should always call the Upgrade() method within a t
LNS Programmer's Guide 1Chapter 1 - Installing the LNS Software This chapter describes how to install the LNS Turbo Edition software.
LNS Programmer's Guide 136 assigned to the external interface component represented by this UpgradeIndo object in the external interface aft
LNS Programmer's Guide 137Moving Devices and Managing Networks With Multiple Channels If you are managing a network with multiple channels,
LNS Programmer's Guide 138 device was associated with accordingly, but will not signal an error if the device itself cannot be communicated
LNS Programmer's Guide 139Network variable selectors are 14-bit numbers assigned by the LNS Object Server that identify connected network va
LNS Programmer's Guide 140 nviValuenvi_NV1Device OneDevice ThreeDevice TwonviTempnviTemp2Hub Network VariableTarget Network VariablesDevice
LNS Programmer's Guide 141entries must be defined when the application is created by the device manufacturer, and are located in non-volatil
LNS Programmer's Guide 142 • The msg_in tag always acts as an input only. • If there is only one declared message tag in a connection, it
LNS Programmer's Guide 143Modifying Connections This section describes how to add members to a connection, remove members from a connection,
LNS Programmer's Guide 144 Mirrored Connections LNS allows network variables to participate in multiple connections. As a result, it is poss
LNS Programmer's Guide 145collection objects, they may be searched by name or by index. The use of these collections is discouraged for larg
LNS Programmer's Guide 2 System Requirements System requirements and recommendations for the PC on which the LNS Application Developer’s Kit
LNS Programmer's Guide 146 Repeat count Calculated based on topology and service type. Repeat timer Calculated based on topology and servi
LNS Programmer's Guide 147 Chapter 7 - Network Management: Optimizing Connection Resources This chapter describes advanced topics you may
LNS Programmer's Guide 148 Using Custom Connection Description Templates As described in Chapter 6, the LNS Object Server provides connectio
LNS Programmer's Guide 1492. Set the properties of the ConnectDescTemplate object, as described in step 2 of the procedure in the previous
LNS Programmer's Guide 150 Property Description BroadcastOptions This property determines whether LNS will use group or broadcast addressing
LNS Programmer's Guide 151Property Description ServiceType This property allows you choose from the following messaging services: Acknowledg
LNS Programmer's Guide 152 Network Design Time When designing a network, you should seek to achieve the most reliable solution, with the mos
LNS Programmer's Guide 153network variable. This can be used to avoid joining or creating groups, as shown in figures 7.1 and 7.2 later in t
LNS Programmer's Guide 154 Node 1Node 2Node 3Node 1Node 2Node 3 Figure7.1 Monitoring as member of a group Figure 7.2 Monitorin
LNS Programmer's Guide 155AliasOptions Values BroadcastOptions Values lcaAliasForSelectorConflicts lcaAliasForUnicasts lcaBroadcastGroup If
LNS Programmer's Guide 3like any other Windows program, e.g. by selecting the Run... item from the Start menu of the Windows task bar, brows
LNS Programmer's Guide 156 DGCAEFHJBRTSU Figure 7.3 Ceiling Lighting With Occupancy Sensors And Connections Assuming each occupancy detector
LNS Programmer's Guide 157unicast connections will be processed as separate transactions, causing more network traffic than a single multica
LNS Programmer's Guide 158 propagates all outgoing packets using domain broadcast addressing, the device only needs one address table entry
LNS Programmer's Guide 159these pools can typically be overcome by allowing other types of resources to be consumed. For example, group IDs
LNS Programmer's Guide 160 StartUnicast?Use acknowledged service with the transportproperties set to their default values. Set theAliasOptio
LNS Programmer's Guide 161Conclusion Your LNS application should manage LONWORKS connections transparently, creating reliable connections wi
LNS Programmer's Guide 162
LNS Programmer's Guide 163 Chapter 8 - Network Management: Advanced Topics This chapter describes advanced network management topics such a
LNS Programmer's Guide 164 Managing Network Service Devices This section describes special tasks you may need to perform when managing the N
LNS Programmer's Guide 1653. Call PreMove() on the AppDevice. When you call PreMove(), you must specify the destination channel as the newCh
LNS Programmer's Guide 4 3. This opens the Welcome window. Click Next to continue. 4. This opens the License Agreement window. Read the li
LNS Programmer's Guide 166 You should note that when a Full client application opens a system using the Networks collection (as opposed to t
LNS Programmer's Guide 167To re-associate a client with the correct network service device and re-attach the client to the network, follow t
LNS Programmer's Guide 168 networks, so that each network can maintain its private media status while sharing a physical TCP/IP connection.
LNS Programmer's Guide 169background discovery by setting DiscoveryInterval property to 0. This is done automatically when the InstallOptio
LNS Programmer's Guide 170 from traffic that has to span multiple channels, which allows more effective use of available bandwidth. • You w
LNS Programmer's Guide 171Channel 1Channel 2RouterRouterChannel 3RouterChannel 4 Figure 8.1 A Network with Multiple Channels A LONWORKS rou
LNS Programmer's Guide 172 As of LNS Turbo Edition, LNS does not support defining or modifying a router as a learning router. If an applica
LNS Programmer's Guide 173When LNS discovers a router, it will automatically create a channel for the far side, and will choose an existing
LNS Programmer's Guide 174 which are connected by a permanent bridge. 3. The final rule allows for redundant routing when using configured
LNS Programmer's Guide 175document. Each Subsystem has a Routers collection containing the Router objects that represent your network’s rout
LNS Programmer's Guide 5 Chapter 2 - What’s New in Turbo Edition This chapter introduces the new features that have been added to LNS for T
LNS Programmer's Guide 176 allocate a logical address, compute routing tables, and calculate connection timers for the device. When the devi
LNS Programmer's Guide 177Resolving Installation Failures There are a few cases where attempts to register, add, or commission a device on a
LNS Programmer's Guide 178 3. Call PreMove() on the device selected in step 2. You must specify the new channel for the device with the newC
LNS Programmer's Guide 179break communication between the LNS Server and a remote Full client, the NS#182 lcaErrNsInsufficientRtrsForNsi exc
LNS Programmer's Guide 180 MainInterfaceCustomInterface #1CustomInterface #2CustomInterface #3FBsNVsFBsNVsFBsNVsFBsNVsCPs Figure 8.4 Device
LNS Programmer's Guide 181Property Description MaxNVSupported This property specifies the maximum number of network variables (static or dyn
LNS Programmer's Guide 182 and message tags to the new Interface as you desire, provided that the device supports them. For more information
LNS Programmer's Guide 183Configuring LonMark Functional Blocks You can assign existing dynamic network variables to dynamic LonMark Functio
LNS Programmer's Guide 184 Set MyNewTag = MyMessageTags.Add(“newName”) 4. For information on using message tags and message monitor points
LNS Programmer's Guide 185MoveToInterface() method to move a dynamic network variable from the main interface to a custom interface. Once yo
Echelon, LON, LONWORKS, NodeBuilder, LonTalk, Neuron, LONMARK, LNS, LonBuilder, LonUsers, BeAtHome, LonManager, 3120, 3150, LonPoint, Digital Home,
LNS Programmer's Guide 6 Performance Enhancements For Turbo Edition, numerous internal changes have been made that will significantly improv
LNS Programmer's Guide 186 the Index, Length, and ObjectType properties of the TypeSpec object. If LNS is unable to find the resource file f
LNS Programmer's Guide 187network variable they apply to. For example, configuration properties for default, minimum, or maximum values are
LNS Programmer's Guide 188
LNS Programmer's Guide 189 Chapter 9 - Monitor and Control This chapter describes the LNS features you can use to monitor and control the d
LNS Programmer's Guide 190 Introduction to Monitor and Control By definition, device applications only have a local view of the network. The
LNS Programmer's Guide 191to the value of the network variable, without creating a monitor point to represent the network variable. This cha
LNS Programmer's Guide 192 Section Description Using Configuration Properties In a Monitor and Control Application In some cases, you may wa
LNS Programmer's Guide 193Use permanent monitor sets when you need to create monitor points that will be used often, or in multiple client s
LNS Programmer's Guide 194 on the UseBoundUpdates property, see The Implicit Bound Network Variable Monitoring Scenario on page 220. Creatin
LNS Programmer's Guide 195NvOptions property, the MsgOptions property, and the Tag property. You can use the NvOptions property, and the Msg
LNS Programmer's Guide 7• Enhanced LonMark Interoperability • Improved Device Commissioning Performance • System Management Mode Enhancem
LNS Programmer's Guide 196 3. Get the network variable(s) you will be monitoring: Set MyInterface = MyAppDevice.Interface Set MyNVs = MyInt
LNS Programmer's Guide 197Adding Message Monitor Points to a Monitor Set Each MonitorSet object contains a MsgMonitorPoints property. The Ms
LNS Programmer's Guide 198 6. Get the monitor set you will use to monitor the messages. You should have first created a monitor set for thi
LNS Programmer's Guide 1994. Get the device that you plan to send explicit messages to with the new message monitor point. Set MySubsystem
LNS Programmer's Guide 200 Setting Monitoring Options Each MonitorSet object, and each individual MsgMonitorPoint and NvMonitorPoint object,
LNS Programmer's Guide 201If you do not want a monitor point to use those default options during a particular monitoring session, you can ch
LNS Programmer's Guide 202 3. When a monitor set is opened, each network variable monitor point in the set will use the default options est
LNS Programmer's Guide 203Table 9.2 NvMonitorOptions Object Property Name Description Authentication This property is not used. If the UseB
LNS Programmer's Guide 204 Property Name Description Priority This property determines whether or not priority messaging will be used when
LNS Programmer's Guide 205Property Name Description ResetPollingIfUpdated Use this property to determine whether or not the poll interval f
LNS Programmer's Guide 8 such as language, measurement system (U.S. or Systeme Internationale), date formats, time formats, and decimal numb
LNS Programmer's Guide 206 Property Name Description ServiceType This property determines the default messaging service to use when explici
LNS Programmer's Guide 207Property Name Description SuppressPollingIfBound This property determines if polling will be turned off for monit
LNS Programmer's Guide 208 Property Name Description UseBoundUpdates If set to True, this property enables implicit binding. With implicit
LNS Programmer's Guide 209monitor point’s FilterCode property. Set MsgMonitorPointOptions =_ MyMsgMonitorPoint.DefaultOptions Msg
LNS Programmer's Guide 210 Table 9.3 MsgMonitorOptions Object Property Name Description Authentication This property determines whether aut
LNS Programmer's Guide 211Property Name Description Priority This property determines whether or not priority messaging will be used when s
LNS Programmer's Guide 212 Property Name Description Retries This determines the number of retries to use for acknowledged, request/respons
LNS Programmer's Guide 213Opening and Enabling Monitor Sets After you have created a monitor set and defined its monitoring options, you can
LNS Programmer's Guide 214 You can also call the Disable() method on a specific NvMonitorPoint or MsgMonitorPoint object. This will override
LNS Programmer's Guide 215method is most efficient if network variable values need to controlled individually, or if they need to be written
LNS Programmer's Guide 9Changeable Network Variable Types Each NetworkVariable object contains a new property called the ChangeableTypeSuppo
LNS Programmer's Guide 216 Example of Explicitly Reading a Network Variable Monitor Point To recap the previous discussion, follow these ste
LNS Programmer's Guide 2172. Acquire a DataPoint object to use to write the value of the network variable monitor point. Then, set the value
LNS Programmer's Guide 218 To recap this discussion, make sure that you follow these steps when using the polled network variable monitoring
LNS Programmer's Guide 219When you design such a monitoring application, you should bear in mind that the network’s primary focus is on the
LNS Programmer's Guide 220 ByVal nvMonitorPoint As Object, _ ByVal dataPoint As Object, _ ByVal srcAddress As Object) If nvMon
LNS Programmer's Guide 2214. Enable the monitor set, as described in Opening and Enabling Monitor Sets on page 213. Once implicit bound mon
LNS Programmer's Guide 222 Remote DisplayDeviceControl DevicenvoSettingnvoSetPointTarget Network VariablesLNS ApplicationPCnviInput Figure 9
LNS Programmer's Guide 223connected to an input on another device. However, this is usually not the appropriate setting for a fan-out connec
LNS Programmer's Guide 224 4. You can now control the input network variables on the network by writing to the host network variable on the
LNS Programmer's Guide 225Monitoring Message Monitor Points The first step to take when monitoring application messages is to explicitly con
LNS Programmer's Guide 10 imported, or from the device’s self-documentation when it uploads the device’s device template. In LNS, an applica
LNS Programmer's Guide 226 To monitor messages that begin with a specific message code, set the FilterByCode monitoring options property to
LNS Programmer's Guide 227Private Sub lcaObjectServer_OnMsgMonitorPointUpdateEvent( _ ByVal msgMonitorPoint As Object, _ UpdateType As I
LNS Programmer's Guide 228 connected to the PC running the application. Independent client applications read and write data directly to and
LNS Programmer's Guide 2293. Call the Advise() method on the MsgMonitorPoint object you want to monitor. Specify the COM object created in s
LNS Programmer's Guide 230 3. Call the Advise() method on the network variable monitor point you want to monitor. Specify the COM object cre
LNS Programmer's Guide 231with the configuration currently stored in the devices, even if database changes have been made subsequently while
LNS Programmer's Guide 232 Set MyInterface = MyAppDevice.Interface Set MyVariables = MyInterface.NetworkVariables Set MyNV = MyVariables.Ite
LNS Programmer's Guide 233names defined for the SNVT_defr_term type, such as DFT_TERM_LAST, to the FormattedValue property of the DataPoint.
LNS Programmer's Guide 234 properties when it is absolutely necessary. For an overview of configuration property access performance, see Per
LNS Programmer's Guide 235property values to the device, call the DownloadConfigProperties() method with the lcaConfigPropOptLoadValues and
LNS Programmer's Guide 11Service Device that specifies the new dynamic message tag as the monitor target. Then, open the monitor set and use
LNS Programmer's Guide 236 ConfigProperty is not an array, specify 0 as the index parameter. The second parameter is the options element. Th
LNS Programmer's Guide 237Table 9.4 Data Source Options Value Description lcaDataSourceOptionsNormal If you use this option to create a D
LNS Programmer's Guide 238 Value Description lcaDataSourceOptionsTypeDefaultValue If you use this option to create a DataPoint, or if you se
LNS Programmer's Guide 239The DownloadConfigProperties() and UploadConfigProperties() generally affect all the configuration properties on a
LNS Programmer's Guide 240 Performance Considerations The performance of the monitoring application when reading configuration properties fr
LNS Programmer's Guide 241If a configuration property is implemented using a configuration network variable, the monitoring performance for
LNS Programmer's Guide 242 resource file. See Chapter 6 for more detailed information on program IDs and scope selectors. The FormatSpec obj
LNS Programmer's Guide 243Table 9.5 FormatSpec Object Properties Property Description AltFormatName This property contains an indexed list o
LNS Programmer's Guide 244 Property Description UnitsAdder This property indicates the value that should be added to the raw value of the da
LNS Programmer's Guide 245the PC running your application. The default settings may vary, depending on which operating system is installed o
LNS Programmer's Guide 12 lcaMgmtModePropagateConfigUpdates (note that prior to LNS Turbo Edition, this was lcaOnNet) and the Network Servic
LNS Programmer's Guide 246 Table 9.6 lists the various properties of the FormatLocale object, and describes how they affect the display of d
LNS Programmer's Guide 247Property Description ListSeparatorCharacter ListSeparatorCharacterSource The ListSeparatorCharacter property deter
LNS Programmer's Guide 248 lcaFormatLocaleSourceManualSetting(2) value. Consult the LNS Object Server Reference for more information on thes
LNS Programmer's Guide 249Chapter 10 - LNS Database Management This chapter provides information you will need when managing your LNS databa
LNS Programmer's Guide 250 Overview of LNS Databases As described in Chapter 3, the LNS Server maintains two types of databases: the LNS gl
LNS Programmer's Guide 251Backing Up Network Databases The ability to backup and restore an LNS database is a critical requirement for most
LNS Programmer's Guide 252 MyNetwork.Backup(“C:\MyBackupDBs\” & MyNetwork.Name) You can use this method to backup a network database at
LNS Programmer's Guide 253 Figure 10.1 LNS Database Validation Tool To start a database validation, follow these steps: 1. Open the LNS Dat
LNS Programmer's Guide 254 Table 10.1 lists the properties of the DatabaseValidationReport object. See the LNS Object Server Reference help
LNS Programmer's Guide 255recommends that you perform the database validation while a minimal number of client applications are connected to
LNS Programmer's Guide 13points to the host PC. However, you can still connect network variables to your Network Service Device using explic
LNS Programmer's Guide 256 3. Close the system. This detaches the Object Server from the network and shuts down the LNS Object Server. MySy
LNS Programmer's Guide 257(.BMP extension), and source files (.NC, .C and .H extensions). It is also a good idea to reinstall plug-in softwa
LNS Programmer's Guide 258 a function of the number of devices, network variables, channels, and connections. • Network recovery only recov
LNS Programmer's Guide 259• The recovery process has no way of determining what network variables are hubs, and what network variables are
LNS Programmer's Guide 260 Performing a Network Recovery To recover a network database, you can use the LNS Database Recovery Wizard. The wi
LNS Programmer's Guide 2617. Optionally add objects, set properties, and call methods. This includes defining DeviceTemplate objects, and s
LNS Programmer's Guide 262 During the recovery process, the LNS global database will be locked to prevent accidental modification while reco
LNS Programmer's Guide 263ConfigProperties collection of the AppDevice for a ConfigProperty object with the TypeIndex property set to 17 (SC
LNS Programmer's Guide 264
LNS Programmer's Guide 265Chapter 11 - LNS Network Interfaces This chapter describes how to configure the various network interfaces you can
LNS Programmer's Guide 14 necessary if you have recently re-imported a device’s external interface file, or if you have used the ResyncToRes
LNS Programmer's Guide 266 Network Interfaces Overview Each Network Service Device contains a network interface. The Network Service Device
LNS Programmer's Guide 267Windows plug-and-play standard. This hardware may be used as an LNS high performance network interface by selectin
LNS Programmer's Guide 268 Power Line SLTA The Power Line SLTA is an EIA-232 compatible serial device that allows any PC with an EIA-232 in
LNS Programmer's Guide 269The following section describes some of the other differences in behavior between standard network interfaces and
LNS Programmer's Guide 270 Most standard network interfaces can only support a single outstanding transaction at a time. This means that in
LNS Programmer's Guide 271You should note that if a high performance network interface is replaced with another high performance network int
LNS Programmer's Guide 272 In Figure 11.1, the LNS Server is using xDriver to connect to two i.LON 10 Ethernet Adapters. The OpenLDV xDriver
LNS Programmer's Guide 273LNS Application and LNS Server PCLONWORKS/IP (LAN, WAN)LONWORKSDeviceLONWORKSDeviceLONWORKSDeviceLONWORKSDeviceEch
LNS Programmer's Guide 274 LNS does not include external interface files for Network Service Devices. However, it does create default Device
LNS Programmer's Guide 275Table 11.1 Network Service Devices Program ID Usage 90000010103800000 Used when the Network Service Device uses a
LNS Programmer's Guide 15channel. In this case, you can modify the DeviceValidation property to bypass parts of the validation process, and
276 LNS Programmer's Guide
LNS Programmer's Guide 277Chapter 12 - Director Applications and Plug-Ins This chapter discusses the standards and development methodology f
LNS Programmer's Guide 278 Introduction to the LNS Plug-In Model All LNS applications achieve a level of interoperability by using the commo
LNS Programmer's Guide 279downloaded from Echelon’s website at http://www.echelon.com/. You should consult this manual before developing an
LNS Programmer's Guide 280 Registering Plug-In Commands in the Windows Registry Registration commands for plug-ins must also be registered i
LNS Programmer's Guide 281To accomplish these tasks, the LNS director application must have access to the Windows Registry, to the LNS Objec
LNS Programmer's Guide 282 This will release the reference to the plug-in, and will therefore stop the director from accessing the plug-in a
LNS Programmer's Guide 283 Figure 12.1 LNS Plug-Ins and the Windows Registry Note that the default value for each plug-in listed in the Plug
LNS Programmer's Guide 284 • If a ComponentApp object that relates to the current plug-in (stored in the Windows Registry as the registered
LNS Programmer's Guide 285In other cases, specifically for cases where no or multiple plug-ins have been marked as the default provider, the
LNS Programmer's Guide i Preface The LNS® network operating system provides a comprehensive set of software tools that allows multiple netw
LNS Programmer's Guide 16 LNS Turbo Edition also includes a new option (lcaReplaceFlagPropagateUpdates) for the ReplaceEx() method, which yo
LNS Programmer's Guide 286 ObjectServerComponentAppSystemComponentAppSubsystemAppDeviceDeviceTemplateComponentAppInterfaceLonMarkObjectCompo
LNS Programmer's Guide 287The SendCommand() method and related properties are detailed in the How Plug-Ins Work - The Details section in the
LNS Programmer's Guide 288 Implementing an LNS Plug-In An LNS plug-in is implemented as an ActiveX automation server. In Visual Basic, this
LNS Programmer's Guide 289 Chapter 13 - LNS Licensing This chapter describes the LNS licensing mechanism, including how LNS applications re
LNS Programmer's Guide 290 Overview of LNS Licensing and Distribution The LNS licensing model is based on LNS Device Credits. Each LNS Serve
LNS Programmer's Guide 291minimum purchase requirements, with the Echelon Software License Generator product separately available from Echel
LNS Programmer's Guide 292 and begins tracking the number of deficit credits. For more information on the OnLicenseEvent event, see Tracking
LNS Programmer's Guide 293credits are in use, and therefore there is no time limit. The special value of 254 indicates that the application
LNS Programmer's Guide 294 • LIC_DEFICIT: A credit or debit has been charged, and the number of licensed LNS Device Credits has been exhau
LNS Programmer's Guide 295RestoreLicense() method is called with the wasLNS parameter set to False, the LNS Server will debit LNS Device Cre
LNS Programmer's Guide 17of an entire network database, and report any errors or inconsistencies it discovers. It can optionally repair some
LNS Programmer's Guide 296 Figure 13.1 LNS Server License Wizard 2. This window contains the current license status of the PC running the
LNS Programmer's Guide 297 Figure 13.2 Order Processing Window. 3. The order processing window contains the information you need to provide
LNS Programmer's Guide 298 Figure 13.3 Upgrade Completion Window. Using the LNS Server License Transfer Utility You can use the LNS Server
LNS Programmer's Guide 299 Figure 13.4 Transfer Step Selection Window 2. There are three tasks you will perform with this window. Select th
LNS Programmer's Guide 300 Figure 13.5 Shared Drive Selection Window 3. Select the drive to act as the transfer location from the pull-dow
LNS Programmer's Guide 301Chapter 14 – Distributing LNS Applications This chapter describes how you should redistribute your LNS application
LNS Programmer's Guide 302 Distributing LNS Applications If you are using the LNS Application Developer’s Kit, you can distribute your LNS a
LNS Programmer's Guide 3031. Click Next to begin using the utility. This opens the dialog shown in Figure 14.2. Figure 14.2 Redistributabl
LNS Programmer's Guide 304 Figure 14.3 Redistributable Selection Dialog 3. Figure 14.3 illustrates the redistributable selection window. S
LNS Programmer's Guide 305 Figure 14.4 Initial Credit Selection Dialog 4. The LNS Redistributable Maker can allocate a number of LNS Device
LNS Programmer's Guide 18 collection. You may not want the application to copy every extension record stored in the object. You can use this
LNS Programmer's Guide 306 Figure 14.5 Select Setup Package Destination Folder Dialog 5. Specify the location of the setup packages that a
LNS Programmer's Guide 307not need to use setup.exe, and should use the simpler _SetupLNS.dll, as described in the following sections. The s
LNS Programmer's Guide 308 Once the LONWORKS path key has been created, you cannot modify it to point to an alternate folder. If the LONWORK
LNS Programmer's Guide 309The statement, “The setup cannot continue” may be confusing to the users of your installation, even if you ignore
LNS Programmer's Guide 310 The LNS Application Developer’s Kit and LNS Server Edition products both install the version 3 Microsoft XML Pars
LNS Programmer's Guide 311Property Description DLL Filename <PATH_TO_HELPERDLLS>\_SetupLNS.dll Install Execute Sequence <Absent fro
LNS Programmer's Guide 312 In order to find the LNS runtime installation files when the Custom Action is called, the _SetupLNS.dll makes the
LNS Programmer's Guide 313 Chapter 15 - Advanced Topics This chapter addresses a number of advanced topics that are not described in the pr
LNS Programmer's Guide 314 File Transfer Each System object contains a FileTransfer object. This object represents a LonMark file transfer s
LNS Programmer's Guide 315Dim fileBuffer as Variant Dim byte1 as Byte fileBuffer = MyFileTransfer.ReadFile() byte1 = fileBuffer(1) The ReadF
LNS Programmer's Guide 19Interface Compatibility LNS follows the Microsoft COM interface guidelines for maintaining interface compatibility.
LNS Programmer's Guide 316 should never be updated, as this defines the application interface. The configuration property value file must be
LNS Programmer's Guide 317application should provide feedback and the ability to cancel operations. For example, when displaying a list box
LNS Programmer's Guide 318 Registering a Mobile Application Mobile network tools should set the PingClass property of their NetworkServiceDe
LNS Programmer's Guide 319functions will be executed by an internal LNS thread, as opposed to the thread that instantiated the Object Server
LNS Programmer's Guide 320 NOTE: LNS uses an optimized memory allocator that manages its own local heap. This allocator holds most memory th
LNS Programmer's Guide 321Dim MySubsystems As LcaSubsystems Dim MySubsystem As LcaSubsystem Dim MyDevices As LcaAppDevices Dim MyBuzzer As L
LNS Programmer's Guide 322 Echelon strongly recommends the exclusive use of early binding techniques. Note that LNS director applications ma
LNS Programmer's Guide 323 Appendix A - Deprecated Methods and Obsolete Files This appendix lists LNS methods, properties and objects that
LNS Programmer's Guide 324 Deprecated Methods, Objects, Properties and Events As of LNS Turbo Edition, some methods, objects, properties and
LNS Programmer's Guide 325Build Method (U) CloseComponent Method (U) Export Method (AppDevice and DeviceTemplate Objects) (U) GetElement Met
LNS Programmer's Guide 20 LNS Turbo Edition servers and clients do not interoperate with clients and servers of other LNS versions. When upd
LNS Programmer's Guide 326 DsService Property (BA) DsUseBoundUpdates Property (BA) DynamicNvPersistenceMode Property (BA) ExportDirectory Pr
LNS Programmer's Guide 327Table A.2 Obsolete Application Developer’s Kit Files Installation Directory File Name <LNSDIR>\import Actu
LNS Programmer's Guide 328
LNS Programmer's Guide 329 Appendix B – LNS, MFC and ATL This section provides information you may find useful when using LNS with MFC and A
LNS Programmer's Guide 330 LNS, MFC and ATL Versions 6.0 and higher of Microsoft Visual C++ offer two ways to import the interfaces exposed
LNS Programmer's Guide 331Object Server and also advise for LNS Object Server events. This code is included in the LNSMonitorCtrl.cpp file i
LNS Programmer's Guide 332 lca::lcaEventIdNvMonitorPointEvent, OnNvMonitorPointEvent, &O
LNS Programmer's Guide 3332. Select the Projects tab on the dialog that opens, and select MFC AppWizard (exe). Then, enter a project name an
LNS Programmer's Guide 334 Figure B.1 Visual C++ Toolbox Drag this new icon anywhere onto the empty dialog mentioned in step 4. 10. Right-
LNS Programmer's Guide 3351. Open the lcaobjsv3.h file. From the Edit menu, select Replace. In the Find what field, enter “ILca.” Note that
LNS Programmer's Guide 21Common exception codes for particular methods can and should be handled specially to provide more guidance to your
LNS Programmer's Guide 336
LNS Programmer's Guide 337Appendix C – LNS Turbo Edition Example Application Suite This appendix provides an overview of the example applic
LNS Programmer's Guide 338 LNS Turbo Edition Example Application Suite LNS Turbo Edition features several example applications you will find
LNS Programmer's Guide 339 Figure C.1 Example Network Management Application The following sections describe how you can use this dialog, an
LNS Programmer's Guide 340 In addition, the Network Name drop-down box will list all networks accessible by your application as soon as you
LNS Programmer's Guide 341device configuration updates to the network. This allows devices, dynamic network variables, and network variable
LNS Programmer's Guide 342 in Figure C.2, the Lamp_02, Lightswitch_01 and Thermostat_03 devices all belong to the 111 Main.First Floor.Bathr
LNS Programmer's Guide 343• Set device template defaults from device • Upload value set to unknown in the LNS database • Set all configur
LNS Programmer's Guide 344 Item Description Diagnose Button This command exposes the following network management tasks of the AppDevice or
LNS Programmer's Guide 345Table C.2 Example Network Management Application Task GUI Code LNS Interface Code Initialize and open the LNS Ob
LNS Programmer's Guide 22 be compatible with a previous implementation. However, in this release, the DataPoint object provides new function
LNS Programmer's Guide 346 Task GUI Code LNS Interface Code Creating connections between devices. CLcaNetMgmtHelper::CreateNetworkVariabl
LNS Programmer's Guide 347 Figure C.3 Example Monitor and Control Application The following section describes how you can use this dialog, a
LNS Programmer's Guide 348 1. Close the monitor and control application, and launch the network management application from the client PC.
LNS Programmer's Guide 349names of all networks in the Networks, RemoteNetworks or VNINetworks collections, as dictated by the client type s
LNS Programmer's Guide 350 7. If you clicked the Temporary Monitor Set button in step 6, a dialog with a tree view of the AppDevice objects
LNS Programmer's Guide 351Task GUI Code LNS Interface Code Use of the Tag property for “pigeon-holing” data values CLcaMonitorHelper::Cre
LNS Programmer's Guide 352 Figure C.5 Example Director Application Dialog To use the example director application, select the network you w
LNS Programmer's Guide 353The System Registered list shows the names of the plug-in applications that have been registered for use with the
LNS Programmer's Guide 23Server installer will be available to LNS customers on the Echelon web-site, and on the LNS Application Developer’s
LNS Programmer's Guide 24 circumstances will LNS write a constant device-specific configuration property to a device unless the configuratio
LNS Programmer's Guide 25and the value of the SCPTnvType configuration property will be updated to inform the device of the network variable
LNS Programmer's Guide ii Purpose This guide describes how to use the LNS Object Server ActiveX Control to develop an LNS application on a M
LNS Programmer's Guide 26 Security New security features have been added to LNS since Release 3.0 to protect against unwanted access to sens
LNS Programmer's Guide 27Chapter 3 - LNS Overview This chapter provides an overview of the LNS network operating system. It introduces the
LNS Programmer's Guide 28 Introduction to LNS LONWORKS Network Services (LNS) is the control networking industry's first multi-client n
LNS Programmer's Guide 29be anything from a remote monitoring station, to an installation laptop PC using wireless networking. Each client t
LNS Programmer's Guide 30 the network device represented by the object. This is described in more detail later in the chapter. LNS leverages
LNS Programmer's Guide 31 Local Client Application(s)LNS ServerLNS GlobalDatabaseLNS Network DatabaseNetwork 1LNS Network DatabaseNetwork 2L
LNS Programmer's Guide 32 Applications access the services provided by the LNS Server using the LNS Object Server. The LNS Object Server is
LNS Programmer's Guide 33Because subsystems are logical divisions of a network, and devices can belong to multiple logical divisions, you ca
LNS Programmer's Guide 34 SystemTemplateLibraryInterfaceChannelNetworkServiceDeviceComponentApp Extension NetworkInterfaceDeviceTemplateSubn
LNS Programmer's Guide 35Network Service Devices You will notice in Figure 3.3 that each Network object includes a collection of NetworkServ
LNS Programmer's Guide iiiDevelopment System The following requirements are for the PC on which the LNS Application Developer’s Kit or LNS R
LNS Programmer's Guide 36 LNS Network Services The primary purpose of the LNS network operating system is to simplify the performance of net
LNS Programmer's Guide 37• LonMark object access • Receiving service pin messages • Data formatting based on standard and user-defined re
LNS Programmer's Guide 38 An application that accesses the LNS Server remotely can do so as a Lightweight Client or as a Full Client. A Ligh
LNS Programmer's Guide 39LNS Application and LNS Server PCLONWORKS ChannelLONWORKSDeviceLONWORKSDeviceLONWORKSDeviceLONWORKSDeviceLONWORKSDe
LNS Programmer's Guide 40 connection to the LNS Server and the data monitoring and control are through the TCP/IP connection. On some PCs, i
LNS Programmer's Guide 41Lightweight Client applications, or the LNS Server PC. Therefore network variables, connections and monitor sets de
LNS Programmer's Guide 42 convenience, Table 3.1 lists the remaining chapters of this document, and summarizes their contents. You should no
LNS Programmer's Guide 43Table 3.1 LNS Programmer’s Guide Document Roadmap Chapter Description Chapter 4, Programming an LNS Application Thi
LNS Programmer's Guide 44 Chapter Description Chapter 11, LNS Network Interface Devices This chapter describes the various network interface
LNS Programmer's Guide 45 Chapter 4 - Programming an LNS Application This chapter describes the steps you will need to follow when initiali
LNS Programmer's Guide iv LNS Server PC for a Larger, Busier Network These requirements and recommendations are also valid for a PC on which
LNS Programmer's Guide 46 Programming an LNS Application This chapter describes the tasks you need to follow when initializing an LNS applic
LNS Programmer's Guide 47Once the tool is part of the Visual Basic tool palette, you can add the LNS Object Server to an application by sele
LNS Programmer's Guide 48 2. Drag the Object Server control onto one of your application’s dialogs. 3. Change the control’s resource ID, a
LNS Programmer's Guide 49Table 4.1 Initializing a Local Client Application Task Sample Code For More Information, See… Selecting the Local A
LNS Programmer's Guide 50 The CustomerID and CustomerKey parameter supplied to the function refer to the customer identification and key num
LNS Programmer's Guide 51property to NOTHING for Visual Basic, or NULL for Visual C++). This is described in more detail in Chapter 5. If mu
LNS Programmer's Guide 52 within the Networks collection. The name to use is specified by the Network object’s Name property. The following
LNS Programmer's Guide 53Task Sample Code For More Information, See.. Opening a Network Dim MyNetworks as LcaNetworks Dim MyNetwork as LcaN
LNS Programmer's Guide 54 Application Developer’s Kit CD-ROM jewel case. For more information on LNS licensing, and for more details on the
LNS Programmer's Guide 55Dim SelectedNI as LcaNetworkInterface Set SelectedNI = NICollection.Item("LON1") 3. Set the remote netwo
LNS Programmer's Guide vTable of Contents Preface ...
LNS Programmer's Guide 56 4. Optionally repeat steps 2 and 3 to open more networks. Note that a remote Full client application can access m
LNS Programmer's Guide 57In any of these cases, your client application should resort to using the Networks collection. Once opened, the ent
LNS Programmer's Guide 58 Task Sample Code For More Information, See.. Opening the Object Server ObjectServer.Open() Opening the Object Serv
LNS Programmer's Guide 59Opening the Object Server Once you have set the network access mode, and licensing mode for your Lightweight client
LNS Programmer's Guide 60 2. If this is the first time the network will be opened on the PC running your application, use the Networks coll
LNS Programmer's Guide 61been previously opened by Local or Full client applications with the Network Service Device your application is usi
LNS Programmer's Guide 62 3. If the System is being opened for the first time and can share media with other independently managed systems,
LNS Programmer's Guide 635. For Full client applications, set the System object’s RemoteChannel property to the Channel object correspondin
LNS Programmer's Guide 64 management mode is set to lcaMgmtModePropagateConfigUpdates, all device configuration changes are immediately prop
LNS Programmer's Guide 65object are not available until the system has been opened. See the LNS Object Server Reference help file for a comp
LNS Programmer's Guide vi LonWorks Interfaces Control Panel ...
LNS Programmer's Guide 66 To explicitly start a transaction, call the System object’s StartTransaction() method. Once a transaction is star
LNS Programmer's Guide 67Echelon recommends that you use the handle or name assigned to an object to retrieve it from a collection. The hand
LNS Programmer's Guide 68 subscribe your application to most events by invoking the Begin<event> method (where <event> represent
LNS Programmer's Guide 69an automated installation tool. You could also use it to provide feedback to a user about the configuration state o
LNS Programmer's Guide 70 • Event handlers should not try to release any event object parameters, per COM rules. LNS will handle this itsel
LNS Programmer's Guide 71Some properties and methods normally return an object, e.g. the Add() method of the AppDevices collection, and some
LNS Programmer's Guide 72
LNS Programmer's Guide 73 Chapter 5 - Network Management : Installing a Network This chapter describes how you can use LNS to install and c
LNS Programmer's Guide 74 LNS Network Installation Scenarios To understand what is required to install LONWORKS devices on a LONWORKS networ
LNS Programmer's Guide 75device’s network address consists of three components — the device’s domain, the device’s subnet, and the device’s
LNS Programmer's Guide viiMonitoring and Transactions ...
LNS Programmer's Guide 76 scenarios. For example, you could begin defining a network’s devices and connections using the engineered system s
LNS Programmer's Guide 77Engineered Mode In the engineered mode installation scenario, the network installation consists of two phases: 1. A
LNS Programmer's Guide 78 Initialize the Object Server andcreate or obtain the network youare defining. Open the network’sSystem object. See
LNS Programmer's Guide 79Chapter 4 describes how to specify a network interface for each client type. If your application has already done s
LNS Programmer's Guide 80 device with the lcaConfigPropOptLoadValues and lcaConfigPropOptSetDefaults options set. Then, set individual confi
LNS Programmer's Guide 81The following properties cannot be read while the LNS Object Server is in engineered mode: • AppDevice.SelfDocumen
LNS Programmer's Guide 82 Open the network and system to be commissioned:Set MyNetworks=ObjectServer.NetworksSet MyNetwork=MyNetworks.Item(“
LNS Programmer's Guide 832. Open the network and the system, and then set the system management mode to lcaMgmtModePropagateConfigUpdates.
LNS Programmer's Guide 84 8. As you manage the network you have created, you may need to perform other maintenance tasks, such as the remov
LNS Programmer's Guide 85networks, a 1-byte domain ID is sufficient, and allows for optimum performance. The domain ID is automatically sele
Kommentare zu diesen Handbüchern