Click here to learn
about this Sponsor:
Home  |  News  |  Articles  |  Polls  |  Forum

Keywords: Match:
Tux gets his feathers dirty in the "real world"
Bryce Nakatani, of Opto 22 (Aug. 14, 2001)

Embedded Linux in the Physical World

The use of embedded Linux is growing in the industrial automation industry, making the control and monitoring of machinery no longer the exclusive domain of proprietary systems. Also driving this growth is the need to gather information, often on the fly, from an ever increasing number of Ethernet- and Internet-aware devices.

Like the proprietary systems traditionally used for industrial automation, Linux-based systems can monitor and control any activity that they can sense and respond to. The programming logic behind an application that monitors power usage and turns off unneeded loads is obvious, but the methods of sensing the current flow and throwing the cut-off switch are not.

The industrial automation industry developed the "I/O unit" to provide a method through which computers may acquire or issue electrical commands. These electrical responses may emanate from sensors (electronic devices that measure the physical world) and be driven to effectors (devices that drive changes in our physical world). In short, the I/O unit's role provides a conversion between the computer and the physical world.

Ethernet I/O Unit

The figure below shows the components of Opto 22's Ethernet I/O Unit. The brain is the electronic kiosk of the unit. The unit accomodates multiple "I/O modules," which are replaceable and interchangeable interface blocks that connect to the real world devices via analog, digital, or serial signals. The rack is the connection bus between the brain and the I/O modules, and is available in versions that support up to 16 I/O modules (4, 8, and 12 module versions are available). A single 5V DC power supply powers the entire I/O unit.


An Ethernet I/O Unit

The brain uses TCP/IP over 10/100 Mbps Ethernet to communicate with the client. TCP/IP is a de-facto communication standard in Linux. Ethernet is widely accepted in industry. Together, they're an excellent pair. Additionally, the IP routing capability permits the I/O unit to be located within a single network segment or across the globe. There is also a wireless LAN (802.11) version of the brain.

I/O Modules

I/O modules are grouped into several categories: digital input, digital output, analog input, analog output, and special function. An analog input I/O module is shown at the left.

Digital (or discrete) modules connect to on/off (switched) devices such as pressure-sensitive switches, lighting, and automotive "idiot" lights. Analog modules connect to devices that measure or control temperature, pressure, voltage, or current. Special function devices include RS-232/RS-485 serial ports for bar code readers, badge scanners, and keypads.

The rack permits all types of modules to coexist on the I/O unit (the exception being digital-only racks used for special applications).

All of the I/O modules provide electronic isolation between the field devices and the brain. Ethernet provides additional isolation as each end of the copper termination has isolation transformers. If needed, a copper-to-fiber transceiver or wireless unit provides even more isolation.

In short, a broad selection of I/O modules allows interfacing with virtually any physical device. There are the more traditional "voltage in/out" and current "in/out" modules. Additionally, there are special function modules that support RS-485 and RS-232 connections.

Controlling stuff

When data acquisition and control I/O system manufacturers adopted Ethernet, they brought the physical world to Linux. The result has been numerous new -- and often innovative -- implementations. For example . . .
  • Caring parents may operate a pan-and-tilt web camera and watch their child at play in their day care center.

  • A wine maker uses a cell phone to access an Internet-connected I/O unit to inspect cellar and fermentation tank temperatures.

  • A news studio relies on a PPP connection to an I/O unit to display a specific location's weather conditions while on the air.

  • System administrators use their wireless PDAs to inspect the server cluster power controls (the I/O unit serves as a last chance power/reset control).

  • A homeowner ensures the lights are off by inspecting the house's lighting status on a Web browser at work.

  • A security company is alerted of a break-in via a DSL-enabled alarm system.

  • Recent worries about electric power shortages and blackouts also open numerous opportunities for embedded Linux. With soaring energy prices, embedded Linux combined with extremely efficient processor architectures promotes energy management, energy reduction, and energy prediction by controlling and monitoring loads. There may also be applications that isolate loads, warn of black-outs, and disable unnecessary loads during peak demands.
