Echelon Mini EVK User Manual

Mini EVK User’s Guide
Revision 3
@®
078-0302-01D
Echelon, LONWORKS, LonMaker, LonTalk, Neuron, 3120, 3150,
ONMARK, NodeBuilder, and the Echelon logo are trademarks
L of Echelon Corporation registered in the United States and other countries. LonScanner, ISI, i.LON and OpenLDV are trademarks of Echelon Corporation.
Other brand and product names are trademarks or registered trademarks of their respective holders.
Neuron
Chips and other OEM Products were not designed
for use in equipment or systems which involve danger to human health or safety or a risk of property damage and Echelon assumes no responsibility or liability for use of the Neuron
Chips in such applications.
Parts manufactured by vendors other than Echelon and referenced in this document have been described for illustrative purposes only, and may not have been tested by Echelon. It is the responsibility of the customer to determine the suitability of these parts for each application.
ECHELON MAKES AND YOU RECEIVE NO WARRANTIES OR CONDITIONS, EXPRESS, IMPLIED, STATUTORY OR IN ANY COMMUNICATION WITH YOU, AND ECHELON SP ECIFICALLY DISCLAIMS A N Y IMPLIED WARRANTY OF ME R C H ANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
No part of this publication may be reproduced, stored in a retrieval s ystem, or trans mitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of Echelon Corporation.
Printed in the United States of America. Copyright © 2006 Echelon Corporation.
Echelon Corporation www.echelon.com

Welcome

This document describes how to use the Mini EVK Evaluation Kit. You can use the Mini EVK to develop a prototype or production control system that requires networking, particularly in the rapidly growing, price-sensitive mass markets of smart light switches, thermostats, and other simple devices and sensors. You can also use the Mini EVK to evaluate the development of applications for such control networks using the L
ONWORKS

Related Documentation

The Introduction to the LONWORKS System document provides an introduction to the ANSI/CEA-709.1 (EN14908) Control Network Protocol. The Neuron C Programmer’s Guide document outlines and discusses the key concepts of developing a L using the Neuron C Version 2.1 programming language. The Mini EVK Hardware Guide describes how to assemble and use the hardware included with the Mini EVK. The ISI used by the Mini EVK and provides for easy development of devices that do not require installation tools.
ONWORKS application, and explains key concepts of programming
Programmer’s Guide describes the ISI protocol, which is
®
platform.
To view these documents, click the Windows Start menu, point to All
Programs, point to Echelon Mini EVK, and then click Introduction to LonWorks, Neuron C Programmer’s Guide, Mini EVK Hardware Guide, or ISI Programmer’s Guide.

System Requirements

To install and use the Mini EVK, your computer must meet the following minimum requirements:
Microsoft
Pentium
128MB RAM minimum (256MB RAM recommended)
440MB of available hard-disk space
800x600 screen resolution
CD-ROM drive
®
Windows® XP or Windows 2000
®
III 800MHz processor

Table of Contents

Welcome...........................................................................................................i
Related Documentation ..................................................................................i
System Requirements ..................................................................................... i
Table of Contents ............................................................................................i
Introduction .......................................................................................................1
Introducing the Mini Evaluation Kit............................................................ 2
Mini EVK User’s Guide i
Mini EVK vs. NodeBuilder Tool Comparison ........................................ 2
Mini EVK Contents ................................................................................. 3
Installing the Mini EVK Software ................................................................4
Document Roadmap....................................................................................... 5
Using the Mini Application............................................................................. 7
Starting the Mini Application ....................................................................... 8
Building a Neuron C Application Image ...................................................... 8
Loading a Neuron C Application Image .....................................................12
Selecting a Program ID ......................................................................... 16
Resetting, Winking, and Testing Devices................................................... 20
Using the Mini EVK Example Applications..............................................22
Mini EVK Example Applications ................................................................ 23
Neuron C Example Applications................................................................. 23
MGSwitch and MGLight Example Applications ................................. 25
MGDemo Example Application ............................................................26
MGKeyboard Example Application...................................................... 28
Monitoring & Control Example Application .............................................. 29
ISI Information ...................................................................................... 31
Developing a Neuron C Application........................................................... 34
What Is Neuron C?....................................................................................... 35
Unique Aspects of Neuron C .......................................................................35
Neuron C Variables ............................................................................... 37
Neuron C Variable Types ............................................................... 37
Neuron C Storage Classes .............................................................. 37
Variable Initialization .................................................................... 39
Neuron C Declarations ...................................................................39
Getting Started with Neuron C................................................................... 40
Input/Output.......................................................................................... 40
Digital Sensor Example.................................................................. 42
Analog Sensor Example.................................................................. 42
Digital Actuator Example............................................................... 43
Serial Actuator Example ................................................................43
Hello World Example...................................................................... 44
Timers .................................................................................................... 44
Digital Sensor and Serial Actuator Example ................................ 45
Analog Sensor and Serial Actuator Example................................ 45
Digital Actuator Example............................................................... 47
Network Variables.................................................................................47
Digital Sensor Example.................................................................. 49
Analog Sensor Example.................................................................. 50
Digital Actuator Example............................................................... 51
Serial Actuator Example ................................................................52
Configuration Properties....................................................................... 52
Digital Sensor Example.................................................................. 53
Functional Blocks and Functional Profiles.......................................... 54
Digital Sensor Example.................................................................. 55
Analog Sensor Example.................................................................. 56
Digital Actuator Example............................................................... 57
Serial Actuator Example ................................................................58
Self-installation .....................................................................................58
Digital Sensor Example.................................................................. 59
ii Mini EVK User’s Guide
Analog Sensor Example.................................................................. 60
Digital Actuator Example............................................................... 63
Serial Actuator Example ................................................................64
Advanced Neuron C Concepts ..................................................................... 65
Event-Driven vs. Polled Scheduling ..................................................... 65
Low-Level Messaging ............................................................................ 65
Feedback Network Variable Connections ............................................ 66
Oscillation........................................................................................ 68
Detecting First Application Start......................................................... 68
Reset Processing .................................................................................... 69
Debugging a Neuron C Application............................................................ 70
Debugging a Neuron C Application ............................................................71
Debugging with I/O ...............................................................................71
Debugging with the LonMaker Integration Tool................................. 72
Debugging with the NodeBuilder Development Tool.......................... 75
Using the Mini Application with LNS Applications .................................. 76
Using the Mini Application with the LonMaker Tool .........................77
Using the Mini Application With the NodeBuilder Tool..................... 77
Troubleshooting ..............................................................................................80
Monitoring & Control Application Overview ..........................................84
Monitoring & Control C# Example ............................................................. 85
Monitoring & Control Example Hierarchy ..........................................85
User Interface and Application Specific Implementation .........................87
Main User Interface Window................................................................ 87
Network Interface Selection Form ....................................................... 87
Add Device Dialog/Service Pin Handling............................................. 87
ISI Information Window .......................................................................87
Change Subnet/Node ID Dialog............................................................88
Progress Log Window ............................................................................ 88
Monitor Control Engine ........................................................................ 88
Network Interface Configuration .........................................................88
ISI Support ................................................................................................... 88
IsiAppMsg Class .................................................................................... 89
Network Management .................................................................................89
AppImage Class ..................................................................................... 89
NetMgmtMsg Class ............................................................................... 89
OpenLDV Adapter ....................................................................................... 90
Operator Class ....................................................................................... 90
Dispatcher Class.................................................................................... 90
Connector Wrapper Class .....................................................................90
SessionEventTrap Class ....................................................................... 90
AppBuffer / ISIAppBuffer ..................................................................... 91
LDV32.DLL ..................................................................................................91
Mini EVK User’s Guide iii
iv Mini EVK User’s Guide
1

