Step 2: configuring the node object – Echelon NodeBuilder FX/PL Examples User Manual
Page 23
NodeBuilder FX/PL Examples Guide
15
warning that you have a mismatch between the Program ID and the transceiver type. For purposes
of the example, you can ignore this warning. If you want to change the Program ID to the
appropriate transceiver value, you must set the scope of the resource file created in Step 5:
Implementing a Simple Type Translator to 4 so that the Program ID of the resource file set will
match the Program ID of the device. Click Next. The Target Platforms window opens.
9. Set the development target hardware to LTM-10A RAM, and the release target hardware to
LTM-10A FLASH. See Creating Hardware Templates in Chapter 5 of the NodeBuilder User’s
Guide for more information about hardware templates. Select the Run NodeBuilder Code
Wizard check box and then click Finish. The NodeBuilder Code Wizard opens.
Step 2: Configuring the Node Object
You can create an empty but fully functioning L
ON
W
ORKS
device with just a Node Object functional
block. The Node Object functional block is used by network tools to manage all the functional blocks
on a device. In this step, you will use the Code Wizard to configure the device’s Node Object
functional block and add code to initialize the Gizmo 4 I/O Board.
1. Click
Generate and Close. The Code Wizard generates code and returns you to the NodeBuilder
Project Manager.
2. Double-click
the
common.h
file contained in the NcExample device template in the Project pane
to open it. Add the following line at the top of the list of include files:
#include "Gizmo4.h"
This statement makes the Gizmo 4 utility functions and I/O declarations available to all
components of the example application. You must have included the folder containing the Gizmo
4 header files in Include Search Path. If you did not, right-click the device template, select
Settings from the shortcut menu, open the Paths tab, and update Include Search Path.
3. In
NxExample.nc
, in the "when ( reset )" step, add the following lines shown in bold:
when (reset)
{
GizmoReset();
GizmoBuzz(TRUE);
GizmoDisplayString(2,0, "Echelon NEURON C");
GizmoDisplayString(0,1, "Example Application");
initAllFblockData();
executeOnEachFblock(FBC_WHEN_RESET);
GizmoBuzz(FALSE);
}
This code change initializes the Gizmo 4 I/O Board.
4. Save the file by selecting Save from the File menu.
5. Right-click
the
Development folder and then select Build from the shortcut menu. This builds
only the development target which is all that is necessary for this example.
6. Once the build has completed, click the LonMaker tool Taskbar button in the Taskbar to return to
the LonMaker tool. The New Device Wizard opened in Step 1: Creating the NodeBuilder Project
will still be open.
7. In
the
NodeBuilder Device Template property, select the NcExample NodeBuilder device
template.
8. Continue through the New Device Wizard in the LonMaker tool (see the LonMaker User’s Guide
for more information). Set Load Application Image, and set State to Online.
When prompted, press the service pin on the LTM-10A Platform. The application, including the
Node Object functional block and the Gizmo utilities, is loaded into the device. The application
download takes up to 30 seconds.