All these applications need I/O units to provide the control and monitoring capability.

With dramatic cost reductions in high-speed Internet access, improvements in computer hardware, and the growth of royalty-free software, the home is becoming a target of this movement. The home thermostat will eventually grow to control the entire operations of a house.

But why wait for this when the capability is already here? A PDA is the right size, has a color LCD display, and contains a very respectable level of performance. Such a device with the appropriate I/O units could easily control lights, the audio system, the kitchen, the security sensors, the sprinklers, . . . , or the electronic pet.

Speaking the language of 1394

Opto 22's Ethernet I/O Unit uses an IEEE-1394 based protocol data model. It supports a TCP or UDP connection through port 2001.

The protocol relies on command functions based on a memory reference. This memory architecture allows variable data sizes to be read or written. This protocol promotes a very simple software implementation, sockets through Linux, and several binary data message routines.

The protocol relies on two standard data formats. The floating point format is 32-bit IEEE-754. The integers are standard two's complement types. The byte ordering is big endian. Most values are aligned at the 4-byte boundary due to the 32-bit data size.

The 1394 based data communication model has two basic access functions, a read and a write access to a memory map. 1394 has two types of reads and writes, a quadlet and a block function. The quadlet allows the read or write of a single 32-bit binary value. The block read and block write functions permit a variable number of bytes to be read or written. The quadlet functions are equivalent to the block functions (that read or write 4 byte quantities).

The read and write request message is a binary data packet. The header of the 1394 based protocol always includes a packet type code, a transaction label (a type of sequence ID), and the memory address to read from or write to. The read header includes the amount of data to return. The write header includes the amount of data. The data is appended immediately after the header.

The formats of the 1394 read/write request/response blocks are shown in the following illustrations (click each to view) . . . Each read and write request has a response, which serves several purposes. The response ensures that the device received the packet and has processed the data. The response may also return an error indicating an out of range value or a functional alert. In a read response, the packet includes the binary data in big endian alignment.

Memory Map Regions

Here's a short list of Ethernet I/O's memory map regions. The other regions and details may be found in the references listed at the end of this article.
  • Configuring Points
  • Configuring Events
  • Defining Analog Scaling Values
  • Writing Output Points
  • Reading Input Points
If talking 1394 sounds difficult, it's not. To assist and accelerate application development, source code is available for use and customization. If there's a need to use a different development environment or architecture, I/O communication requires TCP/IP, Ethernet, 32-bit IEEE-754 floating-point numeric format, and 2's complement 32-bit integer support. Some binary formatting for endian would be convenient in case the platform is little endian.

For further details visit Opto 22's website.



Author's bio: Bryce Nakatani is a systems engineer at Opto 22, an automation component manufacturer. He has an extensive Unix and POSIX background. Linux is his continuing favorite OS. If you have questions or comments, Bryce may be contacted at linux@opto22.com.


(Click here for further information)


7 Advantages of D2D Backup
For decades, tape has been the backup medium of choice. But, now, disk-to-disk (D2D) backup is gaining in favor. Learn why you should make the move in this whitepaper.

4 Legal Reasons to Control Internet Access
The Internet is obviously a valuable resource for many organizations. However, many are exposed to legal liability concerns because they fail to control Internet access. Learn if you're safe in this white paper.

Rapidly Resolve J2EE Application Problems
Whether you are in the process of building J2EE applications or have J2EE applications already running in production, you must ensure that they deliver the expected ROI. Learn how in this white paper.

Load Testing 2.0 for Web 2.0
There are many unknowns in stress testing Web 2.0 applications. Find out how to test the performance of Web 2.0 in this white paper.

Build Better Games Online
For the game infrastructure providers, life is complex. Making money from games has become more complicated. Why? Find out in this white paper.

Building a Virtual Infrastructure from Servers to Storage
This white paper discusses the virtual storage solutions that reduce cost, increase storage utilization, and address the challenges of backing up and restoring Server environments.