Introduction

This chapter introduces the Mini EVK, and describes how to install the Mini EVK software. It also provides a roadmap to follow when reading this document and learning how to use the Mini EVK.
Mini EVK User’s Guide 1

Introducing the Mini Evaluation Kit

Echelon’s Mini EVK Evaluation Kit is a tool for evaluating the development of control network applications with the ANSI/CEA-709.1 (EN14908) Control Network Protocol. You can use the Mini EVK to develop a prototype or production control system that requires networking, particularly in the rapidly growing, price-sensitive mass markets of smart light switches, thermostats, and other simple devices and sensors. You can also use the Mini EVK to evaluate the development of applications for such control networks using the L platform.
The Mini EVK is available in free topology twisted pair (FT) and power line (PL) versions, both of which leverage Echelon's unique smart transceiver technology. A USB Network Interface is included with the Mini EVK to connect the computer running the Mini EVK software to target hardware devices on twisted pair or power line channels.
Some of the key features of the Mini EVK are listed below:
Neuron® C compiler for fast development of control applications.
Simple to use right out of the box.
ONWORKS
Packaged with two working Mini EVB Evaluation Boards with
MiniGizmo I/O Boards and preprogrammed code examples.
Libraries for interoperable self-installation (ISI
development of devices that do not require installation tools, and is also fully compatible with L LonMaker
®
Integration Tool.
ONWORKS standard installation tools such as the
). ISI provides for easy

Mini EVK vs. NodeBuilder Tool Comparison

The Mini EVK may be the only development platform you require. However, the NodeBuilder® Development Tool is also available for larger applications and faster development. You can start with the Mini EVK and later transition to the NodeBuilder tool to accelerate your development. You can incorporate the source files, hardware templates and Neuron C libraries used in your Mini EVK projects into a NodeBuilder project. For more information on this, see
Application With the NodeBuilder Tool
Table 1.1 compares the Mini EVK and the NodeBuilder tool. For more information on the NodeBuilder tool, see the NodeBuilder Web page at
www.echelon.com/nodebuilder.
Table 1.1 Mini EVK / NodeBuilder Tool Comparison
Feature Mini EVK NodeBuilder Tool
on page 77.
Using the Mini
Neuron C Compiler
Network Variables per Device
2 Mini EVK User’s Guide
32 maximum 62 maximum
Feature Mini EVK NodeBuilder Tool
Application Code and Constant Data per Device*
32Kbyte maximum 64Kbyte maximum
Code Wizard No
Plug-in Wizard No
Debugger No
Project Manager No
Integrated Development Environment
Network Installation Tool
Target Hardware
Application loader only
Evaluation boards with 64KByte flash memory
No
Complete network installation and test tool
Development platform with 64KByte flash and 32KByte RAM; compatible with any standard or custom hardware platform
Simple I/O boards with
I/O Boards
*The application code and constant data per device figures represent the maximum application sizes that the Mini EVK and NodeBuilder tools can compile.
LEDs, pushbuttons, and a temperature sensor.
I/O board with LCD display, prototyping area, versatile analog and digital I/O.

