|
Issue
99, October 1998
Networking
with DeviceNetPart
2: A Weather Station Application
by
Jim Brady
Start
Can
Chips
Chip
Setup
Real Time
Message
Flow
Connections
Timers
Analog
Input Point
Identity
Object
Fragmented
Messages
Getting
Physical
Applying
DeviceNET
Software,Sources
APPLYING
DeviceNET
In addition to all of the
objects for DeviceNet, you need code for your application.
The weather station is simple enough that I just extended
the Analog Input Point object. It reads the ADC and computes
sensor values.
If you have separate application
objects, you must link them with the Identity object.
It keeps track of device status and does resets. A standard
object used for SEMI-compliant devices, the S-Device Supervisor,
is designed to do this.
This article is mainly about
DeviceNet, but the weather stations details are
on the Circuit Cellar web site. I hope to add sensors
for barometric pressure and wind speed and build units
for other locations.
My network master is a 486
with a DeviceNet card from Softing GmbH. It comes with
a library that makes it easy to use. Also check out National
Instruments card which works with LabVIEW and CVI.
Aside from being a fun combination
of real-time software and hardware, this project shows
how straightforward it is to program a DeviceNet interface
in C++. With a little care, C++ can provide good response
times and reasonable program size.
Jim Brady has designed
embedded systems for 15 years. You may reach him at jimbrady@ix.netcom.com.
|