Using XML in Automation

Jan. 23, 2008
The Web standard for communicating information, the eXtensible Markup Language or XML, is more than eleven years old. Its use in automation is still in infancy, however.
At its root, XML provides a method for a publisher of information to indicate what the information is in the message, such that a subscriber to the message can understand what the information is and act on it accordingly. This is a text-based language, thus human-readable.  The convention is to use angle brackets in the same manner as XML’s older brother, HyperText Markup Language, or HTML. Therefore, if one embeds on a Web page 12345<⁄quantity>, someone reading on a browser that understands XML and knows the tags can render the information as the quantity 12345 and act upon it—even to the extent of filling cells in a Microsoft Excel worksheet. With standard tags, different software applications can “talk” to each other. Given the publish/subscribe nature of XML, programmers in the late 1990s began to think about ways in which one could “subscribe” within their browsers to Web pages that they might be interested in. But they didn’t want to automatically download that Web page every so many minutes, hours or days. It would be far more efficient to just automatically check the page every hour or so to see if anything changed. If it did, then the application would download the Web page. So programmers used the simple text-based XML to write a “script” that accomplished just this task. The result is something we know today as RSS. There is a long, checkered history behind the development of the script and its name, but today it is mostly known as “really simple syndication.” Ben Hammersley’s book “Developing Feeds with RSS and Atom,” published by O’Reilly Media, contains the story of the development of RSS, along with a discussion about how to program it. Feed readers Many people receive news feeds from “blogs” or media such as “The New York Times” on a Web browser application known as a “feed reader” using RSS. A useful automation application of RSS would be if suppliers provided XML feeds of technical bulletin updates that technicians could receive automatically. In that manner, customers would be assured of having the latest information at hand when troubleshooting automation problems or designing new systems. For example, the Temecula, Calif., automation company, Opto 22, offers RSS feeds for technical support topics at Another use of XML technology is OPC-UA. This new industry standard from the OPC Foundation is still several months away from actual product support, but its foundation is in XML technology. OPC is an open connectivity standard—a way for various automation products and software to communicate data. But XML is text-based, and therefore, it does not communicate as quickly as many would like for automation applications. Rashesh Mody, OPC Foundation chief technology officer and vice president of HMI, or human-machine interface, at Wonderware, Lake Forest, Calif., explains, “We recognized that having text-based communication would reduce performance, so we have a binary implementation that eliminates those issues. What happens is that we translate the XML to binary and then retranslate back to XML.” Another advantage that XML gives to OPC communications is that it is a component of basic Web Services. Says Mody, “Because of the Web Services model, the messaging is standardized. That means we can go from one platform to another or one operating system to another. Since many other standards use XML, it becomes a robust and flexible technology. For example, EDDL (electronic device description language, used in instrumentation) has an XML description. This is the game changer that XML can represent any data.” Gary Mintchell, [email protected], is Editor in Chief of Automation World.