Mini EVK Contents

The Mini EVK includes the following hardware:
®
A PL 3120
PL-20 version, or an FT 3120 and an FT 3150 EVB Evaluation Board if you are using the TP/FT-10 version.
Two MiniGizmo I/O Boards that can be attached to each EVB.
A U10 or U20 USB Network Interface you can use to attach the computer
running the Mini EVK software to a TP/FT-10 or PL-20 channel for communicating with your target hardware devices.
A cable for wiring your devices together (TP/FT-10 version only).
Mini EVK User’s Guide 3
and a PL 3150® EVB Evaluation Board if you are using the
The Mini EVK software includes the following applications and examples:
Mini Application, which you can use to manage Neuron C code, build
Neuron C applications, and download those applications into the evaluation boards. For more information on the Mini Application, see Chapter 2, Neuron C and C# example applications, see Chapter 3,
EVK Example Applications
Several example Neuron C applications you can use when getting started
with the L
Using the Mini Application. For more information on the
Using the Mini
.
ONWORKS platform.
The NodeBuilder Resource Editor, which provides a simple interface for
viewing existing L
ONMARK
®
resources and defining your own resources. For more information on the NodeBuilder Resource Editor, see the NodeBuilder Resource Editor User’s Guide.
The ISI Developer’s Kit, which provides for easy development of devices
that do not require installation tools. Consult the ISI Programmer’s Guide for more information on ISI.
OpenLDV
2.1 library, which is an API used by the Mini EVK software
to send and receive ANSI/CEA-709.1 messages through Echelon’s family
ONWORKS network interface products. The C# example uses the
of L OpenLDV API, as described in Appendix B of this document.
Consult the OpenLDV Programmer’s Guide for more information on OpenLDV. You can download the OpenLDV Programmer’s Guide and the OpenLDV Developer’s Kit from
www.echelon.com/openldv.

Installing the Mini EVK Software

Follow the steps below to install the Mini EVK software. Before doing so, make sure your computer meets the requirements listed in the section on page Mini Application, as described in Chapter 2,
1. Insert the Echelon Mini EVK CD into a CD-ROM drive. If the
installation does not automatically start after a few seconds, start the program manually. You can start the installation by clicking the Windows Start button, clicking Run, browsing to the setup application, and then clicking Open. The main Mini Evaluation Kit installation window opens.
i. Once you have installed the software, you can begin using the
Using the Mini Application.
System Requirements
2. Click Install Products to continue. The Install Products window opens.
3. Click Mini EVK Software to continue. The Mini EVK Software
installation includes all the software items listed in the
Contents
section earlier in this chapter. The Welcome window opens.
Mini EVK
4. Click Next to continue. The License Agreement window opens.
5. Read the license agreement, and click I Accept the Terms in the
License Agreement if you agree to the license agreement. The Customer Information window opens.
6. Fill in your user name, organization and serial number, and click Next to
continue. The Ready to Install window opens.
4 Mini EVK User’s Guide
7. Click Install to begin the installation. When the installation has
completed, a window appears to notify you. Click Finish to exit the installation wizard.
8. If you do not have an Adobe Acrobat reader, you can install it by selecting
Install Adobe Acrobat Reader in the Install Products windows described in step 2.
9. If you are using a PCC-10, PCLTA-10, PCLTA-20, or PCLTA-21 interface
instead of the U10 or U20 USB interface included with the Mini EVK, you can install a driver for these interfaces by selecting the Install the PCC-10/PCLTA-10/20/21 Drivers software from the Install Products window described in step 2.

Document Roadmap

The remainder of this document describes how to develop Neuron C applications
ONWORKS devices with the Mini EVK, and how to download those
for L applications into the evaluation boards and test them. It also describes how to use the Neuron C and C# example applications included with the Mini EVK software. This content is divided into the following sections:
Chapter 2,
Mini Application to create or modify a Neuron C application, build an application image, and then download the application image into a device. This chapter also describes how to use the Mini Application to reset, wink or test a device.
Chapter 3,
includes several Neuron C example applications you can download into the evaluation boards, as well as the C# Monitoring & Control Example Application, which is a C# application you can use to monitor your evaluation boards from your computer. This chapter describes these applications.
Chapter 4,
Neuron C Version 2.1 programming language. It describes the basic aspects of the language and provides an overview of how you can use the L platform and the Neuron C programming language to construct interoperable devices and systems.
Chapter 5,
use the boards and accessories included with the Mini EVK, or additional tools such as the LonMaker Integration Tool or NodeBuilder Development Tool, to debug a Neuron C application.
Appendix A,
problems that may occur when you use the Mini EVK with the evaluation boards.
Using the Mini Application. This chapter describes how to use the
Using the Mini EVK Example Applications. The Mini EVK
Developing a Neuron C Application. This chapter introduces the
ONWORKS
Debugging a Neuron C Application. This chapter describes how to
Troubleshooting. This appendix describes how to resolve
Appendix B,
describes the Monitoring & Control Example Application.
Mini EVK User’s Guide 5
Monitoring & Control Application Overview. This appendix
6 Mini EVK User’s Guide
2

Using the Mini Application

This chapter describes how to use the Mini Application to build a Neuron C application image, and how to download an application image into a device. This chapter also describes how to use the Mini Application to reset, wink or test a device.
Mini EVK User’s Guide 7

