Mini EVK User’s Guide Revision 3@®078-0302-01D
The Mini EVK software includes the following applications and examples: • Mini Application, which you can use to manage Neuron C code, build Neuron
7. Click Install to begin the installation. When the installation has completed, a window appears to notify you. Click Finish to exit the installa
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 ap
Starting the Mini Application You can use the Mini Application to build an application image for a Neuron C application, download the application ima
EVK example Neuron C applications with the Mini Application. To create a Neuron application image, follow these steps: 1. Start the Mini Applicatio
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 informati
a network. The program ID includes fields that define the manufacturer, device class, device subclass, transceiver type, and model number for a devi
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
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 Devi
Echelon, LONWORKS, LonMaker, LonTalk, Neuron, 3120, 3150, LONMARK, NodeBuilder, and the Echelon logo are trademarks of Echelon Corporation registered
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 com
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 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
Program ID Segment Field Description M:MM:MM Manufacturer A 20-bit identifier for the device manufacturer. Click the arrow to select from a list of
Program ID Segment Field Description CC Device Class A 16-bit identifier for the primary function of the device. The primary function of the device
Program ID Segment Field Description UU Usage An 8-bit identifier for the intended usage of the device. The most significant two bits are determined
Program ID Segment Field Description N/A Has Changeable Interface Select this check box to indicate that the device has a changeable device interface
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 Example Applications The Mini EVK includes the following example applications: • MGDemo • MGSwitch • MGLight • MGKeyboard • Monitoring
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 syste
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 h
MGSwitch and MGLight Example Applications You can use the MGSwitch and MGLight example applications to demonstrate how simple switch and lamp devices
LED on the MiniGizmo attached to the evaluation board running the MGDemo application will activate or de-activate each time the MGSwitch MiniGizmo se
board used in this step is referred to as the MGDemo board in this section. 2. To demonstrate monitoring and controlling a device from your computer
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 LED
Monitoring & Control Example Application You can use the Monitoring & Control Example Application to monitor a 3150 EVB running the MGDemo ex
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 Hardwa
Figure 3.3 Add Device Dialog If you clicked the Add button, enter the Neuron ID of the target device in the Neuron ID box, and then click OK to retu
Figure 3.4 ISI Information Window The subnet ID, node ID, and Neuron ID of the network interface used by the Monitoring & Control Application ar
IsiUpdateUserInterface() and IsiDiagnostics() calls on the remote device. Consult the ISI Programmer’s Guide for more information on these calls. Yo
Mini EVK vs. NodeBuilder Tool Comparison ... 2 Mini EVK Contents ...
4 Developing a Neuron C Application This chapter introduces the Neuron C Version 2.1 programming language, and provides an overview on how to use th
What Is Neuron C? Neuron C Version 2.1 is a programming language based on ANSI C that you can use to develop applications for Neuron Chips and Smart
the look and feel of a normal variable to the C program, with the addition of controlled access by network configuration tools. Neuron C also provide
Neuron C provides many built-in I/O objects. These I/O objects are standardized I/O device drivers for the Neuron Chip or Smart Transceiver I/O hard
Declarations using extern references can be used to provide forward references to variables, and function prototypes must be declared to provide forw
Variable Initialization Initialization of variables occurs at different times for different classes. The const variables, except for network variab
•Configuration Properties SCPTdefOutput cp_family cpDefaultOut; •Functional Blocks fblock SFPTnodeObject { … } myNode; •Message tags
devices include temperature and position sensors, valves, switches, and LED displays. Neuron Chips and Smart Transceivers can also be connected to o
Document Title Contents Part NumberScanning a Keypad with the Neuron Chip Describes how a Smart Transceiver or Neuron Chip can be used to scan a
#define DS18S20_SKIP_ROM 0xCCu #define DS18S20_CONVERT 0x44u #define DS18S20_READ 0xBEu // Get a temperature reading from the Touch t
Analog Sensor Example... 60 Digital Actuator Example...
output port. This connects the IO10 output to an EIA-232 line driver that is in turn connected to pin 2 as a serial data output on the RS-232 connec
Digital Sensor and Serial Actuator Example The following example application reads the MiniGizmo push buttons every 50 milliseconds and sends an “On”
#pragma enable_io_pullups #pragma num_alias_table_entries 2 #pragma run_unconfigured // Configure the I/O pins IO_7 touch ioThermometer; IO_10 outp
static SNVT_temp_p lastTemperature; char temperatureString[15]; temperature = GetTemperature(); if (temperature != lastTemperatu
Applications exchange data with other LONWORKS devices using network variables. Every network variable has a direction, type, and length. The netwo
Figure 4.2 Network Variable Multicast Connection Network variables greatly simplify the process of developing and installing distributed systems bec
// Latch the button inputs io_out(ioButtonLd, 0); io_out(ioButtonLd, 1); // Shift in and return TRUE if any buttons are pressed
= touch_byte(ioThermometer, 0xFFu); CurrentTemperature.Bytes[0] = touch_byte(ioThermometer, 0xFFu); if (tou
// Update LEDs when an nviLight updwhen(nv_update_occurs(nviLight)) { ate is received SetLED(nviLight.state && nviLight.value); } Serial
file that specifies the data encoding, scaling, units, default value, range, and behavior for configuration properties based on the type. A rich var
iv Mini EVK User’s Guide
Functional Blocks and Functional Profiles A device application is divided into one or more functional blocks. A functional block is a portion of a
An application image for a device created by the Neuron C compiler will contain self-identification information unless the #pragma disable_snvt_si di
// Repeat every 50 milliseconds mtimer repeating scanTimer = 50; // Read the buttons when the timer expires when(timer_expires(scanTimer)) { boo
CurrentTemperature.snvtTempP *= 50l; // start the next conversion cycle: (void) touch_byte(ioThermometer, DS18S2
// Update LEDs when an nviLight update is received when(nv_update_occurs(nviLight)) { SetLED(nviLight.state && nviLight.value); } Serial
network. Developing an application using the Neuron ISI library is described in the ISI Programmer’s Guide. Digital Sensor Example The following exa
nvoSwitch.state = button ? 1 : 0; } } // Call IsiTick() every 250 milliseconds mtimer repeating isiTimer = 250; when(timer_expires(isiT
#define DS18S20_CONVERT 0x44u #define DS18S20_READ 0xBEu // Get a temperature reading from the Touch temperature sensor SNVT_temp_p GetTe
when(timer_expires(serviceTimer)) { if (service_pin_state()) { ServicePinActivation++; if (ServicePinActivation > LONG_SERVIC
Digital Actuator Example The following example application adds ISI support to the previous digital actuator example. The network variable input may
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
// Call IsiInitiateAutoEnrollment() after a specified period has // passed void IsiUpdateUserInterface(IsiEvent Event, unsigned Parameter) { if
} // Print the network variable value when an nviSwitch update // is received when(nv_update_occurs(nviSwitch)) { PrintConsole(nviSwitch.value
Chapter 6, How Devices Communicate Using Application Messages, of the Neuron C Programmer’s Guide. Feedback Network Variable Connections A typical ne
Feedback loops allow for tied control; the lamp can for example sense the light level and provide the feedback signal based on real measurement (rath
To achieve the same level of transport control in a star-shaped feedback connection, the initiator needs to know the number of expected feedback netw
with the eeprom storage class don’t get initialized during reset, but only with a new application image. The following code fragment illustrates thi
5 Debugging a Neuron C Application This chapter describes how to use the boards and accessories included with the Mini EVK, or additional tools such
Debugging a Neuron C Application You can use the boards and accessories included with the Mini EVK to debug a Neuron C application, or you can use ad
void PrintConsole(const char *message) { if (strlen(message) <= 100) { io_out(ioSerialOut, message, (unsigned) strlen(message)); }
Figure 5.1 LonMaker Browser The LonMaker Device Manager allows you to control the state of your device and its functional blocks. You can use the
Introducing the Mini Evaluation Kit Echelon’s Mini EVK Evaluation Kit is a tool for evaluating the development of control network applications with t
Figure 5.2 LonMaker Device Manager The LonMaker tool allows you to connect network variables on your devices, and then monitor those connections on
Figure 5.3 LonMaker Drawing with Connection Monitoring You cannot simultaneously use the same network interface with both the LonMaker tool and the
Figure 5.4 NodeBuilder Debugger You cannot simultaneously use the same network interface with both the LonMaker tool that is included with the NodeB
Using the Mini Application with the LonMaker Tool To switch from using the Mini Application on a network interface to the LonMaker tool with the same
Figure 5.5 New Device Template Wizard With these settings, you can use the same device template file for both build processes. Possible conflicts r
Mini EVK User’s Guide 79
Appendix A Troubleshooting This appendix describes how to resolve problems that may occur while you are using the Mini EVK. 80 Mini EVK U
1. I cannot compile the MGKeyboard application. When I try to compile the application, the "Typename 'UCPTfrequency' not found in De
Use a TP/FT-10 channel for most of the application development and debugging. When doing so, you must make sure to include use of the targeted power
using an I/O button, press and hold the SW1 – SW4 I/O button on the evaluation board running the MGDemo application when accepting or confirming an c
Feature Mini EVK NodeBuilder Tool Application Code and Constant Data per Device* 32Kbyte maximum 64Kbyte maximum Code Wizard No Plug-in Wizard N
Appendix B Monitoring & Control Application Overview This appendix describes the structure of the Monitoring & Control C# Example Applicati
Monitoring & Control C# Example The Monitoring & Control Example Application is a C# application that monitors ISI messages and uses the Open
86 Mini EVK User’s Guide Figure B.1 Monitoring & Control Example Hierarchy
User Interface and Application Specific Implementation This section describes the classes, files, and dialogs that make up the Monitoring & Contr
main user interface window. The IsiInfoForm class contains the implementation of the ISI Information window. Change Subnet/Node ID Dialog You can c
(domain resource usage message) that helps detect duplicate subnet/node IDs. When the Monitoring & Control Example Application receives the DRU
OpenLDV Adapter This section describes the classes and files of the Monitoring & Control Example Application that invoke the OpenLDV API. Operato
AppBuffer / ISIAppBuffer The AppBuffer.cs and ISIAppBuffer implementation files contain the collection of conversion classes, which together form the
www.echelon.com
Kommentare zu diesen Handbüchern