14
An Overview
of Embedded
Computing
Embedded Computing
Introduction to Embedded Computing . . . .14-2
Software Tools for Embedded Computing
An Over
view of Embedded Computing >
Introduction to Embedded Computing
14
When Should You Use Embedded Computing?
RS-485
Ethernet
DeviceServer IndustrialPC EmbeddedComputer
Introduction to Embedded
Computing
A variety of options are available for connecting and controlling industrial devices. Sometimes it makes sense to connect devices directly to an industrial PC (IPC) equipped with a multiport serial board, whereas other times devices can be connected to a device server that is then connected to a network. A third option involves using small, headless computers that are easy to program and easy to maintain. This so-called “embedded computing” solution has gained prominence in recent years as a cost-effective and versatile solution.
Embedded computing solutions use compact, programmable computer platforms that can collect, store, and process data from attached devices. This type of computer is often used to perform specific computing or processing tasks that do not require a full-fledged PC. Different processors, operating systems, storage
capacities, form factors, and device interfaces are available to meet the requirements of different applications. Embedded computing platforms are often used as local device controllers, protocol converters, or data acquisition servers that are accessible from a central management network.
One way to understand the role of embedded computers is to compare them to other device networking options. For example, let’s assume that you would like to incorporate a traffic control device into an intelligent transportation system that is connected over an Ethernet network. One solution would be to use an RS-485 device server that makes the device accessible from a network host. Any computing or processing of the data would be completed by the network host itself, since the device server only handles data transmission. If the traffic device communicates using a different protocol than the rest of the system, all network hosts will need to be able to switch back and forth between the protocols used by the different devices. As you can probably imagine, systems that use large numbers of different devices and protocols can become extremely complicated. In general, device servers are only suitable for straightforward data exchange applications.
Another option is to use an on-site industrial PC on site connects both to the network and to the traffic device. The PC could be programmed to convert between the protocol used by the device and the protocol
used by the management system. However, it is not very practical or cost-effective to use full-fledged PCs to handle a specific, dedicated computing task such as protocol conversion. In addition, industrial PCs are not suitable for many applications due to their size, power requirements, and limited ruggedness. An industrial PC is designed more to provide a powerful, centralized platform that requires human interaction or sophisticated software.
14
An Over
view of Embedded Computing >
Introduction to Embedded Computing
14
Embedded Computing for Vending Machines
Embedded Computing for Hospitals
Many vending machine operators take advantage of network technology to monitor their machines from a single location. While newer vending machines may already have built-in Ethernet capability, older vending machines can rely on dedicated embedded computers to connect to the network. Embedded computers can also be used to
help integrate vending machines that use conflicting protocols. With seamless conversion between protocols, the management software does not need to go through expensive redevelopment.
Hospitals utilize a number of different devices that collect vital biometric data from patients. Devices or systems may be proprietary, and it can be challenging to get them to communicate with each other or with a central database. Embedded computers can be used to simplify the system, acting as a common connection point for multiple devices and allowing different protocols to communicate with each
An Over
view of Embedded Computing >
Introduction to Embedded Computing
14
What Characterizes Embedded Computing?
Embedded Computing for Fleet Management
Advances in technology, such as cellular communication and GPS, have improved the efficiency and effectiveness of modern fleet management. Proprietary vehicle tracking devices can be expensive to use, and it can be difficult to incorporate their data into a central database. An embedded computer with a cellular connection provides the flexibility to handle any GPS device and any management system. Instead of relying on data as provided by the GPS vendor, the
embedded computer can be programmed to convert the data into the most useful format for the central server. The control center can easily obtain live information on every vehicle’s location over national cellular networks, without being tied to any proprietary system or to any vendor.
Embedded computers come in different shapes and sizes, and can offer a wide range of features. Careful consideration must be given to what you need to accomplish and what the embedded computer will be connecting to. For many applications, using an embedded
computer and another dedicated networking product provides the best combination of flexibility and cost effectiveness.
What kind of device connections are needed? Embedded computers provide different combinations, types, and quantities of serial, USB, and Ethernet ports. Is RS-485 required? What about sensor connections? Can an external display be attached? Don’t forget to consider what kind of connectors are required, especially if space is very limited. If necessary, you can look for a single unit that provides the exact combination of device connections that is needed. However, in many cases, it may be more effective to use the embedded computer in combination with a hub or adaptor. Some expandability can also be incorporated into the design of an embedded computer to achieve flexibility for future growth.
Since embedded computers are not designed for critical, long-term storage or heavy computing, RISC-based CPUs and Linux-based operating systems generally provide sufficient processing power for most embedded applications. However, embedded computers are also available for other operating systems, such as Windows CE or Windows Embedded, and Intel x86-based processors are also available. The selection will depend on the application, the type of
management software being used, and the availability of qualified programmers. x86-based embedded computers offer exceptionally powerful performance and may even support VGA display, whereas CISC-based embedded computers offer superior ruggedness, smaller sizes, and lower power requirements. Other factors to consider include how much memory and storage space are provided, and whether or not they can be expanded.
14
14
An Over
view of Embedded Computing >
Introduction to Embedded Computing
Form factor can be a crucial factor for embedded computing applications. Devices may not be easily accessible, and space may be very limited. Many industrial devices are mounted in cabinets or on DIN-rails, 19-inch racks, or fixed directly to a wall. Size, weight, power consumption, and mounting options can determine whether or not an embedded computer is suitable for an application. Some applications may even require that the embedded computer be mounted within another device.
With many industrial applications, the ruggedness of the computer can be a major concern. Inherently, embedded computers offer superior ruggedness compared to industrial PCs. With features such as fanless operation and solid-state storage, certain models can achieve even higher MTBF values for critical, unmanned applications. For particularly harsh environments, it is possible to find embedded computing solutions that offer resistance to extreme temperatures. In addition to these basic items, there are a large number of other considerations that depend on your particular needs and application. For example, how is the embedded computer configured or monitored? Is a control panel provided? Does it connect directly to a display and keyboard? How easy is it to develop software for the embedded computer? What is the software platform? Are programming libraries provided, and if so, are they comprehensive and easy to use? For issues that are important to you, be sure to check the specifications of the embedded computer and contact the manufacturer if necessary.
One of the difficulties involved with connecting industrial devices to control and management networks is the incredible variety of devices, protocols, connectors, and media that need to be connected. Embedded computers can provide the versatility and flexibility to
Conclusion
An Over
view of Embedded Computing >
Moxa Protocol Converter
14
Moxa Protocol Converter
Industrial Automation and Networking
Moxa Protocol Converter (MPC) is designed to make Moxa’s embedded computers accessible to a wider audience. Saying that “MPC bridges the gap between transparency and programmability” means that MPC gives you a powerful tool for developing your
Centralized
Control Center
embedded
computer
embedded
computer
embedded
computer
control
devices
devices
control
devices
control
LAN
Serial
embedded computing applications. In this section we give you a glimpse at how to use MPC for your own industrial automation applications.
When PLCs were first introduced in the 1970’s, the stage was set for the evolution from analog to fully computerized, digital control systems for industrial automation applications. However, we had to wait until the 21st century to see a significant move to using plant-wide communication networks and truly centralized control. The downside to this development was that the stuff that connects to the network—PLCs, meters, temperature and pressure sensors, different types of actuators, etc.—use a variety of connection methods and protocols to transmit and receive data. One of the more challenging problems faced by solution providers in the industrial automation industry is how to coordinate the flow of data between
such a wide range of devices and protocols. The modern industrial control network uses what is often termed “distributed intelligence” to connect all of the devices in a plant to one centralized control center. This type of architecture uses a large number of small, headless computers that connect directly to localized groups of sensors and actuators. The headless computers are much smaller and less expensive than IPCs, and are used for localized data processing and for converting the format of data streams from one protocol to another. Since the devices that make up control systems typically transmit data over a serial line (RS-232, RS-422, or RS-485), the headless
computers have multiple serial ports for connecting to an array of devices. By also connecting the headless computers to the factory LAN (either through Ethernet ports or with a wireless IEEE802.11g/b
An Over
view of Embedded Computing >
Moxa Protocol Converter
14
Port A
Driver 1 Driver 2Port B
embedded computer
Serial-to-LAN channelcontrol devices
LANembedded
computer
Serial LAN Serialcontrol devices
Serial-to-Serial channelEach Serial Device Requires its Own Driver
All serial devices have one thing in common. A dedicated device driver for the serial device must be installed on the computer to which the device is connected. If the driver is not installed or configured properly, then the computer and serial device will not be able to communicate with each other. Data streams flow through “channels” that connect two
ports of the embedded computer to each other. Data streams can flow between a serial port and network port, between a LAN port and the same or a different LAN port, or between two serial ports. As the data passes through the embedded computer, the data is operated on by one or more of the installed device drivers.
Inserting this classical “computer – device driver – serial device” setup into the modern plant-wide control system can create a big headache for programmers. The three biggest problems are:
1. A “timer” subroutine that runs on the embedded computer must be created to generate periodic queries and/or control signals for each type of serial device. This may sound easy enough, but in fact it can be surprisingly difficult to create suitable timer routines for control devices.
2. Data from each serial device must be converted to a format compatible with TCP/IP transmissions, and if two serial devices need to communicate directly with each other, additional code must be created to make this serial-to-serial communication possible. 3. In general, you must write new code for each data stream channel to ensure that data is transmitted successfully through the channel.
Moxa Protocol Converter, or MPC for short, is a software program that runs on any of Moxa’s ready-to-run headless computers. More specifically, MPC is a software engine that establishes bi-directional
data stream channels between any two of the embedded computer’s ports, and loads custom-written programs or drivers (written in C) that audit the data as it flows from one port to the other.
An Over
view of Embedded Computing >
Moxa Protocol Converter
14
What You Need to Use MPC
The Benefits of Using MPC
How to Configure MPC
Using MPC requires the following basic components:
A Moxa computer connected to an Ethernet network, and one or 1.
more serial devices connected to the computer. MPC installed on the Moxa computer. 2.
Drivers written in C for each type of serial device. 3.
More specifically, a channel is a logical path that connects two physical communication ports, either of which could be a serial port or a network port. As the data flows from one port to the other, the
data encounters a sequence of user-programmed drivers. The engine receives a data stream at one communication port, assembles each data packet in the stream, and then passes it to the first driver for data processing or protocol conversion. The driver performs data formatting or conversion as required on the packet, and the resulting packet is then passed to the next driver for further processing or conversion. This process continues until the final packet reaches the physical port on the other end of the channel.
The MPC engine provides the following key benefits:
1. The MPC engine handles both serial and network communication. Without any additional programming on
the part of the end-user, the MPC engine manages data transmission transparently along a channel that connects any combination of two communication ports.
3. The engine supports multiple drivers in a channel.
Allowing multiple drivers in a channel simplifies and modularizes the design, making it extremely easy to configure applications that use layers of data conversion and processing.
By default, end-users of Moxa’s embedded computers have access to the MPC executable file, which occupies only 50 KB of the embedded computer’s memory. Versions of MPC are available for both Linux and WinCE versions of Moxa’s embedded computers. After copying the MPC file to a directory on your embedded computer, one of two methods can be used to configure the “ports” and “channels” for your application.
Configuration Method 1: Code your configuration requirements into a simple xml file.
The configuration file is a text file in XML format. The entire contents are enclosed by a document root: <MPC_DOC_ROOT></MPC_DOC_ ROOT>. Two sections of the file are used to configure ports and
channels, respectively, with the relevant text lines enclosed by element pairs <XPORTS></XPORTS> and <XCHANNELS></XCHANNELS>, respectively.
Configuration Method 2: Use the Moxa Device Manger user interface.
The advantage of using the Moxa Device Manager (MDM) user interface instead of simply creating a text file (as described above) is that you do not need to remember the XML syntax. In this case, the user simply enters the appropriate port, channel, and driver information into a series of text input boxes. In addition, you can use MDM’s built-in search function to locate all Moxa embedded computers connected to the LAN.
2. Port-to-port communication is driver programmable.
An Over
view of Embedded Computing >
Moxa Protocol Converter
14
How Does MPC Fit In?
programmability
transparency
MPC
embedded
computer
NPort
MGate
MPC Bridges the Gap between Transparency and Programmability
Many of you are already familiar with Moxa’s NPort® series of serial device servers. In general, serial device servers are a cost-effective solution for transmitting data over an Ethernet network between a serial device and a computer. The serial device server is often
described as providing “transparent data transmission,” since it requires no programming, is easily configured, and the user does not need to understand the complexities of TCP/IP programming.
In contrast, even though the embedded computer comes without a keyboard, mouse, and monitor, it is nevertheless a true computer, and as such can be programmed by the user. In fact, it is fair to say that the embedded computer is a kind of “programmable serial device
server,” since many of its applications involve transmitting serial data over an Ethernet network. The advantage to the user is that essentially any application can be programmed into the embedded computer. The disadvantage is that the user must find a way to do the programming.
How does Moxa Protocol Converter (MPC) fit into the picture? The combination of “embedded computer + MPC” gives users a powerful tool for setting up industrial control applications. Only a minimal
An Over
view of Embedded Computing >
Moxa Device Manager
14
Moxa Device Manager
The Telnet/SSH Solution
The Command Line Solution
Systems that incorporate several devices located at remote sites present a big challenge to solution providers. This is particularly true for industrial applications that use several headless embedded computers distributed over a wide area. Although this type of
computer is generally accessible from over the network, the existing remote management options present a rather clumsy solution for managing large numbers of embedded computers.
Perhaps the most common method of managing embedded computers remotely over the network is to use Telnet/SSH. However, one of the main drawbacks to this type of management is that you can only connect to one embedded computer at time. In addition, the
administrator must actively type in the IP address of the embedded computer to establish the Telnet/SSH connection. It can be a real nightmare to keep track of which IP address is associated with which embedded computer.
An Over
view of Embedded Computing >
Moxa Device Manager
14
Using MDM (Moxa Device Manager) to Manage Embedded Computers
The critical task for this kind of system is finding a way to create a well-designed management tool. Moxa provides a management tool that helps system administrators overcome this “remote management nightmare.”
Moxa Device Manager (MDM) is an efficient online device management tool that can be used with all of Moxa’s embedded computers. One of the key benefits of this tool is that management tasks, such as configuring the network or serial ports, managing and/or transmitting text and binary files, and monitoring and controlling processes, can be handled easily using a Windows-based user interface. In addition, MDM can be used to manage different models of embedded computer,
and embedded computers that use different operating systems, all from one centrally located computer. As long as the individual embedded computers are pre-installed with an MDM agent, they can be recognized and managed by the unified MDM tool from your PC. These features help ensure that MDM gives system integrators an efficient tool for handling all remote devices from one computer. In addition to controlling heterogeneous computer systems, the traffic between the MDM tool and any of the MDM agents is encrypted. This feature protects data transmitted from the system. Users can comfortably manage the remote devices without worrying about the usual risks associated with transmitting data over a network.
Embedded Computers from Moxa
W300 Series
Control Center
IA Series
UC-7400
Series
DA Series
MOXA
Device
Manager
Moxa’s embedded computers are effective x86-based and RISC-based communication platforms for applications in front-end data processing, serial communication, protocol conversion, and remote device control and monitoring.