Starting the Mini Application

You can use the Mini Application to build an application image for a Neuron C application, download the application image into a device, and then test the basic functionality of the application. The remainder of this chapter describes how to perform these tasks.
To start the Mini Application, click the Windows Start menu, point to All
Programs, point to the Echelon Mini EVK program folder, and then click Mini EVK Application. The Application tab opens.
Figure 2.1 Application Tab

Building a Neuron C Application Image

Neuron C is the programming language that you can use to create applications for an evaluation board, as well as for other L Neuron Chip or Echelon Smart Transceiver. The Neuron C programming language is introduced in Chapter 4, described in more detail in the Neuron C Programmer’s Guide and Neuron C Reference Guide documents.
You can create a new Neuron C application, modify an existing Neuron C application or example, or create a Neuron application image for one of the Mini
8 Mini EVK User’s Guide
Developing a Neuron C Application, and is
ONWORKS hardware based on a
EVK example Neuron C applications with the Mini Application. To create a Neuron application image, follow these steps:
1. Start the Mini Application and click the Application tab, as described in
the previous section. You will use the Application tab to select a Neuron C file, optionally select any libraries, select a hardware template, define the program ID, and build the Neuron application image.
2. Enter the Neuron C source file in the first Neuron C Source and
Library File Names box. Click the arrow to select a recently compiled application. Click New to create a new Neuron C application. This creates a new empty source file, and opens the file using your computer’s default text editor. Click Browse to browse your files for an existing application.
The Mini EVK includes several example Neuron C applications that you
can use. To select one of the example applications, click Browse and then navigate to the Examples folder of the MiniKit folder. Open any of the folders in the Examples folder, and then select the .nc file to use that example. For descriptions of these examples, including limitations on target hardware, see Chapter 3,
Applications
.
Using the Mini EVK Example
3. Click Edit to modify the selected application. This opens the
application’s source file with your computer’s default text editor. By default, this is Windows Notepad. You may want to use a different text editor. To do so, open the Folder Options in the Windows Control Panel, click the File Types tab, select the NC extension, and then click Change to change the program you want to use to open .NC files. The Mini EVK will then use the new editor to edit the Neuron C file.
For an introduction to Neuron C programming, see Chapter 4,
a Neuron C Application
.
Developing
4. Click Add next to the second Neuron C Source and Library File
Names box to add a Neuron C library. The standard libraries other than
the ISI libraries are automatically included. These libraries are described in Appendix B of the Neuron C Programmer’s Guide.
This step opens the Add Library/Libraries window, which you can use to select a library. This defaults to the L
ONWORKS Neuron C\Libraries
directory, which contains the standard Neuron C libraries, as well as the ISI libraries described in the ISI Programmer’s Guide. Alternatively, you can type the name and path of the library you want to use in the box. You can enter multiple libraries by clicking the Add button multiple times, or by typing them in the box and separating them with semicolons (“;”).
The Mini Application automatically links the application with all required standard libraries. However, some Neuron C applications have specific library requirements. For example, the example applications contained with the Mini EVK all require the ISI libraries. Seven different ISI libraries are supplied, varying in features provided and application memory required.
Mini EVK User’s Guide 9
To build an application image for the example Neuron C applications, you
must select the correct library as shown in Table 2.1. For more information on the ISI libraries, see the ISI Programmer’s Guide.
Table 2.1 ISI Libraries
Example Application ISI Library
MGDemo
MGSwitch, MGLight
MGKeyboard
5. Enter the hardware template for the device in Target Hardware box.
A hardware template defines the memory layout, transceiver type, and Neuron processor type for the hardware platform to be supported by the application image. Click the arrow to select from a list of available hardware templates. The list includes hardware templates for the evaluation boards.
To build an application image for one of the evaluation boards included with the Mini EVK, select one of the hardware templates listed in Table
2.2. This choice depends on which Mini EVK model you are using, and whether you are building an application image for a 3120 EVB or a 3150 EVB.
Table 2.2 Hardware Templates
Mini EVK Model 3120 EVB Hardware
Template
IsiFull.lib
IsiCompactManual.lib
IsiCompactAuto.lib
3150 EVB Hardware Template
Mini EVK PL-20C PL 3120 EVB,
CENELEC
Mini EVK PL-20N PL 3120 EVB,
Non-CENELEC
Mini EVK TP/FT-10 FT 3120 Evaluation
Board
The CENELEC access protocol is a European-standard protocol for controlling access to a power line used for communication. It is required for PL-20 devices in most of Europe, but is not required or typically used outside of Europe. See Chapter 8 of the PL 3120 / PL 3150 Smart Transceiver Data Book for more information on the CENELEC protocol. You can download the PL 3120 / PL 3150 Smart Transceiver Data Book from Echelon’s Web site at
6. Next, enter the application’s program ID. The program ID uniquely
identifies an application, and must be different for every type of device on
10 Mini EVK User’s Guide
www.echelon.com.
PL 3150 EVB, CENELEC
PL 3150 EVB, Non-CENELEC
FT 3150 Evaluation Board
a network. The program ID includes fields that define the manufacturer, device class, device subclass, transceiver type, and model number for a device type.
If you are compiling one of the example applications included with the Mini EVK, you can use any program ID, as long as you use a different program ID for each different application image. To match the application images provided with the Mini EVK, enter one of the program IDs from Tables 2.3 and 2.4 for the example applications.
Table 2.3 Example Application Program IDs – FT Evaluation Boards
Application FT 3120 Evaluation Board FT 3150 Evaluation Board
MGKeyboard
MGDemo
MGLight
MGSwitch
Application PL 3120 Board
(CENELEC Disabled)
MGKeyboard
MGDemo
MGLight
MGSwitch
9F:FF:FF:05:25:05:11:02 9F:FF:FF:05:25:05:11:03 9F:FF:FF:05:25:05:10:02 9F:FF:FF:05:25:05:10:03
N/A 9F:FF:FF:05:01:05:11:04 N/A 9F:FF:FF:05:01:05:10:04
9F:FF:FF:1E:28:05:11:02 9F:FF:FF:1E:28:05:11:03 9F:FF:FF:1E:28:05:10:02 9F:FF:FF:1E:28:05:10:03
9F:FF:FF:20:00:05:11:02 9F:FF:FF:20:00:05:11:03 9F:FF:FF:20:00:05:10:02 9F:FF:FF:20:00:05:10:03
9F:FF:FF:05:25:04:04:04 9F:FF:FF:05:25:04:04:03
N/A 9F:FF:FF:05:01:04:04:04
9F:FF:FF:1E:28:04:04:04 9F:FF:FF:1E:28:04:04:03
9F:FF:FF:20:00:04:04:04 9F:FF:FF:20:00:04:04:03
Table 2.4 Example Application Program IDs – PL Evaluation Boards
PL 3150 Board (CENELEC Disabled)
PL 3120 Board (CENELEC Enabled)
PL 3150 Board (CENELEC Enabled)
7. Click Calculate to set the program ID that the application will use with
the LonMark Standard Program ID Calculator shown in Figure 2.2. You can set the program ID by manually entering it in the Program ID box at the bottom of the dialog, or you can set the fields on the dialog to appropriate values for your application, and calculate a program ID based on those values. For information on how you should set these fields, see Selecting a Program ID on page 16.
When you have configured the fields on the dialog (or entered the program ID you want to use), click OK to return to the Application tab.
Mini EVK User’s Guide 11
Figure 2.2 Standard Program ID Calculator Dialog
8. Click Build to compile the application and create the application image.
The status box at the bottom of the Application tab will inform you when the application has successfully compiled, and will also inform you of any build errors.
Consult Appendix A,
application. The NodeBuilder Errors Guide in the Echelon Mini EVK program folder describes the compiler, linker, and exporter errors listed in the Status box.
Troubleshooting, if you are unable to compile your

