Creating the example device application, Step 1: creating the nodebuilder project – Echelon NodeBuilder FX/PL Examples User Manual

Page 22

Advertising
background image

14

Using the NodeBuilder FX/PL Example

Creating the Example Device Application

This section details how to create the NcExample device application from scratch. It describes how
each part of the example was developed using the NodeBuilder tool and the LonMaker tool. The
example is divided into the nine steps, which introduce different parts of the device development
process. You should complete these steps in order because each step assumes that you have
successfully completed the previous one. The nine steps to creating the NcExample device application
are as follows:

1. Create the LonMaker network, NodeBuilder project, and NodeBuilder device template.
2. Configure the Node Object.
3. Add

digital

I/O.

4. Implement analog inputs.
5. Implement a simple type translator.
6. Enhance the type translator.
7. Implement the temperature sensor.
8. Implement the real-time clock.
9. Implement the wheel input

Note: This section includes a number of code examples. Many of these examples show code that is
generated by the Code Wizard as well as the code to be added. In these examples, code that is
generated by the Code Wizard is shown in italics and code which has been added is shown in bold.
See the Neuron C Programmer’s Guide and Neuron C Reference Guide for more information on
programming in Neuron C.

Step 1: Creating the NodeBuilder Project

In this step, you will create a LonMaker network that contains the device to be developed, create the
NodeBuilder project, and create the NodeBuilder device template. To accomplish this, follow these
steps:

1. Start the LonMaker tool and create a new LonMaker network named NcExa. Ensure that the

LonMaker tool is attached to the network and in the OnNet management mode. See the LonMaker
User’s Guide
for more information on creating and opening a LonMaker network.

2. Drag

the

Development Target Device shape from the NodeBuilder Basic Shapes stencil to the

LonMaker drawing. The LonMaker New Device Wizard opens.

3. Choose a name for the new device, set Commission Device, and then click Next. The second

window of the New Device Wizard opens.

4. Click

the

Start NodeBuilder button. The NodeBuilder Project Manager appears. When

prompted, indicate that you want to create a new NodeBuilder project. The New NodeBuilder
Project Wizard opens.

5. Name the new NodeBuilder project NcExa (this will be the default name if you named the

LonMaker network this) and click Next. The Project Default Setting window opens.

6. In

the

Project Default Settings window, add the location of the Gizmo 4 utility files (e.g.,

Gizmo4.h) to Include Search Path. By default, the Gizmo 4 utility files are located in the
LonWorks\NeuronC\Examples\NodeBuilder LTM-10A\NcExample folder. Set Run
NodeBuilder device template wizard
and click Next. The Device Template Wizard opens.

7. In the first window of the Device Template Wizard, name the new Device Template NcExample.

Click Next. The Program ID window opens.

8. Leave automatic Program ID management enabled and use the Standard Program ID

Calculator to generate a Program ID. The example provided with the NodeBuilder project uses
9F:FF:FF:05:00:8A:04:00, but the Program ID you use should use your company’s manufacturer
ID. See Specifying the Program ID in Chapter 5 of the NodeBuilder User’s Guide for more
information about the Standard Program ID Calculator. When you build you will get a

Advertising