Opening multiple remote networks for downlink – Echelon OpenLDV User Manual
Page 147

OpenLDV Programmer’s Guide
139
lcaOS.Open
'Add a new network object and open the
'network database. “Network1” represents the name
'of the network and “c:\Network1” represents the path to the
'network database.
Set ActiveNetwork = lcaOS.Networks.Add _
("Network1", "c:\Network1", True)
ActiveNetwork.Open
'Fetch the system from the network.
Set ActiveSystem = ActiveNetwork.Systems.Item(1)
'Select a network interface. Note the use of the xDriver naming
'convention in this line: X.[Profile Name].[Downlink Lookup Key]. Default
'represents the profile name to use. RNI-0001 represents the downlink
'lookup key for the RNI to be opened.
Set TempNetworkInterface _
= lcaOS.NetworkInterfaces.Item("X.Default.RNI-0001")
Set ActiveSystem.NetworkServiceDevice.NetworkInterface _
= TempNetworkInterface
'Set up the LNS Server and open an xDriver downlink session by opening
'the System object.
ActiveSystem.Open
'Set the system into OnNet management mode.
ActiveSystem.MgmtMode = lcaOnNet
'Create a subsystem object to hold your AppDevice objects.
Set ActiveSubsystem = ActiveSystem.Subsystems.Add("Subsystem1")
'Any other code goes here.
ActiveSystem.Close
ActiveNetwork.Close
LcaOS.Close
End Sub
Opening Multiple Remote Networks for Downlink
The following Visual Basic sample program opens multiple remote networks
simultaneously. It uses xDriver to connect to two remote L
ON
W
ORKS
networks.
The information required to open each network (network name, xDriver profile
name, and the RNI lookup key) for this program is hard coded into the
application. Figure 37 on page 140 shows the form that was created for this
application.