Loading a Neuron C Application Image

You can load a Neuron application image over a LONWORKS network into a Mini EVB, or into any L Transceiver. You can create a Neuron application image as described in the previous section, or you can load an existing Neuron application image.
The 3120 EVB comes with the MGSwitch example application pre-loaded, and the 3150 EVB comes with the MGDemo example application pre-loaded. If you have not already loaded a new application, you can use the MGSwitch and MGDemo applications without loading them. To load any of the other example applications, a custom application, or to reload MGSwitch or MGDemo into an evaluation board, follow these steps:
ONWORKS device based on a Neuron Chip or Echelon Smart
12 Mini EVK User’s Guide
1. Click the Device tab. You will use the Device tab to connect to a device
and load the Neuron application image into the device.
Figure 2.3 Device Tab
2. Select a network interface from the Network Interface box, and then
click Connect to connect the Mini Application to the network interface. The Status bar at the bottom of the window indicates whether or not the Mini Application is connected to a network interface. The network interface connects your computer to a L the Mini Application to communicate with any L
ONWORKS network, and enables
ONWORKS devices on the
network.
You can use the U10 or U20 USB Network Interface included with the Mini EVK, or you can use another network interface such as a PCC-10,
PCLTA-20, PCLTA-21, i.LON
10 Ethernet Adaptor, or i.LON 100 Internet Server. If you are using the U10 or U20 USB Network Interface included with the Mini EVK and do not have any other network interfaces installed on your computer, select LON1.
The selected network interface typically requires a driver to communicate with the Mini Application. A driver for the U10 or U20 USB Network Interface is automatically installed when you install the Mini EVK software. To use the U10 or U20 USB Network Interface, plug the interface into a USB port and attach it to the channel as described in the
Mini EVK User’s Guide 13
Mini EVK Hardware Guide. For more information on installing and configuring the U10 or U20 USB Network Interface, and on using it to attach your computer to a network channel, see the L Network Interface User’s Guide.
WARNING: Only one application can use a network interface at a time, so if you connect the Mini Application to a network interface, you cannot use that network interface with other applications. You must exit the Mini Application to make a connected network interface available to other applications. Multiple LNS applications can share a network interface, but they cannot share a network interface with applications that are not based on the LNS network operating system such as the Mini Application.
WARNING: If you want to use a PCC-10, PCLTA-20, or PCLTA-21 network interface, you must configure it as a layer 5 interface. See the Mini EVK Hardware Guide for more information on this.
3. Select a target device in the Device box. Click the arrow to view any
devices that you have recently added or that have been automatically discovered through the ISI protocol. You can select one of these devices, or you can click the Add button to add a new device. If you add a new device, the Add Device dialog shown in Figure 2.4 opens.
ONWORKS USB
Figure 2.4 Add Device Dialog
Enter the Neuron ID of the target device in the Neuron ID box and then click OK. The Neuron ID is a unique 48-bit (12-hex digit) identifier contained in every L
ONWORKS device. The Mini Application uses the
Neuron ID to communicate with your selected device. For more information on Neuron IDs, see the Introduction to the L
ONWORKS
System document in the Echelon Mini EVK program folder.
If you do not know the target device’s Neuron ID, you can acquire it by pressing the device’s Service button. The Service button is typically a push button included on most L to broadcast its Neuron ID on the L
ONWORKS devices that causes the device
ONWORKS network.
14 Mini EVK User’s Guide
On a Mini EVB, the service pin button is the black button labeled “SERVICE.” When the Mini Application receives the service pin message, it displays the Neuron ID in the Neuron ID box on the Add Device dialog. Click OK to add the device.
You can also add a device using the Service button without opening the Add Device dialog first by pressing the device’s Service button. This opens the Service Pin Message window, which you can use to add the device.
Once you have added a device, you will return to the Device tab. Select the device in the Device box, and proceed to step 4.
When you add a device, it will remain in the Device list until you close the Mini Application, or connect to a new network interface. You will need to add the device again when you restart the Mini Application, or when you connect to a different network interface.
4. Select a Neuron application image in the Application Image box. Click
the arrow to view any application images that you have recently built or added. You can select one of these application images, or you can click the Add button to browse your folders for a new application image. You can select a Neuron application image that you built using the Application tab, or you can select an existing Neuron application image. To select an existing Neuron application image, select a file with an .ndl extension. The Mini Application builds multiple types of Neuron application image files to provide support for a variety of tools, but you must provide an .ndl file when loading a device with the Mini Application.
Click Load to load the selected Neuron application image into the selected device. The Status box at the bottom of the Device tab informs you when the application image has been successfully loaded into the device, and also informs you of any load errors.
Consult Appendix A,
application image.
NOTE: After you load an application image into a PL Evaluation Board, LED1 will begin flashing, indicating that the PL Evaluation Board has
entered CENELEC configuration mode. If LED8 is on, then CENELEC is currently enabled. If LED8 is off, CENELEC is currently disabled.
The initial setting depends on the hardware template you selected when you loaded the application image into the PL Evaluation Board. For example, if you selected the PL 3120 EVB, CENELEC template, CENELEC will be enabled by default, and LED8 will be on. If you selected PL 3120 EVB, Non-CENELEC, CENELEC will be disabled by default, and LED8 will be off.
You can press the SW8 button to enable or disable CENELEC. When you have made a selection, press the SW1 button to confirm your selection and exit CENELEC configuration mode. You will not be able to load another application into the PL Evaluation Board, or perform any other network operations, until you have made a selection and exited CENELEC configuration mode.
Troubleshooting, if you are unable to load your
Mini EVK User’s Guide 15
The PL Evaluation Board will enter CENELEC configuration mode every time you load an application into it (as well as the first time you power up the Evaluation Board). If you want to disable this behavior for any of the Mini example applications, you can do so by commenting out the following line in the Neuron C source file:
#define SUPPORT_CCL
For more information on CENELEC configuration mode, see the CENELEC Config Readme.htm document, which is installed with the Mini EVK software into the Bin folder of your L