Gaining Faster Wireless Connections with WiMAX
Welcome to what is quickly becoming the hyperconnected world where anything that would benefit from being connected to the network will be connected. Learn more in this white paper.

Is Your Desktop a Security Threat?
The new wave of sophisticated crimeware not only targets specific companies, but also targets desktops and laptops as backdoor entryways into those business’ operations and resources. Learn how to stay safe in this white paper.

Increasing SAN Reliability by 100 Percent
Storage area networks (SAN) are a strong part of storage plans. Learn how to increase your reliability and uptime by 100 percent in this case study.

 


Got a HOT tip?   please tell us!
Free weekly newsletter
Enter your email...
Click here for a profile of each sponsor:
PLATINUM SPONSORS
GOLD SPONSORS
(Become a sponsor)

ADVERTISEMENT
(Advertise here)

Check out the latest Linux powered...

mobile phones!

other cool
gadgets



BREAKING NEWS

• Linux video camera geo-tags, writes to SATA drives
• Garmin Nav devices run Gnome Linux
• Ten LiMo phones this month?
• It's a Yankee Doodle Linux phone
• Wind River to host "Developer Day"
• Dev boards gain Linux support
• 802.11n zooms ahead
• Low-power mini-ITX board runs Linux
• Pico-ITX board bears twins
• Mass-market WiFi router invites Linux hackers
• LiMo phone specialist buys app stack
• "PDA phone" runs Linux
• ST, NXP spin phone chip JV
• Military-grade USB key supports Linux
• USB Linux systems expand


Most popular stories -- past 30 days:
• World's cheapest Linux-based laptop?
• Ubuntu ported to a PDA
• 64-way chip gains Linux IDE, dev cards, design wins
• Embedded PowerPC dev kits come with Linux
• Rapid time-to-evaluation -- a key goal for silicon providers
• Embedded Linux is doomed. DOOOMED!
• Rugged PDA available with Linux
• Netflix Player runs Linux
• Miniature Linux PC targets military apps
• $7 SoC runs Linux
• Android Developer Challenge announces first-round winners
• Dual-core ARM SoC clocks to 1.2GHz


Linux-Watch headlines:
• Microsoft tactics push India toward Linux
• Bell, SuperMicro sued over GPL
• "Business intelligence" software goes GPL
• Will Atom bomb?
• LF Summit videos posted
• Linux gains "embedded" maintainers
• Virtualization on tap in SLES and RHEL upgrades
• Linux gets security black eye
• Verizon chooses Linux "platform of choice"
• Hats off to Fedora 9


Also visit our sister site:


Sign up for LinuxDevices.com's...

news feed

Home  |  News  |  Articles  |  Polls  |  Forum  |  About  |  Contact
 

Ziff Davis Enterprise Home | Contact Us | Advertise | Link to Us | Reprints | Magazine Subscriptions | Newsletters
Tech RSS Feeds | White Papers | ROI Calculators | Tech Podcasts | Tech Video | VARs | Channel News

Baseline | Careers | Channel Insider | CIO Insight | DesktopLinux | DeviceForge | DevSource | eSeminars |
eWEEK | Enterprise Network Security | LinuxDevices | Linux Watch | Microsoft Watch | Mid-market | Networking | PDF Zone |
Publish | Security IT Hub | Strategic Partner | Web Buyer's Guide | Windows for Devices

Developer Shed | Dev Shed | ASP Free | Dev Articles | Dev Hardware | SEO Chat | Tutorialized | Scripts |
Code Walkers | Web Hosters | Dev Mechanic | Dev Archives | igrep

Use of this site is governed by our Terms of Service and Privacy Policy. Except where otherwise specified, the contents of this site are copyright © 1999-2008 Ziff Davis Enterprise Holdings Inc. All Rights Reserved. Reproduction in whole or in part in any form or medium without express written permission of Ziff Davis Enterprise is prohibited. Linux is a registered trademark of Linus Torvalds. All other marks are the property of their respective owners.