078-0183-01B Intro To LonWorks Rev 2
078-0183-01B Intro To LonWorks Rev 2
078-0183-01B Intro To LonWorks Rev 2
revision 2
078-0183-01B
Echelon, LON, LonWorks, LonMark, NodeBuilder, , LonTalk, Neuron, 3120, 3150,
LNS, i.LON, , ShortStack, LonMaker, the Echelon logo, and are trademarks of
Echelon Corporation registered in the United States and other countries. LonSupport,
, , OpenLDV, Pyxos, LonScanner, LonBridge, and Thinking Inside the Box are
trademarks of Echelon Corporation. Other trademarks belong to their respective
holders.
Neuron Chips, Smart Transceivers, 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 Corporation
www.echelon.com
2
Contents
Contents....................................................................................................................... 3
Chapter 1. Introduction......................................................................................... 5
Overview................................................................................................................................................... 6
The Market Value of Networked Control Systems ............................................................................ 7
LONWORKS Networks............................................................................................................................... 9
Implementing a Control Network......................................................................................................... 10
Cost-Effective Network Wiring.......................................................................................................... 10
Compatible Devices ............................................................................................................................ 11
Effective System Design .................................................................................................................... 11
Standard Network Management....................................................................................................... 11
Standard Network Tools .................................................................................................................... 11
Standard Device Configuration ......................................................................................................... 12
Standard IP Support .......................................................................................................................... 12
Getting More Information ..................................................................................................................... 12
Chapter 2. Platform Components ....................................................................... 14
Building a Platform ............................................................................................................................... 15
Smart Transceivers................................................................................................................................ 15
Development Tools................................................................................................................................. 16
Routers.................................................................................................................................................... 17
Network Interfaces ................................................................................................................................ 18
Smart Servers ........................................................................................................................................ 18
Network Management ........................................................................................................................... 18
Network Tools ........................................................................................................................................ 21
LonMaker Integration Tool ............................................................................................................... 22
LonScanner Protocol Analyzer .......................................................................................................... 23
Chapter 3. The Control Network Protocol .......................................................... 25
ISO/IEC 14908-1 Control Network Protocol ........................................................................................ 26
CNP Layers......................................................................................................................................... 27
CNP Data Transmission .................................................................................................................... 29
CNP Limits ......................................................................................................................................... 30
Layer 1—Physical Layer ....................................................................................................................... 31
Channel Types .................................................................................................................................... 31
TP/FT-10 Free Topology Twisted Pair .............................................................................................. 32
PL-20 Power Line ............................................................................................................................... 39
Layer 2—Link Layer.............................................................................................................................. 41
Media Access....................................................................................................................................... 41
Priority ................................................................................................................................................ 44
Frame Format..................................................................................................................................... 45
Layer-2 Performance.......................................................................................................................... 47
Layer 3—Network Layer ....................................................................................................................... 50
Naming and Addressing..................................................................................................................... 50
Addressing Formats ........................................................................................................................... 55
Address Table ..................................................................................................................................... 55
Routers ................................................................................................................................................ 56
Contents 3
Physical Layer Repeaters .................................................................................................................. 58
Datagram Format............................................................................................................................... 58
Layer 4—Transport Layer..................................................................................................................... 59
Message Services ................................................................................................................................ 60
CNP Timers ........................................................................................................................................ 61
Transport Packet Format .................................................................................................................. 63
Layer 5—Session Layer ......................................................................................................................... 64
Request/Response ............................................................................................................................... 65
Authentication .................................................................................................................................... 65
Session Packet Format....................................................................................................................... 66
Layer 6—Presentation Layer ................................................................................................................ 69
Messages ............................................................................................................................................. 69
Network Variables.............................................................................................................................. 70
Presentation Packet ........................................................................................................................... 77
Layer 7—Application Layer .................................................................................................................. 79
Application Configuration.................................................................................................................. 80
Application Specification ................................................................................................................... 80
Appendix A. Layer 1 and 2 Advanced Topics..................................................... 84
Layer 1 Neuron Communications Interface......................................................................................... 85
Layer 2 Advanced Topics....................................................................................................................... 90
Interpacket Gap.................................................................................................................................. 90
Collision Detection ............................................................................................................................. 93
Collision Resolution............................................................................................................................ 94
Oscillator Accuracy............................................................................................................................. 95
Preamble Length ................................................................................................................................ 95
Contents 4
Chapter 1.
Introduction
Introduction 5
Overview
Across a broad range of products and systems—from factory automation systems to
building controls to embedded machine controls to consumer electronics—there is a
trend away from centralized control systems. Manufacturers are building products
based on open standard control network architectures that feature intelligent
distributed control using a standard communication protocol and readily available
off-the-shelf low-cost firmware and transceivers for communication. These open
solutions ensure reliability, flexibility, lower cost, and faster development, and
provide enhanced energy monitoring and control. This trend is made possible with
the emergence of control networks—the low-cost alternative to centralized control
and proprietary communication systems.
In a centralized control system, remote sensors provided feedback to a
microcontroller, programmable logic controller, or other proprietary controller that in
turn sends control impulses to relays and other actuators. Each centralized control
system has its own unique input/output and processing requirements. Large,
complex control systems may be partitioned into two or more centralized systems
whose controllers must communicate continuously. These controllers and their
attached systems act as islands of automation, with artificially limited
communication between the islands. Whether partitioned or not, these control
system are expensive to develop, costly to install, and difficult to expand.
In a control network, intelligent control devices communicate using a common
protocol. Each device in the control network contains embedded intelligence that
implements the common protocol and performs control functions. In addition, each
device includes a communication transceiver that couples the device with the
communications medium.
Devices in a control network may each perform a simple task, or may be more
complex devices that perform a multitude of tasks. Devices may be simple sensors
and actuators such as proximity sensors, switches, motion detectors, or relays.
Devices may also be complex supervisory control and data acquisition systems that
monitor other devices on the network and provide supervisory control of the entire
system. Although individual devices may execute simple tasks, the system may
perform a complex control application, such as running a manufacturing line or
automating a building.
Control networks require a different type of networking platform than data
processing or office automation applications. Control networks are distinguished by
small messages that are frequently transmitted and that require high reliability with
low overhead.
For example, a process control system may have a number of pressure and
temperature sensors that provide pressure and temperature data to heater
controllers. Each heater controller uses the input to set the power output to the
heating elements. This system does not move megabytes of data, but does require
reliable delivery of the temperature and pressure updates to ensure correct
operation.
Many manufacturers understand the benefits of control networks and have
attempted to solve these problems by creating their own control network platform.
Manufacturers who develop proprietary control networks have a similar problem to
Introduction 6
manufacturers who develop communicating centralized controls systems—they find
that most of their engineering effort is spent implementing and testing
communications systems, rather than developing control features and applications
themselves. Ultimately, the high cost of this design approach has limited the market
for control systems.
With thousands of application developers and millions of devices installed worldwide,
the LONWORKS platform is the leading open solution for building and home
automation, industrial, transportation, and public utility control networks. The
LONWORKS platform is accelerating the trend away from proprietary control schemes
and centralized systems by providing interoperability, robust technology, faster
development, and economies of scale. Distributing the processing throughout the
network using an open control networking protocol and providing easy access to
every device lowers the overall installation and life cycle costs, increases reliability
by minimizing single points of failure, and providing the flexibility to adapt the
system to a wide variety of applications. For example, in the building control
industry, LONWORKS networks are used to provide a common infrastructure for all
building systems. This allows the building automation system designer to eliminate
excessive vertical integration, which is the often the reason for vertical isolation.
The LONWORKS platform is based on the following concepts:
1. Control systems have many common requirements regardless of application.
2. A networked control system is significantly more powerful, flexible, and scalable
than a non-networked control system.
3. Networked control systems can leverage the control system foundation to easily
evolve to address new applications, markets, and opportunities.
4. Businesses can save and make more money with control networks over the long
term than they can with non-networked control systems.
Introduction 7
An example of the evolution from purpose built to general purpose in the controls
industry is the evolution of lighting controls. A typical lighting control system for
lighting a city is typically optimized for longevity, reliability, and cost. A typical
purpose-built lighting control system relies on dedicated communications, dedicated
user controls, and a dedicated monitoring system (if the system supports monitoring).
Non-lighting functions such as energy management, 911 emergency response, or
dark sky management have seldom, if ever, been incorporated into the function of a
streetlighting system due to the cost and complexity of integrating the new
capabilities.
The alternative to a purpose-built lighting control system is a networked control
system for streetlighting. The network that provides access to the lights is the city’s
existing communications infrastructure—for example the city’s wide-area network or
metro Wi-Fi service. The segment controllers manage lights and act as an interface
to the ctiy’s wide-area network; however, they are also general purpose connectivity
products. Any networked product or sensor sharing the common technology of the
streetlighting system can be added to the segment controller. This means that the
streetlight is only the first end-point on the network, others can be added later—
preserving a city’s investment in the streetlighting system. For example, after the
system is installed, pedestrian sensors could be added to extend the functionality of
the system and provide actionable data to the system—lights could brighten when a
pedestrian is detected at a crosswalk. Finally, within the lights themselves,
embedded communications distributes the intelligence to the end-point. Doing so
allows the lights to act independently of, or in cooperation with external information
and events. In the case of our lighting system, were the city’s WAN to fail, there
would be no impact on the streetlighting. Individual lights would still respond to
lighting, time, or environmental conditions at the local level. Were pedestrian
sensors in place, lights would still balance their output. Also, if the city enabled their
parks and recreation reservation software to send time and location data to the
streetlighting system, lights could brighten at the beginning and end of night
games—providing additional safety and security.
The networked control system provides other benefits as well. City maintenance and
operations personnel can view real-time and historical health data, enabling them to
provide improved customer service, reduce downtime, eliminate excess spare part
inventory, and reduce maintenance costs.
All of these benefits are achieved because the intelligence is at the end-point of the
networked control system, the system is responsive to applications and external
information, and the networked control system is built on a platform that can easily
evolve to support new applications and services.
This document is an introduction to the basics of the LONWORKS platform. It begins
with an overview of networks and protocols, provides an overview of the components
of the LONWORKS platform, and highlights the technical aspects of the ISO/IEC
standard Control Network Protocol (CNP). The remaining sections in this chapter
provide an overview of LONWORKS networks and provide an overview of how to
implement a control network. Many of the technical details discussed in this
document are handled automatically by the protocol, the network operating system,
or network tools. The automatic handling of the lower level details of device
communication is, in fact, one of the great strengths of the LONWORKS platform.
Introduction 8
LONWORKS Networks
The underlying concept of the LONWORKS platform is that the information in a
sensing, monitoring, or control application is fundamentally the same across markets
and industries. For example, a garage door and a passenger ferry door send
essentially the same information—closed or open. A second concept underlying the
platform is the knowledge that networks, regardless of their function, increase in
power as nodes are added. Metcalf’s Law works in data networks and in control
networks.
In many ways, a LONWORKS network resembles a traditional data network. Data
networks consist of computers attached to various communications media, connected
by routers, which communicate with one another using a common protocol such as
TCP/IP. Data networks are optimized for moving large amounts of data, and the
design of data network protocols assumes that occasional delays in data delivery and
response are acceptable. Even though data networks are based on open protocols,
most manufacturers do not choose to develop their own data networking components
such as transceivers, routers, and network operating systems—it is typically more
cost effective to buy these components from a reliable supplier.
As shown in Figure , control networks contain similar components to data networks,
but the control network components are optimized for the cost, performance, size,
and response requirements of control. Control networks allow networked systems to
extend into a class of applications where data networking technology is not
appropriate. Manufacturers of control systems and devices are able to shorten their
development and engineering time by designing LONWORKS components into their
products. The result is cost-effective development and consistency that allows
devices from multiple manufacturers to be able to communicate.
Introduction 9
are used in buildings, trains, airplanes, factories, and hundreds of other processes.
Manufacturers are using open, off-the-shelf chips, operating systems, and parts to
build products that feature improved reliability, flexibility, system cost, and
performance.
Echelon manufactures a wide variety of LONWORKS products to help developers,
system integrators, and end-users implement LONWORKS networks. These products
provide a complete LONWORKS solution including development tools, network
management software, power line and twisted pair transceivers and control modules,
network interfaces, routers, controllers, technical support, and training.
Introduction 10
Compatible Devices
It is crucial that the devices installed on the common infrastructure share
information without effort. So the next checklist item is designing and selecting
products adhering to a common communication guideline. This is best achieved
within the LONWORKS platform by choosing products that have been certified by
LONMARK® International. See the LONMARK Web site at www.lonmark.org for more
information.
Introduction 11
plug-in standard, that fully support LONMARK functional profiles and configuration
properties, and that make it easy to reuse parts of your network design. These
features are provided by the LonMaker® Integration Tool, which is the most popular
network integration tool for open commercial and industrial LONWORKS networks.
Standard IP Support
The Internet Protocol (IP) suite is the standard on which the Internet is built. A
control network must often provide for encapsulation of the control system messages
or packets into IP packets. Messages can then be passed around the world without
translation into foreign protocols. The cost of transmission is minimal and the ability
to leverage existing infrastructure is practically limitless. IP support for a
LONWORKS network can be provided either by an LNS Server, i.LON SmartServer, or
LonBridge Server that is attached to both the LONWORKS network and the IP
network.
Introduction 12
Introduction 13
Chapter 2.
Platform Components
Platform Components 14
Building a Platform
Echelon Corporation invented the LONWORKS platform and the ISO/IEC 14908-1
Control Network Protocol. Thousands of control manufacturers currently
manufacture LONWORKS devices. A partial listing of these devices is available at
www.lonmark.org/products.
Echelon began the development of the LONWORKS platform and the Control Network
Protocol in 1988. This initial vision continues to drive the company forward; first, by
creating a standard, cost effective method to allow inexpensive control devices to
communicate with each other effortlessly. Then, by using the standard
communication capabilities to allow devices from multiple vendors to easily
interoperate on the same network. Echelon understood that simply developing a
protocol specification would not achieve the goal of multi-vendor systems. It was
necessary to build a cost-effective, standard method through which the protocol could
be used and supply all the necessary development tools and networking products.
The overriding goal of the LONWORKS platform is to make it easy and cost effective to
build open control systems. Echelon developed the LONWORKS platform believing
there were three fundamental issues that had to be addressed to create interoperable
products in the control market. First, a protocol optimized for control networks, but
generic in its ability to work with different types of controls had to be developed.
Second, the cost to incorporate and deploy this protocol in devices had to be
competitive. Third, the protocol had to be introduced in such a way that
implementation would not vary by vendor as this would destroy interoperability.
In order to address all of these issues effectively, Echelon Corporation set out to
create a complete platform for designing, creating, and installing intelligent control
devices. The first step was achieved through the creation of the ISO/IEC 14908-1
Control Network Protocol, which is described in Chapter 3, The Control Network
Protocol. Addressing the cost and deployment issues meant finding an economical
way to provide implementations of the protocol to customers along with development
tools. The goal of the LONWORKS platform is to provide a well-integrated, optimally
designed, and economical platform for creating smart devices and networks. This
chapter describes the following components that make up the LONWORKS platform:
• Smart Transceivers
• Development Tools
• Routers
• Network Interfaces
• Internet Servers
• Network Management
• Network Tools
Smart Transceivers
In order to achieve economical and standardized deployment, Echelon designed the
Neuron® core. The Neuron name was chosen to point out the similarities between
proper network control implementation and the human brain. There is no central
point of control in the brain. Millions of neurons are networked together, each
Platform Components 15
providing information to others through numerous paths. Each neuron is typically
dedicated to a particular function, but loss of any one does not necessarily affect the
overall performance of the network.
The Neuron core is available as a standalone component called the Neuron Chip. To
further reduce device costs, Echelon also provides Neuron cores combined with
communication transceivers, which are called Smart Transceivers.
To the developer and the integrator, the beauty of the Neuron core and Smart
Transceivers lies in their completeness. The built-in communication protocol and
processors removes the need for any development or programming in these areas.
The Smart Transceivers eliminate the need to develop or integrate a communications
transceiver. The Neuron core provides layers 2 through 6 of the ISO/OSI reference
model of a communication protocol, and the Smart Transceiver adds layer 1. The
device manufacturer only has to supply the application layer programming and the
network integrator provides the configuration for a given network installation. This
standardizes implementation and makes development and configuration simple and
fast.
Most LONWORKS devices take advantage of the functions of the Neuron core and use
it as the control processor. The Neuron core is a semiconductor component
specifically designed for providing intelligence and networking capabilities to
low-cost control devices. The Neuron core includes up to four processors that provide
both communication and application processing capabilities. Two processors execute
the layer 2 through 6 implementation of the ISO/IEC 14908-1 protocol and the third
executes layer 7 and the application code. LONWORKS 2.0 Neuron cores add a fourth
processor for interrupt processing. The device manufacturer provides application
code to run on the Neuron core and I/O devices to be connected to the Neuron core.
Echelon Corporation designed the original Neuron core and the LONWORKS 2.0
Neuron core. Neuron cores are also designed and manufactured by Echelon’s
manufacturing partners.
The Neuron core is a system-on-a-chip with multiple processors, memory, and
communication and I/O subsystems. At the time of manufacture, each Neuron core is
given a permanent unique-in-all-the-world 48-bit code, called the Neuron ID. A large
family of Neuron Chips is available with differing speeds, memory type and capacity,
and interfaces. Approximately 30 million Neuron cores have been shipped as of early
2009.
A complete operating system including an implementation of the ISO/IEC 14908-1
protocol, called the Neuron firmware, is available for the Neuron core.
Development Tools
Echelon provides a broad range of tools for developing LONWORKS devices and
applications. Following is a summary of the development tools for LONWORKS
devices:
• Mini FX Evaluation Kit—tools and evaluation boards for evaluating the
LONWORKS platform. The Mini kit can be used to develop simple LONWORKS
applications for a Neuron Chip or Smart Transceiver, but it does not include a
debugger, project manager, or network integration tool required by many devices.
Platform Components 16
• NodeBuilder® FX Development Tool—tools and evaluation boards for developing
simple or complex LONWORKS applications for a Neuron Chip or Smart
Transceiver. Includes a debugger, project manager, and network integration tool.
• ShortStack® Developer’s Kit—tools and firmware for developing LONWORKS
applications that run on processors that do not include a Neuron core. The
ShortStack kit includes firmware that is loaded onto a Smart Transceiver that
makes the Smart Transceiver a communications co-processor for the host
processor.
• FTXL Developer’s Kit—tools, firmware, and FPGA design files for developing
LONWORKS applications that run on a Nios II embedded 32-bit RISC processor
configured on an Altera Cyclone II/III family FPGA device.
Developers using any of these tools typically also require network integration and
diagnostic tools. A network integration tool is included with the NodeBuilder FX
Development Tool, but the other LONWORKS development tools do not include a
network integration tool. None of the development tools include a network diagnostic
tool. Network integration and diagnostic tools are described in Network Tools later
in this chapter.
Routers
Transparent support for multiple media is a unique capability of the LONWORKS
platform, allowing developers and network integrators to choose those media and
communication methods best suited for their needs. Multiple media support is made
possible by routers. Routers can also be used to control network traffic and partition
sections of the network from traffic in another section, increasing the total
throughput and capacity of the network. Network tools automatically configure
routers based on network topology, making the installation of routers easy for
installers and transparent to the devices.
Routers allow a single peer-to-peer network to span many types of transport media
and support tens of thousands of devices. A router has two sides, each with a
transceiver appropriate to the two channels to which the router is connected.
Routers are completely transparent to the logical operation of the network, but they
do not necessarily transmit all packets; when configured by a network integration
tool, intelligent routers know enough about the system configuration to block packets
that have no addressees on the far side. Using another type of router called an
IP-852 router, LONWORKS routers can span great distances over wide-area networks
such as the Internet.
Echelon offers routers that connect different types of twisted pair channels, as well
as IP-852 routers for routing between twisted pair channels and an IP network such
as the Internet, an intranet, or a virtual private network (VPN). A complete list of
the routers available from Echelon is available at www.echelon.com/products.
Following is a list of the most commonly used routers:
• i.LON SmartServer—routes between an IP-852 channel and a twisted pair
channel, and also provides controller functionality. The SmartServer is available
with and without IP-852 routing.
• i.LON 600—routes between an IP-852 channel and a twisted pair channel.
Platform Components 17
• MPR-50 Multi-Port Router—routes among up to 5 channels: four TP/FT-10 free
topology twisted pair and one TP/XF-1250 twisted pair.
• LonPoint Router—routes between two twisted pair channels. Six different
models are available for different types of twisted pair channels.
Network Interfaces
A network interface is a card or module that is used to connect a host computer—
typically a computer running Microsoft Windows—to a LONWORKS network. The
network interface itself does not run an application—instead it provides either layer
2 or layers 2 – 5 of the ISO/IEC 14908-1 Control Network Protocol (CNP), plus a
transceiver implementing layer 1, and firmware to exchange layer 2 or layer 5 CNP
packets with the attached computer. A complete list of the network interfaces
available from Echelon is available at www.echelon.com/products. Following is a list
of the most commonly used network interfaces:
• U10/U20 USB Network Interface—a small USB device that plugs into a USB
port on a Windows computer and attaches to a free topology twisted pair (for the
U10) or power line (for the U20) channel.
• i.LON SmartServer—a controller that can also be used as a network interface
with an IP connection to a host Windows computer.
• i.LON 600—an IP-852 router that can also be used as a network interface with
an IP connection to a host Windows computer.
Smart Servers
A smart server is a programmable device that combines a controller with a Web
server for local or remote access, LONWORKS network interface, CNP network
manager, legacy-device interface, and optional IP-852 router. Echelon’s low-cost
smart server is called the i.LON SmartServer. The SmartServer connects
LONWORKS, Modbus, and M-Bus devices to corporate IP networks or the Internet. It
features a built-in Web server that allows Web access to all the data managed and
controlled by the SmartServer, as well as built-in applications for alarming,
scheduling, data logging, and data translation. It also includes a Web binder
application for bridging multiple LONWORKS domains, as well as bridging from
Modbus and M-Bus devices to LONWORKS domains. The SmartServer provides a
SOAP/XML Web services interface for use by custom Web pages and for integration
with enterprise applications.
Network Management
LonWorks networks can be categorized by the method used to perform network
installation. The two categories of networks are managed networks and self-installed
networks. A managed network is a network where a shared network management
server is used to perform network installation. The network management server
may be part of a network operating system as described later in this section, or may
be part of an Internet server such as the SmartServer. A user typically uses a tool to
interact with the server and define how the devices in the network should be
Platform Components 18
configured and how they should communicate. Such a tool is called a network
management tool and is described in the next section. Although a network
management tool and a server are used to initially establish network communication,
they need not be present all the time for the network to function. The network
management tool and server are only required whenever changes are made to the
network’s configuration.
In a managed network, the network management tool and server allocate various
network resources, such as device and data point addresses. The network
management server is also aware of the network topology, and can configure devices
for optimum performance within the constraints of the topology.
The alternative to a managed network is a self-installed network. There is no central
tool or server that manages the entire network configuration in a self-installed
network. Instead, each device contains code that replaces parts of the network
management server’s functionality, resulting in a network that no longer requires a
special tool or server to establish network communication or to change the
configuration of the network.
Network installation includes the following steps:
• Assigning logical addresses to all devices and groups of devices.
• Binding the network variables to create logical connections between devices.
• Configuring the various control network protocol parameters in each device for
the desired features and performance, including channel bit rate,
acknowledgement, authentication, and priority service.
Network installation may be quite complex, but the complexity is hidden by the
network management solutions that are part of the LONWORKS platform. For
managed applications, functional network design can be as simple as dragging the
devices’ application functional blocks onto a drawing and connecting inputs and
outputs to determine how functional blocks communicate with each other. The
network management tool automatically assigns logical addresses, binds network
variables based on the connections drawn by the integrator, and configures network
control parameters. For self-installed applications, functional network design is as
simple as plugging in a pair of devices and pressing a button on each device to
establish communication.
The network installation process for managed networks can be either an ad hoc
process or a pre-engineered process. The network installation process for
self-installed networks is typically an ad hoc process. In the ad hoc method, the
devices are first connected to the network and powered-up, and the configuration
data is either self-installed or downloaded over the network as each device is defined
in a network integration tool. In the engineered method, the information is collected
into a database by the network integration tool and is downloaded to the devices at
installation time. For a managed network using either method, the network
integration tool automatically maintains a database that accurately reflects the
configuration of each device in the system.
Networks can start out as self-installed networks using ISI and, as size or complexity
grows beyond the ISI limits, can be upgraded into a managed network. A
self-installed network may also be transitioned to a managed network to take
Platform Components 19
advantage of the additional flexibility and capability provided by a network
management tool and server.
Platform Components 20
the underlying communication mechanisms between the software component and the
device. Thus, many existing devices can become fully interoperable by simply writing
a plug-in. A standard interface is set for manufacturers to customize the front end,
while LNS makes it possible for multi-vendor software components to work together.
Network Tools
Network tools are software applications built on top of the network operating system
for network design, installation, configuration, monitoring, supervisory control,
diagnostics, and maintenance. Many tools combine these functions, but the most
common combinations are the following:
• Network Integration Tools. Provide the essential functions required to design,
configure, commission, and maintain a network.
• Network Diagnostic Tools. Special-purpose tools to observe, analyze, and
diagnose network traffic and monitor network loading.
• HMI Development Tools. Tools for creating human-machine interface (HMI)
applications. HMI applications are used for operator interfaces to operational
systems.
• I/O Servers. General-purpose drivers that provide access to LONWORKS networks
for HMI applications not originally designed for LONWORKS networks.
Network tools based on the LNS Network Operating System are interoperable,
meaning they can operate at the same time on the same network and maintain a
consistent view of the devices in the network and their configuration. Echelon’s
offerings for network tools include the LonMaker Integration® Tool and the
LonScanner™ Protocol Analyzer, which are described in the following sections.
Platform Components 21
LonMaker Integration Tool
The LonMaker Integration Tool is a software package for designing, documenting,
installing, and maintaining multi-vendor, open, interoperable LONWORKS networks.
Based on the LNS Network Operating System, the LonMaker tool combines a
powerful client-server architecture with an easy-to-use Visio user interface. The
result is a tool that is sophisticated enough to design, commission, and maintain a
distributed control network, yet provide the ease-of-use required by network design,
installation, and maintenance staff.
The LonMaker tool conforms to the LNS plug-in standard. This standard allows
LONWORKS device manufacturers to provide customized applications for their
products, and have these customized applications automatically started when the
LonMaker user selects the associated device. This makes it easy for system
engineers and technicians to define, commission, maintain, and test the associated
devices.
For engineered systems, network design is usually done off-site, without the
LonMaker tool attached to the network. Network design may, however, take place
on-site, with the tool connected to a commissioned network. This feature is especially
desirable for smaller networks or where adds, moves, and changes are a regular
occurrence.
Users are provided with a familiar, CAD-like environment for designing a control
system. Visio’s smart shape drawing feature provides an intuitive, simple means for
creating devices. The LonMaker tool includes a number of smart shapes for
LONWORKS networks, and users can create new custom shapes. Custom shapes may
be as simple as a single device or functional block, or as complex as a complete
subsystem with predefined devices, functional blocks, and connections between them.
Using custom subsystem shapes, additional subsystems can be created by simply
dragging the shape to a new page of the drawing, a time-saving feature when
designing complex systems. Any subsystem can be changed to a supernode by adding
network variables to the subsystem shape. Supernodes reduce engineering time by
exposing a simplified interface to a set of devices.
Network installation time is minimized by the ability of the installer to commission
multiple devices at the same time. Devices can be identified by service pin, bar code
scanning Neuron IDs, winking, or manually entering the IDs. Auto discovery can be
used for systems containing embedded networks to automatically find and
commission the devices in the system. Testing and device configuration is simplified
by an integrated application for browsing network variables and configuration
properties. A management window is provided to test, enable/disable, or override
individual functional blocks within a device or to test, wink, or set online and offline
states for devices.
The LonMaker tool can both import and export AutoCAD files and generate as-built
documentation. An integrated report generator and bill-of-materials generator can
also be used to generate detailed reports of the network configuration.
The LonMaker tool is a single expandable tool covering the entire life cycle of the
network to simplify the tasks of installers.
Platform Components 22
LonScanner Protocol Analyzer
The LonScanner Protocol Analyzer is a software package that provides network
diagnostic tools to observe, analyze, and diagnose the behavior of installed
LONWORKS networks.
The protocol analyzer can be used to collect, timestamp, and save all CNP packets on
a LONWORKS channel. Packets are saved in log files that can be later viewed and
analyzed; packets may also be viewed in real-time as they are collected by the
protocol analyzer.
A sophisticated transaction analysis system examines each packet as it arrives and
associates related packets to aid the user in understanding and interpreting traffic
patterns in their network.
Logs can be displayed in summary form with one packet per line for quick analysis,
or in expanded form with one packet per window for more detailed analysis. Using
data imported from an LNS database, the protocol analyzer decodes and displays
packet date using the device and network variable names assigned during
installation. It also provides text descriptions of each message and a description of
the CNP message service used to transmit it. Eliminating the need for the user to
manually interpret the ones and zeros of CNP reduces the time and effort needed to
diagnose network problems.
The user can specify capture filters to limit the packets collected. Filters can be used
to limit the captured packets to packets between selected devices or network
variables, or to packets using selected CNP services.
A traffic statistics tool provides access to detailed statistics related to network
behavior. The statistics include total packet counts, error packet counts, and
network loading. The statistics display provides the user with an easy-to-read
summary of network activity.
Platform Components 23
Platform Components 24
Chapter 3.
The Control Network Protocol
CNP Layers
To provide a low-cost, reliable, and robust communications standard, CNP is layered
as recommended by the International Standards Organization Open Systems
Interconnect (ISO OSI) reference model. The OSI layers ensure that the required
services are provided without unexpected interactions between the services.
CNP provides the following services for each of the seven layers of the OSI reference
model:
1. The physical layer defines the transmission of raw bits over a communication
channel. A channel is a physical transport medium for packets. The physical
layer ensures that a 1 bit transmitted by a source device is received as a 1 bit by
all destination devices. CNP is media independent, so multiple physical layer
protocols are supported depending on the communication medium.
2. The link layer defines media access methods and data encoding to ensure
efficient use of a single communications channel. The raw bits of the physical
layer are combined into data frames. The link layer defines when a source device
Layer Data
3 Network Datagram
7 Application Message
CNP Limits
CNP supports up to 32,385 devices per domain, and a practically unlimited number
of domains (the domain identifier may be 0, 1, 3, or 6 bytes long). Each CNP device
has a unique 6-byte identifier and can also be configured to recognize logical
addresses using subnet, node, and group identifiers as described in the layer-3
documentation in Chapter 3. Devices typically communicate with data values called
network variables that are described in the layer-6 documentation in Chapter 3. To
support flexible connection topologies for network variables, CNP defines network
variable aliases as describe in the layer-6 documentation in Chapter 3. Any CNP
device can monitor and update any number of network variables in a domain, but
network variable reads and writes are simplified by using network variable
connections as described in the layer-6 documentation in Chapter 3—these
connections require bindable network variables and network variable aliases. The
following limits apply per CNP domain. These concepts are described in more detail
in Chapter 3. The network variable and network variable aliases may be further
limited by the CNP implementation on a device.
• A maximum of 32,385 devices per domain.
• A maximum of 255 subnets per domain.
• A maximum of 256 groups per domain.
• A maximum of 127 devices per subnet.
• A maximum of 64 devices per group for acknowledged services
• A maximum of 32,385 devices per group for unacknowledged and repeated
services.
• A maximum of 4096 bindable network variables per device.
• A maximum of 8192 network variables aliases per device.
Channel Types
Table 3 lists the common LONWORKS communication channel types. All of these
media are bidirectional, supporting transmission and reception of data by every
device. The ID column in the table lists unique identifiers for each channel type that
can be used by a network tool to verify compatibility between the device and its
channel. The Description column in the table lists the specification that defines the
characteristics of the channel. The Standard column in the table identifies the
channel types that can be used to create devices that can be certified by LONMARK
International. Additional standard channel types are listed at
www.lonmark.org/mid.
See the documents listed in the Definition column in Table 3 for more information on
any of the channel types.
TP/FT-10 Transceivers
TP/FT-10 Cables
Echelon has qualified a variety of cables for use with TP/FT-10 channels. Based on
the cost, performance, and availability of these different cable types, system
designers can choose the most appropriate cable for their application. Echelon has
qualified the following generic cable types:
• A generic 16AWG (1.3mm diameter) cable (similar to Belden 8471 or 85102)
• NEMA Level 4 cable (this cable is not equivalent to TIA Category IV cable)
• TIA Category 5 cable
• JY(St)Y for specific applications in the European market
The electrical specifications for these cables can be found in the FT 5000 Smart
Transceiver Data Book. A list of cable vendors can be found in the Junction Box and
Wiring Guidelines for Twisted Pair LONWORKS Networks engineering bulletin.
These cables have been qualified by Echelon in a generic form, and are available from
vendors in a number of variations, including shielded, unshielded, plenum, and
non-plenum jacketing.
TP/FT-10 Specifications
Table 4 lists the transmission specifications for free topology TP/FT-10 channels.
The maximum total wire length is the total length of wire with a TP/FT-10 segment.
The specifications can be increased by using doubly-terminated bus topology as
shown in Table 5.
• Up to 64 locally-powered TP/FT-10 devices or 128 link-powered devices are
allowed per network segment. If both locally-powered and link-power devices are
used on a TP/FT-10 channel, a maximum of 128 network loads can be attached to
the channel, where a locally-powered device counts as two loads and a
link-powered device counts as one load.
• For free topology TP/FT-10 channels, the distance from each transceiver to all
other transceivers and to the termination (including the LPI-10 termination, if
used) must not exceed the maximum device-to-device distance shown in Table 4.
If multiple paths exist, such as a loop topology, then the longest path should be
used for calculations.
• The average temperature of the wire must not exceed +55°C, although individual
segments of wire may be as hot as +85°C.
• As a general rule, the TP/FT-10 channel communication cables should be
separated from high voltage power cables. Local electrical codes must be followed
with regard to cable placement.
• A doubly-terminated bus may have stubs of up to 3 meters from the bus to each
device.
• The sum of the application current of all the link-powered devices in a segment
must not exceed 3.2A at +5V.
TP/FT-10 Termination
TP/FT-10 network segments require termination for proper data transmission
performance. The type of terminator varies depending on whether shielded or
unshielded cable is used. Free topology and bus topology networks also differ in their
termination requirements.
In a free topology segment, only one termination is required and may be placed
anywhere on the free topology segment. There are two choices for the termination:
an RC network (Figure 7), with Ra = 52.3Ω ±1%, 1/8W, or an LPI-10 Link Power
Interface, with the LPI-10 jumper at the “1 CPLR” setting.
PL-20 Specifications
Table 6 lists the transmission specifications for the PL-20 power line channels.
Media Access
CNP uses a unique media access control (MAC) algorithm that enables an overloaded
channel to operate close to its maximum capacity. Other MAC algorithms tend to
degrade near maximum capacity due to excess collisions consuming the available
bandwidth.
Many different MAC algorithms exist in networks today. The three most common
are token ring, token bus, and carrier sense multiple access (CSMA). The MAC
algorithm used by CNP belongs to the CSMA family.
Token Bus
A token bus architecture solves the problem of sequential passing of a MAC token by
including addressing information in the token. However, at low data rates, the
process of circulating the token can result in considerable token latency. Because a
device cannot transmit without first possessing the token, this latency adversely
affects response time, which is a key parameter for control networks.
Additionally, token bus systems must reconfigure themselves each time a new device
either becomes active or drops out. This overhead to reconfigure is a problem for all
token bus networks. Because reconfiguration brings the network down for its
duration, battery-powered devices whose normal operation is to wake up, send some
messages, and power down, would cause the token bus system to suffer frequent
reconfigurations. Battery-powered devices are required for applications needing RF
or IR communication, for security applications, and for fire/life safety applications, to
name a few.
Packet Cycle
Packet Packet
Beta 2 Slots
Priority
A key requirement of control networks is timely response to priority messages. CNP
includes an optional priority mechanism to improve the response time of critical
packets. When a device tries to access the communication medium, priority
messages are given earlier access than non-priority messages. The protocol permits
the network management tool to allocate a fixed number of beta 2 slots per channel
as priority time slots dedicated to priority devices. The number of priority slots can
be from 0 to 127. The network management tool that assigns priority slots to
individual devices can ensure that one and only one device is assigned to a particular
priority slot on the channel. Each priority time slot on a channel adds a minimum of
two bit times to the transmission of every message. The amount of overhead will
vary based upon the bit rate, oscillator accuracy, and transceiver requirements. For
example, using a TP/XF-1250 1.25Mbps twisted pair transceiver with all devices on
the channel having an oscillator accuracy of 0.02% (200ppm) or better, each priority
slot is 30 bit-times wide. Because there is no contention for the media during the
priority portion of a packet cycle, devices configured with priority have better
response time than non-priority devices.
Figure 12 illustrates priority and non-priority beta slots. The value m is the number
of priority slots. It is controlled by the network management tool used to install the
devices on a channel. Its value may be zero to 127. The value n is the number of
non-priority slots. It is calculated by each device on a channel and may be any value
from 16 to 1008 - m.
1 2 3 ... m 1 2 3 ... n
Packet Packet
Frame Format
When a device has a message to send, it uses the MAC algorithm to decide when to
send it. When the device sends the message, the bits within the message are encoded
as a frame. The frame has the following components: the preamble, link layer
header, network layer datagram, CRC, and end-of-packet indicator. A CNP frame
has the following format (bit-sync is a variable number of bits, but must be at least 6
bits long):
T
1 1 1 0 1 1 0 0 0
Data
Transmit
Enable
Layer-2 Performance
CNP Predictive p-Persistent CSMA Performance
The CNP predictive algorithm works best when a majority of the CNP packets on a
channel are acknowledged. The number of acknowledgements that a given packet
generates is encoded into each acknowledged packet. Each device on the channel
receives all the acknowledged packets on the channel and adds the number of
acknowledgements to the channel backlog. If none of the packets is acknowledged,
the predictive part of the algorithm does not dynamically expand the number of
randomizing slots with an increase in load. Using exclusively unacknowledged
services causes CNP to behave like a non-predictive p-persistent CSMA where p =
0.0625. However, even this degenerate case is still significantly better than IEEE
802.3 (which is a p-persistent CSMA protocol where p = 1) under conditions of heavy
network traffic.
1200 20
1100
Throughput vs
1000
Collision Rate 16 %
900 C
800 o
700 12 l
l
packets/s600 i
500 8 s
400 i
o
300
4
n
200 s
100
0 0
0 75 150 225 300 375 450 525 600 675 750 825 900 975 1050 1125 1200
Offered Traffic
L3 Throughput L4 Throughput Collision Rate
Figure 14 Effective Network Throughput vs. Offered Traffic Using Unacknowledged Services
The results of two benchmarks used to illustrate this point are shown in Figure 14
and Figure 15. The graphs shown in these figures illustrate results achieved from a
test bed of 34 devices. Thirty-two of the devices acted as traffic generators. The
other two acted as test devices, repeatedly sending messages to each other at
Figure 15 Effective Network Throughput vs. Offered Traffic Using Acknowledged Services
To demonstrate the effectiveness of the predictive algorithm, the experiment was
re-run with only one change. In this case, messages used acknowledged services.
Figure 15 shows the data derived from this experiment. The graph shows that
network throughput degrades slightly with an increase in offered traffic past the
saturation point.
Figure 14 and Figure 15 illustrate how the collision rate grows slowly, even past the
channel saturation point. This active management of the collision rate is what
makes the CNP predictive p-persistent CSMA algorithm superior to other CSMA
algorithms.
4.883 25 20
9.766 45 35
19.531 110 85
4.883 7 5
9.766 13 10
19.531 25 20
39.063 50 40
78.125 100 80
Groups
A group is a logical collection of devices within a domain. Unlike a subnet, however,
devices are grouped together without regard for their physical location in the domain.
The Neuron firmware implementation of CNP allows a device to be configured to be a
member of up to 15 groups, other implementations have different limits.
Groups are an efficient way to use network bandwidth for messages addressed to
multiple devices (that is, one-to-many connections). Figure 20 illustrates a network
with two groups. Group 1 consists of devices 1, 2, 3, 10, 11, and 12. Group 2 consists
of devices 3, 4, 5, and 7. Device 3 is in both groups.
Group 2
Group 1
Channel 1
Channel 2
Channel 3
Channel 4
Neuron ID
In addition to the subnet/node ID address, a device may always be addressed by a
unique ID call the Neuron ID. The Neuron ID is 48-bits long, and is assigned when
Addressing Formats
CNP devices are addressed using one of five addressing formats. The particular
addressing format used determines the number of bytes required for the source and
destination address. Table 9 defines the formats and number of bytes required for
each. The total address size is computed by adding the appropriate number of bytes
indicated in the table to the size of the domain ID, which can range from 0 to 6 bytes
depending on the configured size of the domain ID.
Address Size
Address Mode Address Format Destination (bytes)
Address Table
Each CNP device contains an address table that contains addressing information
that can be managed by a network management tool in a managed network, or by the
CNP implementation on the device in a self-installed network. A CNP application
can specify an address for an outgoing message by referencing an entry in the
address table. This type of address is called an implicit address. Alternatively, a
CNP application can specify the full layer-3 address for an outgoing message. This
type of address is called an explicit address.
The advantage of implicit addressing is that it eliminates the requirement for a CNP
application to manage destination addresses. Layer-3 addresses are typically
allocated and managed by the network management tool in a managed network or
the ISI engine in a self-installed network. The CNP application can send a message
using a fixed index into the address table rather than attempting to determine the
full layer-3 address for each message.
Routers
Routers are infrastructure devices that connect two channels and route packets
between them. Routers can be installed to use one of four routing algorithms:
• Repeater. A repeater is the simplest form of router, simply forwarding all valid
packets between the two channels. Using a repeater, a subnet can exist across
multiple channel segments.
• Bridge. A bridge forwards all packets which match its domains between the two
channels. Using a bridge, a subnet can exist across multiple channel segments.
• Learning Router. A learning router monitors the network traffic and learns the
network topology at the domain/subnet level. The learning router then uses its
knowledge to selectively route packets between channels. Learning routers
cannot learn group topology, so all packets using group addressing are forwarded.
• Configured Router. Like a learning router, a configured router selectively routes
packets between channels by consulting internal routing tables. Unlike a
learning router, the contents of the internal routing tables are defined by a
network management tool. A network management tool can optimize network
traffic by defining routing tables for both subnet and group address routing.
Configured routers do not execute the learning algorithm as a learning router
does. Instead, the network management tool pre-configures the router’s
forwarding tables at the time of installation, based on the tool’s knowledge of the
network topology.
Configured routers and learning routers are a class of routers known as intelligent
routers.
Learning
Device 1 Device 2 Device 3 Router 1
Subnet 1 Channel 2
Learning
Router 2 Device 4 Device 5 Device 6
Channel 3 Subnet 2
Subnet 3
Figure 21 Learning Routers
Meanwhile, learning router 2 has also passed on the message, making an appropriate
notation in its internal routing tables regarding the location of subnet 2.
If device 2 generates an acknowledgement, the acknowledgement is picked up by
learning router 1, which now notes the location of subnet 1. Learning router 1
examines its internal routing tables, and, upon discovering that subnet 2 lies below,
passes the message on. When the message appears on subnet 2, it is noted by both
device 5 (the destination device), and learning router 2, who does not pass it on but
merely notes that subnet 1, like subnet 2, lies somewhere above. Learning router 2
will not learn of the existence or location of subnet 3 until a message is originated
from there.
Configured routers should always be used when possible for the following reasons:
• The initial flood of traffic that occurs while a learning router is learning the
network topology may cause congestion problems.
• The network topology may have inadvertent “loops,” which are common in power
line and RF networks, that can cause a learning router to develop an inaccurate
network image.
• Learning routers do not learn about groups but configured routers can be
configured to selectively forward group addressed packets.
Subnets cannot cross intelligent routers. While bridges and repeaters allow subnets
to span multiple channels, the two sides of an intelligent router must belong to
separate subnets. The fact that intelligent routers are selective about the packets
they forward to each channel can be used to increase the total capacity of a system in
terms of devices and connections. In general, it is always a good idea to segment
traffic among “communities of interest” if possible.
Datagram Format
The network layer builds a datagram by adding a network header to a transport
layer packet. A CNP datagram has the following format:
msb lsb
Version Packet Addr Format Length
Format
Address (3 to 9 bytes)
Domain (0, 1, 3, or 6 bytes)
Packet
The Version field defines the CNP version number, and is always 0.
The Packet Format field defines the format of the packet enclosed within the
datagram, and contains one of the following values:
Packet Format Packet Format
Field
0 Transport Packet
1 Session Packet
2 Authenticated Packet
3 Presentation Packet
The packet formats are defined in chapters 5, 6, and 7.
The Addr Format field defines the format of the address contained within the
datagram and contains one of the following values:
Addr Format Address Format
Field
0 Subnet Broadcast
1 Group
2 Subnet/Node or Group
Acknowledgement
3 Neuron ID
The Address field contains the network address for the message. The format of the
address is defined by the Addr Format field. A Subnet Broadcast address has the
following format:
Message Services
CNP offers four basic types of message service: acknowledged, request/response,
repeated, and unacknowledged. The acknowledged, repeated, and unacknowledged
services are managed by the transport layer. The request/response service is
managed by the session layer. These services provide a tradeoff between reliability
and efficiency.
• The most reliable service is acknowledged, or end-to-end acknowledged service,
where a message is sent to a device or group of devices and individual
acknowledgements are expected from each receiver. If an acknowledgement is
not received from all destinations, the sender times out and retries the
transaction. The number of retries and the time-out are both selectable (see CNP
Timers, later in this document). Transaction IDs are used to keep track of
messages and acknowledgements so that the application does not receive
duplicate messages.
• An equally reliable service is repeated, also called the unacknowledged repeated
service, where a message is sent to a device or group of devices multiple times,
and no response is expected. This service is typically used when broadcasting to
more than a few devices, because the number of packets required to repeat the
transmission will be less than the number of packets required for all the
acknowledgements. For example, if a device sends an acknowledged message
with four retries to five devices, there will be a minimum of six packets—the
original message plus five acknowledgements. If the same message was sent
with the repeated service with a repeat count of four, only four packets would be
generated, yet the probability of delivery would be identical. A good
rule-of-thumb is to use repeated service instead of acknowledged service
whenever the size of the group is larger than the retry count. The exception to
this rule is if the sending application needs notification of delivery failure, in
which case acknowledged service should be used. This is typically only required
if the sending application can take alternative action in case of delivery failure.
• The least reliable is unacknowledged, where a message is sent once to a device or
group of devices and no response is expected. This is typically used when the
receiving application is not sensitive to the loss of a message. This is typically
the case with data that is sent using a periodic heartbeat. For example, if a
temperature sensor used for space comfort control in a room reports the
temperature once a minute, missing an update is not serious, because the
temperature will be updated on the next heartbeat.
With one exception, the three transport layer message services—unacknowledged,
acknowledged, and repeated—can be used with any layer-3 address mode: broadcast,
unicast, multicast, or Neuron ID. The exception is that broadcast acknowledged
transactions complete once a single acknowledgment is received—any remaining
acknowledgements are ignored.
Unacknowledged Service
When this service is used, the only timer that is involved is the free buffer wait
timer. This timer determines the maximum length of time the device will wait for a
free buffer when sending a message. This timer can be deactivated (the device will
wait forever) by setting the timer value to zero. If it is set to another number, n, then
the device will wait between 2i and 2i + 1 seconds. For example, if the configured
number n is set to 2, then the device will wait for a free buffer for between 4 and 5
seconds. If a buffer is not obtained before the timer expires, the device assumes a
fatal error and resets.
Acknowledged Service
Acknowledged service also uses the free buffer wait timer, but additional timers are
necessary. The sending device uses a transaction timer to determine when a retry
should be attempted. The receiving devices use a receive transaction timer to detect
duplicate messages.
Repeated Service
This service follows essentially the same message flow as acknowledged service, with
a few exceptions. In the address table of the transmitter there is a separate timer
known as the repeat timer. This timer specifies how frequently the message is
repeated when using repeated service. This time can be shorter than the transaction
timer, because no acknowledgement is expected (no time for the acknowledgement
need be allotted) when these messages are sent. Transaction IDs and duplicate
detection are in effect for these transactions. The initial packet is repeated as many
times as is specified by the repeat count, from 1 to 15 times. This timer should be
long enough for the receiving device or devices to overcome any short term buffer
shortages.
msb lsb
Auth Transport Packet Transaction Number
Format
Enclosed Packet
The Auth field is set to 1 for an authenticated message, and is set to 0 for messages
that are not authenticated.
The Transport Packet Format field defines the format of the packet enclosed within
the transport packet, and contains one of the following values:
0 Acknowledged Message
1 Repeated Message
2 Acknowledgement
4 Reminder Preamble
5 Reminder Message
msb lsb
Length
Member List (3 to 8 bytes)
The Length field specifies the number of bytes in the member list, and will be a value
between 3 and 8. The Member List field is a bit map of the members in the group.
Each bit represents a member of the group where the LSB of the first byte represents
member 0, the next bit is member 1, etc. A value of 0 indicates that the member's
acknowledgment has not been received by the sender, a value of 1 indicates that the
acknowledgment has been received.
A reminder message (transport packet format 5) enclosed packet combines a
reminder preamble with the original presentation packet and has the following
format:
msb lsb
Length
Member List (0 to 2 bytes)
Presentation Packet
The Length and Member List fields have the same format as for the reminder
preamble. A Length value of 0 means all members should acknowledge.
Request/Response
The request/response service is used when a message is sent to a device or group of
devices and individual responses are required from each receiver. The incoming
message is processed by the application on the receiving device before a response is
generated. The same retry and time-out options are available as with acknowledged
service. Responses may include data, making this service particularly suitable for
implementing remote procedure calls or client/server applications.
With one exception, the request/response service can be used with any layer-3
address mode: broadcast, unicast, multicast, or Neuron ID. The one exception is that
when performing a broadcast request/response the application will receive only the
first response; all others will be discarded by the network layer.
The message flow for request/response service is identical to acknowledged service,
except that the application sends a response in lieu of an acknowledgement.
Network management tools must take into account the extra processing time
required by the application to generate the acknowledgement when calculating the
transaction and receive transaction timers.
Authentication
When using authenticated messages, the receivers of an authenticated message
determine if the sender is authorized to send that message. This can prevent
unauthorized access to devices and their applications. This can be used to prevent
unauthorized access to devices and their applications. For example, by using
authentication, an electronic lock device can verify that an “open” request comes from
the owner, not from someone attempting to break into the system
Authentication is implemented by distributing 48-bit keys, one per domain, to the
devices at or prior to installation time. For an authenticated message to be accepted
by the receiver, both sender and receiver must possess the same key. This key is
distinct from the device’s Neuron ID.
As shown in Figure 22, when an authenticated message is sent, the receiver
challenges the sender to authenticate itself, using a different random number as a
challenge every time. The sender then authenticates by transforming the challenge,
using the authentication key along with the data in the original message. The
receiver compares the reply to the challenge with its own transformation on the
challenge. If the transformations match, the transaction goes forward. This is called
an authenticated transaction. The transformation used is designed so that it is
extremely difficult to deduce the key, even if the challenge, reply, and authentication
algorithm are all known. The use of authentication is configurable individually for
each network variable connection. In addition, network management transactions
may be optionally authenticated.
Authentication Control
For a given message, it is up to the sender of the message to initiate an authenticated
transaction when required. The sender does this by setting the authentication bit in
the message. When a receiver receives a message with the authentication bit set, it
must respond with an authentication challenge, even if it does not require the
message to be authenticated. It is up to the receiver to determine whether or not the
message must be authenticated. This means that a sender may initiate an
authenticated transaction on any message, whether required or not. However, a
sender should not initiate an authenticated transaction unless it is required by the
receiver, since authenticated transactions consume double the bandwidth of non-
authenticated transactions. In a group connection, there may be a mixture of
receivers that require authentication and receivers that do not require
authentication. In this case, any update sent to the group must be sent as an
authenticated transaction, even though all receivers do not require it.
A receiver may choose to honor a request initiated by a failed authentication
transaction, and will typically do so for any messages that do not require
authentication. For example, if a receiver does not require network management
messages to be authenticated but receives a Read Memory request with the
authentication bit set in the message, the receiver sends an authentication challenge,
but ignores the authentication response and sends the results of the Read Memory
request as if the authentication bit was not set.
The Auth field is set to 1 for an authenticated message, and is set to 0 for messages
that are not authenticated.
The Session Packet Format field defines the format of the packet enclosed within the
session packet, and contains one of the following values:
Session Packet
Format Field Session Packet Format
0 Request
2 Response
4 Reminder Preamble
5 Reminder Message
Request (session packet format 0) and response (session packet format 2) enclosed
packets consist of presentation packets as described in Layer 4—Transport Layer.
The request session packet is used for the first transmission of a request message
(the reminder preamble and reminder message are used for subsequent
transmissions). The response session packet is used for response messages.
A reminder preamble (session packet format 4) session packet flags the first message
of a message pair that is used for selective soliciting of responses for multicast
requests. This message pair is used by a device that has transmitted a multicast
request, and the highest numbered group member that has not responded is member
number 16 or higher. The second message of the pair is a retransmission of the
original request. The reminder preamble has the following format:
msb lsb
Length
Member List (3 to 8 bytes)
The Length field specifies the number of bytes in the member list, and will be a value
between 3 and 8. The Member List field is a bit map of the members in the group.
Each bit represents a member of the group where the LSB of the first byte represents
member 0, the next bit is member 1, etc. A value of 0 indicates that the member's
response has not been received by the sender—a value of 1 indicates that the
response has been received.
A reminder message (session packet format 5) session packet combines a reminder
preamble with the original presentation packet and has the following format:
The Length and Member List fields have the same format as for the reminder
preamble. A Length value of 0 means all members should respond.
msb lsb
Addr Format 0 0 Transaction Number
Random Bytes (8 bytes)
Destination Group (0 or 1 byte)
The Addr Format field is the same as the Addr Format field in the network header,
described in Addressing Formats.
The Transaction Number field contains the same transaction number as the
challenged Transport Packet or Session Packet.
The Random Bytes field contains a challenge consisting of 8 random bytes.
The Destination Group field is present only if the Addr Format field specifies a group
address (address format 1). This field contains the same value as the Destination
Group field in the network header.
When the transmitting node receives the challenge, it responds with a Reply Packet.
The Reply Packet has the following format:
msb lsb
Addr Format 1 0 Transaction Number
Challenge Reply (8 bytes)
Destination Group (0 or 1 byte)
The Addr Format, Transaction Number, and Destination Group fields are the same
as for the Challenge Packet.
The Challenge Reply field contains an 8-byte value that is computed using the
original presentation packet, the transmitter's authentication key, and the 8 random
bytes in the challenge.
Messages
Data is exchanged between applications at layer 6 encoded as messages. Each
message consists of a 1-byte message code followed by 0 to 227 bytes of data, with the
exception of network variables that consist of 1 to 31 bytes of data. The message code
identifies the type of data contained within the message. Table 10 lists the message
types supported by CNP, and the message codes used for each type.
Table 10 Message Codes
Foreign frames are exchanged as a simple array of bytes that can be interpreted by
the application in any way (for example, as a frame of a foreign protocol).
The message types are described in more detail in the following sections.
Message codes are also used for responses to request/response messages, and are
encoded as shown in Table 12.
Table 12 Message Codes for Responses
Application Response 00 – 3E 0 – 62
Network Variables
Network variables are CNP data values that may be shared among multiple devices.
Network variables may represent a single value or a structure or union of multiple
values containing 1 to 31 bytes. A device may have multiple network variables, and
each network variable may be shared with one or more network variables on any
device or group of devices within a network.
Up to 31 bytes may be embedded in a network variable structure and propagated as
a single network variable. If more than 31 bytes of data are needed in a single
message, application messages can be used as described in the next section. Network
Scalar data types and fields specify scaling factors that can be used to modify the
range of the type. The scaling factors are defined by three values called A, B, and C.
These values are used to calculate a scaled value as follows:
ScaledValue = A * 10B * (UnscaledValue + C)
For example, the SNVT_lev_percent type is defined to represent a one-byte
percentage value. The scaling factors are defined as A=5, B=-2, and C=0, resulting in
the following scaling formula:
ScaledValue = 5 * 10-3 * (UnscaledValue + 0)
Using this formula, an unscaled value of 200 results in a scaled value of 100. A value
of 1 results in 0.5, providing an 0.5 percent resolution.
Scalar data types and fields define a units string that describes the data contained
within the network variable or field. This string may be specified in multiple
languages to allow localization of displayed values. For example, the
English-language unit string for the SNVT_lev_percent network variable type is “%
of full scale.”
Units of measures are typically specified in Systeme Internationale (SI) units. For
example, temperature is always represented in Celcius. A standard mechanism is
provided to scale measurement values. This allows measurement values to be
displayed in alternative systems. For example, temperature can be displayed in
Fahrenheit using an appropriate format.
Scalar data types and fields define minimum and maximum values for the network
variable type. These values restrict the values that may be assigned to the network
variable or field. Scalar data types may also define an invalid value. An invalid
value indicates that the value of the network variable is unknown. For example, a
temperature sensor network variable output that reports an invalid value indicates
that the current temperature is not available.
Presentation Packet
The presentation packet defines the physical encoding of the presentation layer data.
The first byte of the presentation packet is the message code as described in Table 10
and Table 12. For network variables, the message code specifies the upper 6 bits of
the network variable selector.
Network variable updates and polls are encoded as CNP messages containing the
network variable selector and the new network variable value. The following figure
illustrates the format of network variable messages. The Selector Hi field contains
the top 6 bits of the selector, and the Selector Lo field contains the lower 8 bits of the
selector. The Dir field is 0 for input network variable updates and 1 for output
network variables. While only input network variables can receive a new value
through layer-6 addressing, both input and output network variables can be read
remotely using layer-6 addressing through a network variable poll request message.
msb lsb
1 Dir Selector Hi
Selector Lo
Network Variable Data (1 to 31 bytes)
Multi-byte network variables are sent with the most significant byte first. Arrays
are sent with the lowest numbered element first. Structures are sent with the first
field at the beginning.
The presentation packet for an application message has the following format:
msb lsb
0 0 Application Message Code
Application Message Data (0 to 249 bytes)
The presentation packet for a foreign frame message has the following format:
msb lsb
0 1 0 0 Foreign Message Code
Foreign Frame Data (0 to 249 bytes)
msb lsb
1 1 Selector Hi
Selector Lo
Application Configuration
A configuration property (CP) is a data item that, like a network variable, is part of
the device interface for a device. Configuration properties characterize the behavior
of a device in the system. Network tools manage this attribute and keep a copy of its
value in a database to support maintenance operations. If a device fails and needs to
be replaced, the configuration property data stored in the database is downloaded
into the replacement device to restore the behavior of the replaced device in the
system.
Configuration properties facilitate interoperable installation and configuration tools
by providing a well-defined and standardized interface for configuration data. Each
configuration property type is defined in a resource file that specifies the data
encoding, scaling, units, default value, range, and behavior for configuration
properties based on the type. A rich variety of standard configuration property types
(SCPTs pronounced skip-its) are defined. SCPTs provide standard type definitions
for commonly used configuration properties such as dead-bands, hysteresis
thresholds, and message heartbeat rates. You can also create your own user
configuration property types (UCPTs pronounced you-keep-its) that are defined in
resource files that you create with the NodeBuilder Resource Editor.
Application Specification
CNP application provides a standard set of interfaces for a device to document the
tasks that it performs. Each task is exposed as a functional block that is defined as a
set of network variables and configuration properties contained within a functional
block. The device interface, also called the XIF, may be documented by the device
itself, or by a separate file called the device interface file, or XIF file. The device
interface is uniquely identified by an identifier called the program ID.
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
1 1 0 0 1 1 0 1
800ns @ 1.25Mbps
Figure 26 Differential Manchester Encoding
Differential Manchester encoding has the benefits of zero DC offset, polarity
insensitivity, and simple bit synchronization between the transmitter and one or
Single-Ended Mode
The single-ended mode is most commonly used with external active transceivers
interfacing to media such as free topology twisted pair, radio frequency (RF) carrier,
infrared, fiber optic, and coaxial cable.
Figure 27 shows the communications port configuration for the single-ended mode of
operation. Data communication occurs via the single-ended (with respect to VSS)
input and output buffers on pins CP0 and CP1. Single-ended mode contains an
active low sleep output (CP3) which can be used by the transceiver to power down
active circuitry when the Neuron core goes to sleep.
Differential
NRZ Data Manchester CP0 Data Input
Decoder
Differential
NRZ Data CP1 Data Output
Manchester
Encoder
Transmit Enable
Transmit Enable CP2 Output
~Sleep (~Power-down)
~Sleep CP3
Output
CP4 ~Collison Detect
Input
Collision Detect Enable
Transmit
Enable
For the receiver to reliably terminate reception of a packet, the received line-code
violation period must have no transitions until the Neuron core detects the end of the
packet. The receiving Neuron core terminates a packet if no clock transitions are
detected after the last bit. Table 17 shows the minimum duration from the last clock
edge to where the Neuron core is guaranteed to recognize the line-code violation.
Data transitions are allowed in this period (and must fall within the data window).
Differential Mode
In differential mode, the Neuron core’s built-in transceiver is able to differentially
drive and sense a twisted-pair transmission line with external passive components.
~Collison Detect
CP4
Input
Collision Detect Enable
-Data
0 2 6 9 ns
1 90 270 580 ns
Special-Purpose Mode
In special situations such as power line transceivers, it is desirable for the Neuron
core to provide the packet data in an unencoded format and without a preamble. In
this case, an intelligent transmitter accepts the unencoded data and does its own
formatting and preamble insertion. The intelligent receiver detects and strips off the
preamble and formatting and returns the decoded data to the Neuron core.
Such an intelligent transceiver contains its own input and output data buffers,
intelligent control functions, and provides handshaking signals to properly pass the
data back and forth between the Neuron core and the transceiver.
In addition, there are many features that can be defined by and incorporated into a
special purpose transceiver, for example:
• Ability to configure various parameters of the transceiver from the Neuron core;
• Ability to report on various parameters of the transceiver to the Neuron core;
• Multiple channel operation;
• Multiple bit rate operation;
• Use of forward error correction; and
Interpacket Gap
Channel bandwidth is consumed by a series of packet cycles interspersed with idle
time. A packet cycle consists of the packet itself followed by the interpacket gap.
Packet cycles vary in length due to the randomizing nature of the media access
algorithm as well as varying protocol overhead and application data size. This
average packet cycle duration determines the rate at which the media access
algorithm decreases its assumed backlog of offered traffic during network idle
conditions.
The interpacket gap is a variable amount of time following each packet. The
interpacket gap ends, and idle time begins, when the MAC sublayers in all devices
and routers on the channel reach the idle state (have no packet to send or receive).
The interpacket gap includes the beta 1 time and beta 2 slots. The beta 1 time is the
fixed component in the idle period after a packet has been sent. The beta 2 slots are
used for media access control. Figure 31 shows the contents of the interpacket gap.
Interpacket Gap
Beta 1 Time Beta 2 Slots
Post- Interpacket § § .... §
packet Padding 2 2 2
handling
Network Idle Wait
Pre-packet handling
• Interpacket gap padding. This padding allows the MAC sublayer in each device
to meet a variety of objectives:
• Synchronize to slower devices on the channel
• Compensate for receive end delay. This is the difference between the
transmitting device’s view of a packet and a receiving device’s view of a
packet. This could be due, for example, to buffering in the transceiver. This
value does not include variable delays such as propagation delay between the
transmitter and receiver or special purpose mode framing delays (these are
accounted for in the beta 2 computation). For example, if a special purpose
mode transceiver uses loss of carrier for one byte time as the end of packet
indicator, the receiver will be one byte time out of sync with the transmitter.
• Meet the media indeterminate time. This is the amount of time following
completion of packet transmission where the channel continues to appear to
be busy. During this time there could be false transitions on the channel
such as transitions caused by ringing, or the transmitter may be unable to
detect transitions (due to a transmit-to-receive turnaround time). In either
case, reliable network idle detection could not be performed. Therefore, the
network idle detection stage is held off until the indeterminate time has
passed.
In differential and single-ended mode, the indeterminate time is measured
from the time the code violation is completely output until the transceiver is
reliably able to detect valid transitions. An additional 3 bit times is then
added to this time. The added 3 bit times is required because the Neuron
core receive logic has a 3 bit time memory of network activity.
The indeterminate time can be determined analytically or empirically. For
example, for differential mode, the signal can be examined after a packet and
the last point at which it crosses the hysteresis threshold observed. This
should be done under worst case conditions. Alternatively, an analytical
approach may be used.
• Meet the minimum interpacket gap. This gap provides a means for imposing
a minimum on the interpacket gap independent of the other timing factors.
This minimum applies to the case where a packet is transmitted in the first
beta 2 slot. This can be used to reduce the instantaneous packet arrival rate
Collision Detection
A collision is defined as the event when two or more devices access the
communication medium at almost the same time, resulting in mutual interference
among their electrical signals on the transmission medium. Packets involved in a
collision cannot be successfully received unless collision resolution is used as
described in the next section, which results in a delay in response time.
The media access algorithm used by CNP minimizes the number of potential
collisions by randomizing access to the medium. Randomizing slots reduce the
probability of collisions, however this does not completely eliminate them.
Collision Resolution
Special purpose mode transceivers can implement collision resolution. This is
possible because a special purpose transceiver may be able to detect collisions early
in the preamble and terminate transmission. The last device left transmitting
completes the frame transmission, and all devices backing off can turn around and
receive the transmitted frame. To give colliding devices enough time to turn around,
the preamble length must be extended as described in the next section.
Preamble Length
The length of the preamble is affected by the following parameters:
• Receive-to-transmit turnaround. This is the amount of time it takes the
transmitting transceiver to switch from receive mode to transmit mode. During
this period, nothing is being transmitted on the communications channel, even
though the transmitting device is actively transmitting. The device starts timing
the preamble when the packet starts from its vantage point.
• Missed preamble. This is the amount of the front end of the preamble lost by the
receiving transceiver due to perturbation of the signal as a result of start-up
anomalies. For example, on twisted pair, there may be an initial DC offset which
results in the first few bits failing to pass the hysteresis threshold.
• Packet qualification. This is the amount of preamble which must be seen by the
receiving transceiver's receive logic to decide that a valid packet is present. In
differential and single-ended mode, the packet qualification time is controlled by
the configurable bit sync threshold (a bit count from 4 to 7 bits). Increasing this
count decreases the likelihood that some form of noise will be misconstrued as a
packet, but also reduces the maximum channel bandwidth.
• Packet response time. The Neuron firmware detects qualified incoming packets
by polling. The worst case interval between detection of the incoming packet and
start of the packet input operation is used to compute the amount of preamble
needed following packet qualification. Not complying with this means that there
is a chance that an overflow condition can occur in the receiver, resulting in a lost
or improperly received packet.
Three different packet response times may be used depending on whether or not
collision detection or collision resolution is used. Table 21 summarizes the three
response times. These times may be increased for special purpose mode as
described in the next section.
If collision detection and collision resolution are not used, the standard packet
response time is used. The standard packet response time is based on the
Neuron core's time-to-respond when in the idle state or in various states of
preparing for transmission. Packets arriving during the interpacket gap may be
lost, however, the probability of a packet arriving during the interpacket gap is
typically much lower than the probability of a collision.
A longer packet response time is used with collision detection to avoid losing
packets that are transmitted during the interpacket gap. This may occur when
devices get out of synchronization with the network due to collisions or noise.
The longest packet response time is used with collision resolution to provide
sufficient time for the devices which have terminated transmission to be able to
receive the “winning” packet.
Because the Neuron core response time is directly proportional to the Neuron
core's MAC clock, the response time for every device on a channel must be based
on the slowest device on the channel.
• Collision detection. Special consideration must be made when collision detection
is being used. In particular, if collisions are ignored during some beginning
portion of the preamble, it is possible that a collision occurring only during that
portion would go unnoticed. Therefore, the preamble must be long enough such
that the amount of preamble following the collision-ignore portion satisfies the
previous three constraints.
For example, if two devices are transmitting simultaneously and a third device
fails to detect this transmission; the third device may transmit near the end of
the collision. This can occur if two transmissions cancel themselves so that a
third device does not detect either transmission. If the only portion of the third
device's transmission which collides is during the collision-ignore period, it will
not detect the collision. If the remaining portion of the preamble were not
sufficiently long, the packet could be lost.
The total preamble length is thus determined by adding the contributions of
receive-to-transmit turnaround, missed preamble, packet qualification and
Neuron core response time. To that sum, the collision detect consideration is
factored in.
Example
Here is an example of the components of a differential or single-ended mode
preamble. Table 22 lists communications parameters for a sample 78kbps
transceiver (this is not the standard TP/XF-78 transceiver type described earlier, it is
instead a lower performance transceiver that illustrates how transceiver performance
affects preamble length).
Parameter Value
Channel minimum input clock 5 Mhz (1.2 µsec cycle time)
Channel bit rate 78kbps (12.8 µsec bit time)
Oscillator accuracy 2000 PPM
Receive-to-transmit turnaround time 7.5 bits
Missed preamble 2 bits
Packet qualification 6 bits
Neuron core packet response time1 274 µsec (227 * 1.2 * 1.0022)
or 22 bits
Collision detection No
1
The packet response time is adjusted by the square of the oscillator accuracy to
account for the case where the receiver is running at the slowest rate and the
sender at the fastest rate.