Selecting a Program ID

The program ID is a 64-bit (16-hex-digit) identifier that uniquely identifies the application contained within a device. A program ID is typically presented as eight pairs of hexadecimal encoded digits, separated by colons. When formatted as a standard program ID, the 16 hex digits are organized as 6 fields that identify the manufacturer, classification, usage, channel type, and model number of the device. Every standard program ID uses the following format:
FM:MM:MM:CC:CC:UU:TT:NN
ONWORKS directory.
The LonMark Standard Program ID Calculator dialog shown in Figure 2.2 helps you to select the appropriate values for each part of the program ID. The calculator displays available values based on a program ID definition file included with the Mini EVK. You can update the program ID definition file at any time by downloading the latest standard program ID data from
www.lonmark.org/spid. Copy the file into the Types folder of your LONWORKS
directory (C:\LonWorks\Types by default).
Table 2.5 lists and describes the program ID fields.
Table 2.5 Program ID Fields
Program
ID
Segment
F N/A A 4-bit format identifier. Set to 8 for LONMARK certified
Field Description
interoperable devices, or to 9 for devices that use the standard program ID format and use L documentation strings to document any functional blocks and configuration properties. Values less than 8 are used by legacy devices and network interfaces—the Mini EVK does not support these program IDs. Format identifiers 10 – 15 (0xA – 0xF) are reserved.
ONMARK compatible self-
Applications that you develop with the Mini EVK should typically use format 9, unless you get them certified by L International, in which case you can use format 8.
16 Mini EVK User’s Guide
ONMARK
Program
Field Description
ID
Segment
M:MM:MM Manufacturer A 20-bit identifier for the device manufacturer. Click the arrow to
select from a list of all the L are members of L member of L
ONMARK International. If your company is a
ONMARK International but is not included in the list,
download the latest program ID data from
If your company is not a member of L temporary manufacturer ID from company is a L
ONMARK member, but not listed in the updated
ONWORKS device manufacturers who
www.lonmark.org/spid.
ONMARK International, get a
www.lonmark.org/mid. If your
program ID list, or if you have a temporary manufacturer ID, select <Enter Number [Decimal]> in the Manufacturer list, then enter your manufacturer ID in the field to the right of the Manufacturer box. Enter the value in decimal, the calculator converts it to hex for the program ID. You do not have to join
ONMARK International to get a temporary manufacturer ID, the
L information required to get one if very minimal, and there is no fee to get one. However, if your company is not a member of
ONMARK International, now is a good time to join. For more
L information, see
www.lonmark.org.
For example applications, internally used prototypes or applications used in training, select Examples as the manufacturer ID (F:FF:FF).
CC Category The general purpose or industry of the device. The Category
selected determines the device classes that will be available in Device Class. Select ALL to have Device Class show all existing device classes. Select Profiles By Name to have Device Class show an alphabetical list of all device classes with a standard functional profile. Select Profiles By Number to have Device Class show a numerical list (sorted by device class number) of all device classes with a standard functional profile.
Mini EVK User’s Guide 17
Program
Field Description
ID
Segment
CC Device Class A 16-bit identifier for the primary function of the device. The
primary function of the device is determined by the primary functional profile implemented by your device.
Your application will implement at least one functional profile, and may implement multiple functional profiles. If you implement multiple functional profiles, determine which is the primary based on the most typical usage of your device. Enter one of the following depending on your primary functional profile:
If you are using a standard functional profile other than
functional profiles 0 through 6 and the functional profile is included in the standard resource file set, select the functional profile name from the list. The device class will be set to the functional profile number for the selected functional profile.
If you are using a standard functional profile other than
functional profiles 0 through 6 that has not yet been included
in the standard resource file set, select <Enter Number [Decimal]> from the list and then enter the functional profile key
in the two boxes to the right of Device Class. Enter the last two decimal digits in the second box, and the remaining
decimal digits in the first box.
If your primary functional profile is based on standard
functional profiles 1 through 5 (you cannot use functional profiles 0 or 6 as the primary functional profile) or a user functional profile, select the proper value from the list of device classes maintained by L
ONMARK International. To
enter a device class value that has not yet been added to the
standard list, select <Enter Number [D ecimal]> and enter a
decimal value from 0 to 255 in each of the fields to the right of the Device Class box (the calculator converts the values to hex for the program ID).
Non-interoperable applications should still use a standard program ID to describe the device’s capability as closely as possible. When in doubt, choose a generic description from the list, such as “generic I/O,” although a more specific description should be chosen if possible.
18 Mini EVK User’s Guide
Program
Field Description
ID
Segment
UU Usage An 8-bit identifier for the intended usage of the device. The most
significant two bits are determined by the Has Changeable Interface and Use Field Valued Defined By Functional
Profile check boxes below the Usage box. If you are using a standard usage value, set the Defined By Functional Profile check box, click the arrow to select from a list of standard usage values maintained by L
ONMARK International. You can update
the list by downloading the latest program ID data from
www.lonmark.org/spid. If the primary functional profile
implemented by your device specifies custom usage values, clear the Defined By Functional Profile check box, select <Enter Number[Decimal]> in the Usage list, and then enter a decimal value from 0 – 63 in the box next to the Usage box (the calculator translates the value to hex for the program ID).
Non-interoperable applications should still use a standard program ID to describe the device’s usage as closely as possible.
TT Channel Type An 8-bit identifier for the channel type supported by the device’s
ONWORKS transceiver. If you are using an FT EVB or if you are
L developing a device with an FT Smart Transceiver or FTT-10A transceiver, select TP/FT-10. If you are using a PL EVB or if you are developing a device with a PL Smart Transceiver or PLT-22 transceiver, select PL-20C or PL-20N (select PL-20C if you purchased a PL-20C Evaluation Kit, or PL-20N if you purchased a PL-20N Evaluation Kit).
Applications linking with the ISI libraries must select the program ID so that it reports the channel type correctly. Non­interoperable applications should still use a standard program ID and advertise the channel type field correctly.
NN Model Number An 8-bit identifier that you assign to specify the product model for
your device. Assign a unique model number for the specified manufacturer, device class, usage, and channel type. You can use the same hardware for multiple model numbers depending on the program that is loaded into the hardware. The model number within the program ID does not have to conform to your published product model number.
N/A Standard
Development Program ID
This field identifies this device as a development or prototype device. Select this check box if the device has not been certified by
ONMARK International. Selecting this check box chooses a format
L 9 standard program ID.
Mini EVK User’s Guide 19
Program
ID
Segment
N/A Has
N/A Usage Field
N/A
Field Description
Select this check box to indicate that the device has a changeable
Changeable Interface
Values Defined By Functional Profile
Program ID
device interface, or if the device has any network variables with changeable types.
See the Neuron C Programmer’s Guide for more information on changeable type network variables.
Select this check box if the primary functional profile implemented by this device defines usage values. Otherwise, clear the check box to specify standard usage values. When
selected, the Usage field will be set to <Enter Number>. Enter the custom usage value in the box to the right of the Usage field. .
This box is automatically updated when changes are made to the other fields on the dialog. You can also manually enter a program ID here.

