|
Issue
98, September 1998
Networking
with DeviceNet
by
Jim Brady
Start
Sorting Them Out
New
Breed
Motivation
Can
Message Reliability
DeviceNet Connections
Device Net Messages
Stringing Messages Together
Some Real Messages
Object Library
Conformance Testing
DeviceNet Standards
References,Sources,PDF
DeviceNet
Connections
DeviceNet
provides a structure for establishing logical connections
between devices, releasing connections if they go unused
for too long, and stringing messages together if you need
more than 8 bytes. It also provides an object-oriented
framework to tell you how to structure your network code.
If
your device-type is in the DeviceNet library, it even
tells you how your device should behave. That part is
necessary to make devices completely interchangeable.
Central
to DeviceNet is a concept called a connection. Think of
it as a telephone connection. When you call someone, you
establish a connection. That connection is yours, and
other people talking on the same fiber have different
connections. The connection breaks when you hang up or
in some cases if you stop talking for a while.
In
DeviceNet, each connection is identified by an 11-bit
number called a message identifier or connection ID. This
number includes your devices Media Access Control
Identifier (MAC ID), which is a number from 0 to 63, usually
set by a switch on your device.
DeviceNet
provides a set of 11 predefined connections, called the
predefined master/slave connection set (see Table 2).
Wait a minute
master/slave?
| Table 2These
11 connections come from two DeviceNet message
groups, with the Connection ID made up differently
in each case. Group 1 messages are higher priority,
used for the slaves I/O messages. All messages
originate from the master, except for the Duplicate
MAC ID Check and the slaves COS/cyclic message.
|
Yes,
thats a letdown after expecting peer-to-peer, but
most DeviceNet products on the market today are slave-only
devices. The implementation is much simpler and less memory
consuming.
A
peer device must include a lot of code to dynamically
establish and configure connections. If you really want
to include peer capability, the standard enables you to
put it in a device along with the predefined connection
set.
In
fact, the DeviceNet standard distinguishes between a slave
device that also has peer capability, and a slave-only
device. In this article, Im sticking to the simpler
slave-only device, which uses only predefined connections.
|