Echelon, LON, LONWORKS, Neuron, 3120, 3150, Digital Home,
i.LON, LNS, LonMaker, L
NodeBuilder, ShortStack, and the Echelon logo are
trademarks of Echelon Corporation registered in the United
States and other countries. FTXL, LonScanner, LonSupport,
OpenLDV, and LNS Powered by Echelon are trademarks of
Echelon Corporation.
Other brand and product names are trademarks or
registered trademarks of their respective holders.
ONMARK, LonPoint, LonTalk,
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 or LonPoint Modules 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 NO REPRESENTATION, WARRANTY, OR
CONDITION OF ANY KIND, EXPRESS, IMPLIED, STATUTORY, OR
OTHERWISE OR IN ANY COMMUNICATION WITH YOU,
INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF
MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR ANY
PARTICULAR PURPOSE, NONINFRINGEMENT, AND THEIR
EQUIVALENTS.
No part of this publication may be reproduced, stored in a
retrieval system, or transmitted, in any form or by any means,
electronic, mechanical, photocopying, recording, or
otherwise, without the prior written permission of Echelon
Corporation.
Related Manuals ............................................................................................v
For More Information and Technical Support ............................................vi
Using the Mini FX/PL Example Applications............................................. 1
Introduction to the Mini FX/PL Examples ................................................... 2
Loading the Mini FX/PL Example Applications .......................................... 6
Using the Mini FX/PL Example Applications .............................................. 9
MgSwitch and MgLight Example Applications................................... 10
MgDemo Example Application ............................................................. 11
MgKeyboard Example Application....................................................... 13
Getting Started with Device Development.................................................14
Mini FX/PL Hardware Guide iii
Welcome
The Mini FX/PL Evaluation Kit is a complete hardware and software platform for
evaluating the L
®
3150
and PL 3170 Smart Transceivers. The Mini kit lets you build Neuron® C
applications and download them to L
You can use the Mini kit to develop prototype or production devices, particularly in the
rapidly growing, price-sensitive mass markets of smart light switches, thermostats, and
other simple devices and sensors.
ONWORKS
®
2.0 platform and developing LONWORKS devices based on PL
ONWORKS devices, and test LONWORKS devices.
Purpose
This document describes the Neuron C example applications included with the Mini
FX/PL Evaluation Kit that you can run on your PL 3150/PL 3170 EVBs. You can use
these examples to test the I/O devices on the Mini Gizmo I/O Boards that you can attach
to your PL 3150/PL 3170 EVBs, and create simple managed and self-installed
ONWORKS networks. You can browse the Neuron C code used by these examples to
L
learn how to develop your own device applications.
Audience
This guide is intended for device and system designers with an understanding of control
networks.
Hardware Requirements
Requirements for computers running the Mini FX/PL Evaluation Kit are listed below:
•Microsoft
you install the latest service pack available from Microsoft for your version of
Windows.
•Intel® Pentium
requirements for the selected version of Windows.
o 120 to 350 megabytes (MB) free hard-disk space, plus the minimum Windows
o The Mini FX Application requires 90 MB of free space.
o Microsoft .NET Framework 3.5 SP1, which is required to run the Mini kit,
o The LonScanner
o If you install Adobe
• 512 MB RAM minimum.
• Note: Windows Vista testing for the Mini FX Application has been performed on
computers that have a minimum of 2 GB of RAM. For complete Windows Vista
requirements, refer to
®
Windows Vista® or Microsoft Windows® XP. Echelon recommends that
®
III 600MHz processor or faster, and meeting the minimum Windows
requirements for the selected version of Windows.
requires 30 MB of free space.
™
Protocol Analyzer (Demo Edition), which is included with the
Mini kit software, requires 26 MB of free space.
®
Reader 9.1 from the Mini FX Evaluation Kit CD, you need
an additional 204 MB of free space. You need Adobe Reader or another PDF
viewer to view the Mini FX/PL Evaluation Kit documentation.
iv Preface
www.microsoft.com/windows/windows-vista/get/system-requirements.aspx. You
can use Microsoft’s Vista Upgrade Advisor to determine upgrade requirements for a
particular computer. To download this tool, go to the Microsoft Web site at
• 1024x768 or higher-resolution display with at least 256 colors.
• Mouse or compatible pointing device.
• LNS
®
network interface or IP-852 router. If an LNS network interface is used, it
may be a local or remote interface.
o Compatible local network interfaces include the U20 USB network interface
(included with the Mini FX/PL Evaluation Kit); PCC-10, PCLTA-20, or
PCLTA-21 network interfaces; and the SLTA-10 Serial LonTalk Adapter.
o Compatible remote network interfaces include the i.LON
100 e3 Internet Server, i.LON 600 L
ONWORKS-IP Server, or i.LON 10 Ethernet
Adapter.
oCompatible IP-852 routers include the i.LON SmartServer with IP-852 routing,
i.LON 100 e3 Internet Server with IP-852 routing, or an i.LON 600
ONWORKS-IP Server. If you are using an IP-852 router, your computer must
L
have an IP network interface such as an Ethernet card or modem with PPP
software. In addition, the i.LON software must be installed on your computer,
and the IP-852 channel must be configured using the L
Configuration Server application software.
®
SmartServer, i.LON
ONWORKS-IP
Content
This guide includes the following content:
•
Connecting the Mini FX/PL Hardware. Describes how to power your PL 3150 and
PL 3170 EVBs and connect them to a L
ONWORKS PL-20 channel and to your
development computer.
Mini FX/PL Hardware Details. Describes the service pin and reset buttons and
•
LEDs, jumper settings, stand-alone power line coupler connector, and I/O connector
on the PL 3150/PL 3170 EVBs. Describes the I/O devices on the Mini Gizmo I/O
Board.
Related Manuals
The documentation related to the Mini kit is provided as Adobe PDF files and online help
files. The PDF files are installed in the Echelon Mini program folder when you install
the Mini kit. You can download the latest Mini FX documentation, including the latest
version of this guide, from Echelon’s Web site at
The following manuals provide supplemental information to the material in this guide.
You can download these documents from Echelon’s Web site at
®
Introduction to the L
Platform
ONWORKS
Provides a high-level introduction to L
networks and the tools and components that are used
for developing, installing, operating, and maintaining
them.
www.echelon.com/docs.
www.echelon.com.
ONWORKS
Mini FX/PL Hardware Guide v
I/O Model Reference for Smart
Transceivers and Neuron Chips
Describes the many different I/O models that are
available for use with the Neuron Chips and Smart
Transceivers.
ISI Programmer’s Guide Describes the ISI protocol, which provides for easy
development of devices that do not require installation
tools.
ISI Protocol Specification Describes the typical ISI network architecture, the
procedures that take place in an ISI installed network,
and the messages that are defined by the ISI protocol.
LonMaker
®
User’s Guide
Describes how to use the LonMaker Integration Tool to
design, commission, modify, and maintain L
ONWORKS
networks.
ONWORKS
L
®
USB Network
Interface User’s Guide
Describes how to install and use the U20 USB Network
Interface, which is included with the Mini FX/PL
Evaluation Kit.
Mini FX/PL Hardware Guide Describes the hardware included with the Mini FX/PL
Evaluation Kit, including assembly instructions and
other information you will need when using the Mini
FX/PL Evaluation Kit.
Mini FX User’s Guide Describes how to use the Mini FX Evaluation Kit to
develop and build simple Neuron C device applications,
ONWORKS devices,
Neuron
®
C Programmer’s Guide
download the device applications to L
and test the L
ONWORKS devices
Describes how to write programs using the Neuron
Version 2.2 language.
Neuron
®
C Reference Guide
Provides reference information for writing programs
using the Neuron C Version 2.2 language.
®
PL 3120
/ PL 3150® / PL 3170
Smart Transceiver Data Book
™
Provides detailed technical specifications on the
electrical interfaces, mechanical interfaces, and
operating environment characteristics for the PL 3120,
PL 3150, and PL 3170 Power Line Smart Transceivers.
For More Information and Technical Support
The Mini FX ReadMe document provides descriptions of known problems, if any, and
their workarounds. To view the Mini FX ReadMe, click Start, point to Programs,
point to Echelon Mini, and then select Mini FX ReadMe First. You can also find
additional information about the Mini kit at the Mini FX Web page at
www.echelon.com/mini.
®
C
If you have technical questions that are not answered by this document, the Mini FX
online help, or the Mini FX ReadMe file, you can contact technical support. Free e-mail
support is available or you can purchase phone support from Echelon or an Echelon
vi Preface
support partner. See
support and training services.
You can also view free online training or enroll in training classes at Echelon or an
Echelon training center to learn more about developing devices. You can find additional
information about device development training at
You can obtain technical support via phone, fax, or e-mail from your closest Echelon
support center. The contact information is as follows (check
for updates to this information):
Region Languages Supported Contact Information
The Americas
Europe
www.echelon.com/support for more information on Echelon
www.echelon.com/training.
www.echelon.com/support
English
Japanese
English
German
French
Italian
Echelon Corporation
Attn. Customer Support
550 Meridian Avenue
San Jose, CA 95126
Phone (toll-free):
Echelon Europe Ltd.
Suite 12
Building 6
Croxley Green Business
Park
Hatters Lane
Watford
Hertfordshire WD18 8YH
United Kingdom
Phone: +44 (0)1923 430200
Fax: +44 (0)1923 430300
lonsupport@echelon.co.uk
Japan
Mini FX/PL Hardware Guide vii
Japanese
Echelon Japan
Holland Hills Mori Tower,
18F
5-11.2 Toranomon,
Minato-ku
Tokyo 105-0001
Japan
Phone: +81.3-5733-3320
Fax: +81.3-5733-3321
lonsupport@echelon.co.jp
Region Languages Supported Contact Information
China
Other Regions
Chinese
English
English
Japanese
Echelon Greater China
Rm. 1007-1008, IBM Tower
Pacific Century Place
2A Gong Ti Bei Lu
Chaoyang District
Beijing 100027, China
Phone: +86-10-6539-3750
Fax: +86-10-6539-3754
lonsupport@echelon.com.cn
Phone: +1.408-938-5200
Fax: +1.408-328-3801
lonsupport@echelon.com
viii Preface
1
Using the Mini FX/PL Example
Applications
This chapter introduces the four Neuron C example
applications included with the Mini FX/PL Evaluation Kit.
It describes how to load these example applications on a PL
3150/PL 3170 EVB using the Mini FX Application. It
describes how to bind the example applications in a
self-installed or managed network. It explains how to
browse the Neuron C code used by these examples so that
you can begin developing your own device applications.
Mini FX/PL Examples Guide 1
Introduction to the Mini FX/PL Examples
The Mini FX/PL Evaluation Kit includes the following four Neuron C example
applications that you can load into your evaluation boards and use to create simple
ONWORKS networks: MgDemo, MgSwitch, MgLight, and MgKeyboard.
L
The PL 3150 EVB comes pre-loaded with the MgDemo example application; the PL 3170
EVB comes pre-loaded with the MgSwitch example application. With these pre-loaded
example applications, you can create a simple self-installed L
the push buttons on the PL 3170 EVB are connected to the LEDs on the PL 3150 EVB.
All four example applications 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.
Table 1-1 summarizes the MgDemo, MgSwitch, MgLight, and MgKeyboard applications:
Table 1.1 Mini FX/PL Example Application Summary
ONWORKS network where
Example
Application
MgSwitch
Description
Summary Demonstrates how you can use switch devices in a
ONWORKS network. You can connect a PL 3150
L
EVB or PL 3170 EVB running the MgSwitch
application to the following applications:
1. The MgLight application running on a PL 3150
EVB or PL 3170 EVB.
2. The MgDemo application running on a PL
3150 EVB.
Program
IDs
PL 3150 EVB
(CENELEC disabled)
PL 3150 EVB
(CENELEC enabled)
PL 3170 EVB
(CENELEC disabled)
PL 3170 EVB
(CENELEC enabled)
9F:FF:FF:20:00:04:04:03
9F:FF:FF:20:00:04:04:03
9F:FF:FF:20:00:05:10:03
9F:FF:FF:20:00:05:10:02
2 Using the Mini FX/PL Example Applications
Example
Application
MgLight
Description
Summary Demonstrates how you can use light devices in a
ONWORKS network. You can connect a PL 3150
L
EVB or PL 3170 EVB running the MgLight
application to the following applications:
1. The MgSwitch application running on a PL
3150 EVB or PL 3170 EVB.
2. The MgDemo application running on a PL
3150 EVB.
Program
IDs
PL 3150 EVB
(CENELEC disabled)
PL 3150 EVB
9F:FF:FF:1E:28:04:04:03
9F:FF:FF:1E:28:05:10:03
(CENELEC enabled)
PL 3170 EVB
9F:FF:FF:1E:28:04:04:04
(CENELEC disabled)
PL 3170 EVB
9F:FF:FF:1E:28:05:10:02
(CENELEC enabled)
MgDemo
Summary Demonstrates how to interface with I/O hardware,
use network variables to communicate on a
ONWORKS network, and use the ISI library to
L
install devices on a L
ONWORKS network.
Note: You can only run the MgDemo application
on a PL 3150 EVB. This application is too big for
the on-chip EEPROM used by the PL 3170 Smart
Transceiver.
You can connect a PL 3150 EVB running the
MgLight application to the following applications:
1. The MgSwitch application running on a PL
3150 EVB or PL 3170 EVB.
2. The MgLight application running on a PL 3150
EVB or PL 3170 EVB.
3. The MgKeyboard application running on a PL
3150 EVB or PL 3170 EVB.
Program
IDs
PL 3150 EVB
(CENELEC disabled)
PL 3150 EVB
9F:FF:FF:05:01:04:04:04
9F:FF:FF:05:01:05:10:04
(CENELEC enabled)
Mini FX/PL Examples Guide 3
Example
Application
MgKeyboard
Description
Summary Demonstrates how to use automatic network
variable connections with the ISI protocol.
You can connect a PL 3150 or PL 3170 running the
MgKeyboard application to the following
applications:
1. The MgDemo application running on a PL
3150 EVB.
Program
IDs
PL 3150 EVB
(CENELEC disabled)
PL 3150 EVB
9F:FF:FF:05:25:04:04:03
9F:FF:FF:05:25:04:10:03
(CENELEC enabled)
PL 3170 EVB
9F:FF:FF:05:25:04:04:04
(CENELEC disabled)
PL 3170 EVB
9F:FF:FF:05:25:05:10:02
(CENELEC enabled)
Note: The CENELEC EN 50065-1 standard is a European-standard protocol for
controlling access to a power line used for communication. It is required for power line
communication in most CENELEC member states, which include most of Europe and
some neighboring countries. For operation outside states governed by the CENELEC
committee, you should disable the CENELEC access protocol for optimum performance
and reliable communication. See Chapter 8 of the PL 3120 / PL 3150 / PL 3170 Smart Transceiver Data Book for more information on the CENELEC protocol. To view this
book, click Start, point to Programs, point to Echelon Mini, point to Smart Transceiver Data Books, and then click it.
You can download the Mini FX/PL example applications to the PL 3150/PL 3170EVBs
using the Mini FX Application included with the Mini kit. Pre-built downloadable
application image files for the Mini FX/PL examples are stored in the
ONWORKS\NeuronC\Examples\Mini EVB\ReleasedBinaries directory. You can
L
use the Mini FX Application to download the .NDL application image files to your EVBs.
If you have the LonMaker tool, you can download the pre-built binary application image
files (.APB extension) to your EVBs. This folder also contains a pre-built text device
interface file (.XIF extension) that exposes the example application’s device interface so
that the LonMaker tool can manage the example application. Figure 1-1 displays the
downloadable application image files for the PL 3150/PL 3170 EVBs that are stored in
Figure 1.1 Mini FX/PL Example Application Image File Location
The Neuron C source files (.nc extension) for the Mini FX/PL examples are stored in
separate folders within the L
ONWORKS\NeuronC\Examples\Mini EVB directory (for
example, the MgDemo Neuron C application is stored in the
ONWORKS\NeuronC\Examples\Mini EVB\MgDemo folder). Note that the default
L
ONWORKS folder on your computer is typically C:\LONWORKS or C:\Program
L
Files\L
ONWORKS. Figure 1-2 provides an example of the location of the Neuron C source
file for the MgDemo example application.
Figure 1.2 Mini FX/PL Example Source File Location
After you download an example application to the PL 3150/PL 3170EVBs, you can install
and connect the network variables of the example applications in a self-installed
network.
The following sections describe how to do the following:
Mini FX/PL Examples Guide 5
1. Download the Mini FX/PL example applications with the Mini kit.
2. Use the Mini FX/PL example applications.
Loading the Mini FX/PL Example Applications
You can use the Mini FX Application to download the example applications to the PL
3150/PL 3170 EVBs. To do this, follow these steps:
1. Install the Mini FX software following Chapter 2 of the Mini FX User’s Guide.
2. Connect your PL 3150/PL 3170 EVB boards following Chapter 1 of the Mini FX/PL
Hardware Guide.
After you plug in the power supplies, LED1 will begin flashing, indicating that the
PL Evaluation Board has entered CENELEC configuration mode. If LED8 is on,
then the CENELEC access protocol is enabled. If LED8 is off, CENELEC is disabled.
By default, CENELEC is enabled.
You must enable the CENELEC access protocol when operating within one of the
CENELEC member states. When operating outside the CENELEC member states,
disable the CENELEC access protocol for optimum performance and reliable
communications.
If you want to change the current setting, you can press the SW8 button on the
MiniGizmo I/O Board to toggle CENELEC support. When you have made a selection,
press the SW1 button to confirm your selection and exit CENELEC configuration
mode. Make sure that LED8 is on before pressing SW1 if you want CENELEC
enabled, or off if you want CENELEC disabled. You will not be able to perform any
network operations with the PL EVB until you have made a selection and exited
CENELEC configuration mode.
The CENELEC EN 50065-1 standard specifies an access protocol for C-band
channels to allow multiple power line signaling devices from different manufacturers
to operate on a common AC-mains circuit. See Chapter 8 of the PL 3120 / PL 3150 / PL 3170 Smart Transceiver Data Book for more information on the CENELEC
protocol. To view this book, click Start, point to Programs, point to Echelon Mini,
point to Smart Transceiver Data Books, and then click it.
3.Start the Mini FX Application. To do this, click Start on the taskbar, point to
Programs, point to the Echelon Mini FX program folder, and then click Mini FX
Application. The Mini FX Application opens with the Application tab selected.
4. Click the Device tab.
6 Using the Mini FX/PL Example Applications
Figure 1.3 Mini FX Application—Device Tab
5. In the Network Interface property, select a network interface to be used for
communication between the Mini FX Application and the PL 3150/PL 3170 EVB over
ONWORKS channel, and then click Connect.
the L
You can use the U20 USB Network Interface included with the PL 3150/PL 3170
EVB, or you can use another network interface such as a i.LON 10 Ethernet Adaptor,
i.LON 100 e3 plus Internet Server, or i.LON SmartServer. If you are using the U20
USB Network Interface included with the PL 3150/PL 3170 EVB and you have not
installed any other network interfaces on your computer, select LON1.
For more information on installing and configuring the U20 USB Network Interface,
and on using it to attach your computer to a network channel, see the L
ONWORKS
USB Network Interface User’s Guide.
Note: Only one application can use a network interface at a time; therefore, if you
connect the Mini FX Application to a network interface, you cannot use that network
interface with other applications. You must exit the Mini FX 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 kit.
6. Press the Service button on the PL 3150/PL 3170 EVB. The Service button on the PL
3150/PL 3170 EVB is a black button that is located near the lower right-hand corner
of the board and is labeled “SERVICE.”
7. The Service Pin Message dialog opens. The Neuron ID of the PL 3150/PL 3170
EVB appears in the Neuron ID box and its program ID in the Program ID box.
Mini FX/PL Examples Guide 7
Figure 1.4 Mini FX Application—Service Pin Message Dialog
The Neuron ID is a unique 48-bit (12-hex digit) identifier contained in every
ONWORKS device. The Mini kit uses the Neuron ID to communicate with your
L
selected device. For more information on Neuron IDs, see the Introduction to the
ONWORKS System document in the Echelon Mini FX program folder.
L
The Program ID is a unique, 16-hex digit ID that uniquely identifies the device
application.
8. Click Yes to register the device with the Mini FX Application.
9. The PL 3150/PL 3170 EVB device is added to the Device list, which includes devices
that you have added. The device will remain in the Device list until you close the
Mini FX Application, or connect to a new network interface. You will need to add the
device again when you restart the Mini FX Application, or when you connect to a
different network interface.
10. In the Application Image property, click Add, browse to the
ONWORKS\NeuronC\Examples\Mini EVB\ReleasedBinaries folder, and then
L
select the desired Neuron C application image file (.ndl extension). The application
image is added to the list of those recently added and it will remain there even after
you close the Mini kit.
8 Using the Mini FX/PL Example Applications
Figure 1.5 Mini FX Application—Application Image Selected
11. Click Load to load the selected Neuron application image into the PL 3150/PL 3170
EVB. The Status box informs you when the application image has been successfully
loaded into the device, and also informs you of any load errors.
Figure 1.6 Mini FX Application—Status Box
Using the Mini FX/PL 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
ONWORKS network, and how to use the ISI library to install devices on a
on a L
ONWORKS network.
L
You can load the Neuron C example applications into up to 32 evaluation boards on a
ONWORKS network (the ISI protocol supports up to 200 devices, but the version used in
L
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
Mini FX/PL Examples Guide 9
network variable updates between the evaluation boards. These steps are summarized
below. Further details are provided in the sections following this summary:
1. Start the Mini FX Application, and then load the example applications (MgDemo,
MgSwitch, MgLight, or MgKeyboard) you want to use into the evaluation boards, as
described in the previous section,
2. 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 because 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.
3. 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.
Loading the Mini FX/PL Example Applications.
Repeat this step until you have added all the devices you want to the connection.
4. Push the Connect button that you used to initiate the connection in step 2 again.
This completes the connection.
5. You can now use the example applications.
Note: You can also download the Monitoring & Control Example Application from
the Echelon Web site and use it to monitor and control a 3150 EVB running the
MgDemo application. The Monitoring & Control Example Application is a C#
application that monitors ISI messages and uses the OpenLDV API to monitor and
control network variables.
MgSwitch and MgLight Example Applications
You can use the MgSwitch and MgLight example applications to demonstrate how simple
switch and lamp devices work on a L
used to activate or de-activate the lamp devices, or to set the lighting level for the lamp
devices. When you use these applications, the evaluation boards running the MgSwitch
application represent the switch devices. The evaluation boards running the MgLight
application represent the lamp devices, and will respond to output from the MgSwitch
devices.
To use the MgSwitch and MgLight applications, follow these steps:
1. Start the Mini FX Application, load MgSwitch into one or more of the evaluation
boards as described in the
earlier in this chapter, and then load MgLight into one or more evaluation boards.
You can optionally load MgDemo into a 3150 EVB and use it with MgSwitch or MgLight.
ONWORKS network, where the switch devices are
Loading the Mini FX/PL Example Applications section
2. Press the button labeled SW8 on a MiniGizmo attached to any of the evaluation
boards used in step 1 to start a new connection. It does not matter which evaluation
board you use. For these example applications, the button labeled SW8 is the
10 Using the Mini FX/PL Example Applications
Connect button, and the LED next to the SW8 button is the Connect light. The
Connect light will start blinking to indicate that the connection has been initiated.
The Connect lights on the other devices that can join the connection will also start
blinking.
NOTE: You can press and hold the Connect button for 8 seconds to cancel the
connection.
3. Choose a device you want to add to the connection, and push the device’s Connect
button to add the device to the connection. The device’s Connect light, as well as the
Connect light on the device you used to initiate the connection in step 2, will both
illuminate without flashing, indicating they are ready to join the connection.
Repeat this step for each device you want to add to the connection.
4. Push the first Connect button on the device used in step 2 to complete the connection
5. You can now use buttons SW1 – SW7 on the evaluation boards running the
MgSwitch application to activate or de-activate the LEDs on the evaluation boards
running the MgLight application, just as the switch would be used to activate or deactivate the lamp devices it is connected to.
For example, if you press SW3 on the MgSwitch MiniGizmo, then LED1, LED2, and
LED3 will activate on the MiniGizmos attached to the evaluation boards running the
MgLight application. Then, you can press SW3 again on the MgSwitch MiniGizmo
to de-activate the LEDs, or press any other of the other buttons on the MgSwitch
device to change to a different lighting level.
6. If you included an evaluation board running the MgDemo application in the
connection, it will also respond to the MgSwitch application. The I/O LED on the
MiniGizmo attached to the evaluation board running the MgDemo application will
activate or de-activate each time the MgSwitch MiniGizmo sends an update.
In addition, the MgDemo application implements LED1 – LED4 as simple lights
that cannot be dimmed. These LEDs will be illuminated whenever the lighting level
on the MgSwitch evaluation board is more than zero.
Note: You can remove an evaluation board running the MgSwitch or MgLight
application from a connection by pressing and holding the device’s Service button
until the Reset light blinks (approximately 10 seconds). To remove an evaluation
board running the MgDemo application from a connection, press and hold the
Connect button for the connection for approximately 10 seconds.
MgDemo Example Application
You can use the MgDemo example application to demonstrate how to use Neuron C to
interface with I/O hardware, how to use network variables in Neuron C to communicate
ONWORKS network, and how to use the ISI library to install devices on a
on a L
ONWORKS network. The MgDemo application can be run on a PL 3150 EVB, and it can
L
interoperate with other evaluation boards running the MgSwitch, MgLight, and
MgKeyboard applications, as well as with other 3150 EVBs running the MgDemo
application.
The MgDemo example application implements three types of I/O:
•A temperature sensor reads the local temperature, and stores this data in a pair of
output network variables.
•A piezo buzzer can be controlled with a pair of input network variables.
Mini FX/PL Examples Guide 11
•Four switch/light pairs implement a switch that is hard-wired to a local light, where
each pair may be connected to remote switches, remote lights, or remote switch/light
pairs, on other devices.
The four pairs consist of one switch and one light each. Each switch is implemented with
a SFPTclosedLoopSensor functional block, and each light is implemented with a
SFPTclosedLoopActuator functional block. When you use the MgDemo example
application in a self-installed environment, each pair is coupled and can only be
connected as one atomic unit. That is, each LED1 – LED4 light emulates a light bulb
that is physically connected to the corresponding SW1 – SW4 switch, while remote
switches or remote lights (or remote switch/light pairs) can be added to extend the
functionality to a lighting system. When you use the MgDemo example application in a
managed environment, you can independently connect each of the switch and light
functional blocks, demonstrating the additional flexibility provided in managed
networks. For example, you can use the MgDemo example application with the
LonMaker tool and connect each of the eight individual functional blocks independently
from each other.
To use the MgDemo application, follow these steps:
1. Start the Mini FX Application, and then load the MgDemo application into one or
more of the 3150 EVBs as described in the
Applications section earlier in this chapter (this application will not run in a 3170
EVB). The evaluation board used in this step is referred to as the MgDemo board in
this section.
Loading the Mini FX/PL Example
2. Push any of the buttons labeled SW5, SW6, SW7 or SW8 on the MgDemo board to
start a new connection. These buttons are the Connect buttons for MgDemo, and the
corresponding LEDs next to the buttons are the Connect lights. The Connect light
next to the Connect button that you pressed will start blinking. The Connect lights
on the other devices that can join the connection also start blinking.
Note: You can press and hold the Connect button for 8 seconds to cancel the
connection.
3. Push the blinking Connect buttons on any of the other devices to add those devices to
the connection. The device’s Connect light, as well as the Connect Light on the
MgDemo board, will both illuminate without flashing, indicating they are ready to
join the connection.
Repeat this step for any other devices that you want to add to the connection.
Note: You can press and hold the Connect button on a device for 8 seconds to remove
the device from the connection.
4. Push the Connect button on the MgDemo board used in step 2 to complete the
connection
5. The Connect buttons that you use to create a connection in steps 2 and 3 determine
which button and LED will be used for I/O for the connection, as listed in Table 1.2.
12 Using the Mini FX/PL Example Applications
Table 1.2 MgDemo Application
Connect Button I/O Push Button I/O LED
SW5 SW1 LED1
SW6 SW2 LED2
SW7 SW3 LED3
SW8 SW4 LED4
6. You can create ISI connections to other evaluation boards running the MgDemo,
MgSwitch, or MgLight applications. When you press the I/O button on one of the
evaluation boards running the MgDemo application, the I/O LEDs on all other
connected evaluation boards running the MgDemo application will activate. When
you press the I/O button again, the I/O LEDs will de-activate. For more information
on the MgSwitch and MgLight applications, see
Application on page
You can also use the MgDemo application to interoperate with evaluation boards
running the MgKeyboard application, as described in the next section, MgKeyboard Example Application.
10.
MgSwitch and MgLight Example
Notes:
The MgDemo application uses LED1 and LED2 to signal network and connection
addressing conflicts. When a network address conflict is detected and resolved,
LED1 will start flashing. When flashing, LED1 will not reflect any other input
received from the network. Press the SW1 button to cancel the notification and
return LED1 to its normal state. When a connection conflict is detected and
resolved, LED2 will start flashing, and LED2 will not reflect any other input
received from the network. Press the SW2 button to cancel the notification and
return LED2 to its normal state.
Optionally, you can download the Monitoring & Control Example Application from
the Echelon Web site and use it to monitor and control a 3150 EVB running the
MgDemo application. The Monitoring & Control Example Application is a C#
application that monitors ISI messages and uses the OpenLDV API to monitor and
control network variables. You do not need to connect the evaluation board to any
other evaluation boards (as described in steps 2–4 of this procedure) to use the
Monitoring & Control Example Application.
MgKeyboard Example Application
You can use the MgKeyboard application with the MgDemo application to demonstrate
the use of automatic network variable connections with the ISI protocol. The
MgKeyboard application implements a simple musical keyboard using the 8 push buttons
on the MiniGizmo. To use the MgKeyboard application, follow these steps:
1.Start the Mini FX Application and load MgKeyboard into a 3170 EVB as described in
Loading the Mini FX/PL Example Applications section earlier in this chapter.
the
2.Load the MgDemo application into a 3150 EVB as described in the previous section,
MgKeyboard Example Application.
3. Wait for the ISI
expire. When the timer expires, the MgKeyboard application will start an automatic
Mini FX/PL Examples Guide 13
T
protocol timer to expire. This timer can take several minutes to
auto
connection process. The MgDemo application will automatically join this connection.
No manual intervention is needed in this case.
T
The
protocol timer is provided to avoid race conditions when a network
auto
segment, or the entire site, is powered up. The timer is only relevant the first time
the device powers up with a new application, or when it is connected to a new
network. Once the connection has been created, it will be immediately operational
following a power-cycle or reset. For more information on the
T
protocol timer,
auto
see the ISI Programmer’s Guide and the ISI Protocol Specification.
4. Once MgKeyboard has connected with MgDemo, press any of the buttons labeled
SW1 – SW8 on the MiniGizmo connected to the evaluation board running the
MgKeyboard application. This sends a network variable update that activates the
piezo buzzer on the evaluation board running the MgDemo application. Each of the
buttons causes the piezo buzzer to use a different frequency.
Getting Started with Device Development
The Mini FX/PL example applications were developed using Neuron C (Version 2.2),
which is a programming language based on ANSI C that you can use to develop
applications for Neuron Chips and Smart Transceivers. It includes network
communication, I/O, and event-handling extensions to ANSI C, which make it a powerful
tool for the development of L
Neuron C programming language, see the Neuron C Programmer’s Guide and the Neuron C Reference Guide.
ONWORKS device applications. For more information on the
You can view the Neuron C code used by the Mini FX/PL example applications to learn
how to develop your own device applications. The Neuron C source files (,nc extension)
are located in the L
ONWORKS\NeuronC\Examples\Mini EVB\<example> folders on
your computer. You can view a Neuron C source file by browsing to its example folder,
and then opening the file with a text editor such as Notepad. Alternatively, you can
access an example application’s source file by clicking Start, pointing to Programs,
pointing to Echelon Mini FX, pointing to Examples, pointing to Mini EVB, clicking
the desired Example Source Code folder, and then clicking the Source folder.
After you view the Neuron C code in the example applications, you can create a new
device application by modifying the existing example applications or by developing the
device application from scratch. You can then use the Mini kit to build the device
applications and download them to your PL 3150 EVB, PL 3170 EVB, or other
ONWORKS device based on a PL 3150 or PL 3170 Smart Transceiver.
L
You can develop a simple device application by following the quick-start exercise in
Chapter 3 of the Mini FX User’s Guide. In the quick-start exercise, you will develop a
non-interoperable device application with one sensor and one actuator. The sensor is a
simple sensor that monitors the push buttons on the PL 3150/PL 3170 EVB. The
actuator drives the state of the LEDs on the PL 3150/PL 3170 EVB based on the state of
the push buttons. The quick-start guides you through all the steps of developing a
device with the Mini kit, including creating, writing, compiling and building, and
downloading the Neuron C device application.
After completing the quick-start exercise, you can view the programming samples
included in Chapter 5 of the Mini FX User’s Guide to learn Neuron C concepts such as
input/output, timers, network variables, configuration properties, functional blocks, and
interoperable self-installation (ISI). You can create and build the programming samples,
and then download them to your PL 3150/PL 3170 EVB.
14 Using the Mini FX/PL Example Applications
www.echelon.com
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.