May 2007
 
www.moxa.com  
  FEATURED TOPIC


  MOXA Protocol Converter


MOXA Protocol Converter (MPC) is a new utility that is designed to make MOXA's embedded computers accessible to a wider audience. Read on to learn how you can use MPC for your own industrial automation applications.

Industrial automation and networking
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 card), control system designers can create a plant-wide control system in which many control decisions are made by computers in the centralized control center.

MOXA Protocol Converter---Bridges the gap between transparency and programmability

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.

MOXA Protocol Converter---Bridges the gap between transparency and programmability

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 for periodically querying/controlling each type of serial device. This sounds 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---Bridges the gap between transparency and programmability

The MPC concept
MOXA Protocol Converter, or MPC for short, is a software program that runs on any of MOXA's ready-to-run embedded 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.

What you need to use MPC:

1. MOXA embedded computer attached to an Ethernet network, and one or more serial devices.
2. MPC installed on the embedded computer.
3. Drivers (written in C) for each type of serial device

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.

MPC has three key benefits:

1. Serial and networking communication is built into the MPC engine—Without any additional programming on the part of the end-user, the MPC engine manages transparent data transmission along a channel that connects any combination of two communication ports.
2. Port-to-port communication is driver programmableMost field systems are created by making slight changes to existing systems that are tried and true. By using the MPC engine, these changes can be realized almost immediately by either modifying a driver, or adding a driver to a channel.
3. The engine supports multiple drivers in a channelAllowing 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.

How to configure MPC
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 space. Versions 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 second method available for configuring your MPC application is to use the Moxa Device Manager (MDM) user interface.

NOTE: The Moxa Device Manager utility was introduced in the featured topic articles of the February issue of Moxa Connection: Smart Management of Embedded Computers (click for details).

The advantage of using the MDM user interface over 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.

MPC bridges the gap between transparency and programmability
Many of you are probably familiar with MOXA's NPort series of serial device servers. In general, the serial device server is a cost-effective solution for transmitting data over Ethernet 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 Ethernet. 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 amount of programming knowledge is required, but by using existing drivers and data processing programs, MPC can be used to create applications that otherwise would require significant programming skill.

MOXA Protocol Converter---Bridges the gap between transparency and programmability

Moxa Protocol Converter is scheduled to be launched in early June. For more information about MPC, please contact Dr. CF Lin by e-mail at cf.lin@moxa.com.

» Back to index

Forward to a friend
  CONTACT MOXA
 
  » Technical Support  
  » Get Free Catalogs  
  » Feedback
 
  UPCOMING EVENTS  
  » Embedded Systems  
  EXPO
    May 16 - 18, 2007  
  » ITS America's 2007
  Annual Meeting
    June 04 - 06, 2007
  » Computex Taipei 2007
    June 05 - 09, 2007
  » ISA Mexico
    June 06 - 08, 2007
 
 
  LEARN MORE ABOUT...  
   
   
   
 
Subscribe to Moxa's e-Newsletters