Resetting, Winking, and Testing Devices

You can also reset, wink, or test a device with the Mini Application. To do so, open the Mini Application and connect to the device you want to use, as described previously in this chapter. Once you have connected to a device, you have the following options:
Click Wink to send the ANSI/CEA-709.1 Wink command to the
device. Devices are not required to respond to this command, but it is recommended. Devices should respond to the Wink command in an application-specific, benign way.
For example, a device could flash a LED or trigger an audible signal. When you wink an FT or PL EVB, the EVB LEDs will flash on and off for 1.5 seconds.
Wink commands are often used when installing or diagnosing multiple devices in the field. In such situations, a tool to confirm the identity of a given device is often needed. The Wink command can be used for this purpose.
Click Test to check the current status of the device. When the
test completes, the Status box will display information and statistics regarding the test. This includes the current state of the device, as well as statistics such as the number of packets received by the device, the number of packets addressed to the device, and the number of missed or lost messages.
Click Reset to reset the device. You can reset a device to test its
reset behavior, or when the device application appears to become unresponsive.
20 Mini EVK User’s Guide
Mini EVK User’s Guide 21
3
Using the Mini EVK Example
Applications
This chapter describes how to use the Neuron C and C# example applications included with the Mini EVK.
22 Mini EVK User’s Guide

