Getting started with device development – Echelon Mini FX/PL Examples User Manual

Page 22

Advertising
background image

14

Using the Mini FX/PL Example Applications

connection process. The MgDemo application will automatically join this connection.

No manual intervention is needed in this case.

The

T

auto

protocol timer is provided to avoid race conditions when a network

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

auto

protocol timer,

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

ON

W

ORKS

device applications. For more information on the

Neuron C programming language, see the Neuron C Programmer’s Guide and the Neuron C
Reference Guide
.

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

ON

W

ORKS

\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
L

ON

W

ORKS

device based on a PL 3150 or PL 3170 Smart Transceiver.

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.

Advertising