Troubleshooting a director application, Creating and updating a lonmaker network – Echelon LonWorks Network XML User Manual
Page 16

8
Using the LonMaker XML Plug-in
// Option to suppress status and options dialog
m_lmXml.XmlOptions = 0x01 | 0x02;
//Option to create and specify location of import log
m_lmXml.LogFileName
=
"C:\\Lm\\XML\\XML Network\\ImportLog.XML"
;
m_lmXml.SendCommand(23, 5,
"MyXmlNetwork/MyXmlNetwork/Subsystem 1"
);
m_lmXml.Visible =
true
;
}
}
}
Troubleshooting a Director Application
You can create a trace log to verify that the LonMaker XML Plug-in is receiving the commands and
options specified in your director application. This is typically only done during application
development and debugging. To create a trace log for the LonMaker XML Plug-in, do the following:
1. Open the Windows registry editor. Click Start on the taskbar, click Run, type regedit, and then
click OK. The Registry Editor dialog opens.
2. Browse to the HKEY_LOCAL_MACHINE\SOFTWARE\LonWorks\ LonMaker for
Windows folder.
3. On the Edit menu, point to New, and then click String Value on the shortcut menu.
4. Type TraceLmXml.
5. In the right pane, right-click the TraceLmXml entry and then click Modify on the shortcut menu.
The Edit String dialog opens.
6. In the Value Data box, enter 1 and then click OK.
The LonMaker XML Plug-in will now create a trace file in C:\LonWorks\LonMaker\
PlugIn_LmXml.log that reports all of the commands and options that it has received from the director
application.
Creating and Updating a LonMaker Network
You can create a new network or update an existing L
ON
W
ORKS
network by importing a LonMaker
network XML file with the LonMaker XML Plug-in. This section describes how the LonMaker XML
Plug-in creates and updates networks and how it updates individual objects in the LNS network
database.
How the LonMaker XML Plug-in Creates and Updates a Network
On import, the LonMaker XML Plug-in processes the data from the RootSubsystem specified in the
XML file. If this value is not defined or it is empty, the first top-level subsystem is assumed. The
plug-in then makes five passes through the XML data, performing the following actions:
1. Create, update, and delete subsystems. Deleting a subsystem also deletes all devices in that
subsystem. Channels and connection descriptions are also created and updated (they are deleted
on the fourth pass).
2. Create, update, and delete application devices, routers, functional blocks, and NVs/message tags.
Device templates are also imported, as required.
3. Create and update NV/message tag connections.
4. Delete channels, device templates, and connection descriptions.
5. Commission application devices and routers and load the specified application image (.APB) into
them.