Mini EVK Example Applications

The Mini EVK includes the following example applications:
MGDemo
MGSwitch
MGLight
MGKeyboard
Monitoring & Control
The MGDemo, MGSwitch, MGLight, and MGKeyboard applications are Neuron C applications that you can load into your evaluation boards and use to create simple L Neuron C Example Applications section below.
These examples use the Interoperable Self-installation (ISI) library. ISI is an application-layer protocol that allows installation of devices and connection management without using a separate network management tool. For more information on ISI, see the ISI Protocol Specification and ISI Programmer’s Guide documents.
ONWORKS networks. For more information on these applications, see the
The Monitoring & Control Example Application is a C# application that you can use to monitor and control evaluation boards running the MGDemo application. You do not need to load the Monitoring & Control Example Application into the evaluation boards, as with the 3150 EVB with the MGDemo example loaded to use all the features of the Monitoring & Control Example Application. For more information on the Monitoring & Control Example Application, see
Application
on page 29.
Neuron C example applications, but you do need a

Neuron C Example Applications

You can use the Neuron C example applications to demonstrate how to use Neuron C to interface with I/O hardware, how to use network variables in Neuron C to communicate on a L library to install devices on a L
You can load the
ONWORKS network (the ISI protocol supports up to 200 devices, but the
on a L version used in the evaluation boards supports up to 32), connect the evaluation boards via the ISI protocol, and then use the applications to exchange data through input and output network variable updates between the evaluation boards. These steps are summarized below. Exact details are provided in the sections following this summary:
1. The 3150 EVB is pre-loaded with the MGDemo application, and the 3120
EVB is pre-loaded with the MGSwitch application. You can use these applications, or you can use the MGLight or MGKeyboard applications that are also included with the Mini EVK. If you loaded a different application into either of you EVBs, or if you want to change the demo application, start the Mini Application, and then load one of the example applications (MGDemo, MGSwitch, MGLight, or MGKeyboard) into each EVB, as described in Chapter 2,
Neuron C example applications into up to 32 evaluation boards
ONWORKS network, and how to use the ISI
ONWORKS network.
Using the Mini Application.
Monitoring & Control Example
Mini EVK User’s Guide 23
2. If you are using an FT Mini EVK, skip to the next step. If you are using a
PL Mini EVK and this is the first time you use a PL EVB or if you have just reloaded an example application, LED1 will flash, indicating that the EVB is in CENELEC configuration mode. The CENELEC access protocol is a European-standard protocol for controlling access to a power line used for communication. It is required for PL-20 devices in most of Europe, but is not required or typically used outside of Europe. If LED1 is flashing, press the SW8 button to enable or disable CENELEC. LED8 indicates the CENELEC access protocol status—if it is on the CENELEC access protocol is enabled, if it is off the CENELEC access protocol is disabled. When you have made a selection, press the SW1 button to confirm your selection and exit CENELEC configuration mode. Be sure to set all devices on a power line channel to the same mode. You will not be able to load another application into the PL EVB, or perform any other network operations, until you have made a selection and exited CENELEC configuration mode. See Chapter 8 of the PL 3120 / PL 3150 Smart Transceiver Data Book for more information on the CENELEC protocol.
3. Push one of the push buttons labeled SW5 – SW8 on a MiniGizmo
attached to an evaluation board with the MGDemo application loaded, or push the button labeled SW8 on a MiniGizmo attached to an evaluation board with the MGSwitch or MGLight applications loaded. This starts a new connection. The buttons used to start the connection are referred to as the Connect buttons, and the LEDs next to the Connect buttons are referred to as the Connect lights.
The Connect light next to the Connect button that you pressed will start blinking. The Connect lights on devices that can join the connection will also start blinking. The MGKeyboard example application does not have a Connect button since it automatically connects without waiting for the installer to push a button. You can skip to step 5 if you are only connecting an MGKeyboard device.
4. Push one of the Connect buttons next to a blinking Connect light on any
of the other devices to join the connection. The device’s Connect light, as well as the Connect light on the evaluation board used to initiate the connection in step 2, will both illuminate without flashing, indicating they are ready to join the connection.
Repeat this step until you have added all the devices you want to the connection.
5. Push the Connect button that you used to initiate the connection in step 2
again. This completes the connection.
6. You can now use the example applications. You can also use the
Monitoring & Control Example Application to monitor a 3150 EVB running the MGDemo application.
24 Mini EVK User’s Guide
Loading...
+ 68 hidden pages