Java brings opportunities to industrial automation

Like many in the embedded systems industry, industrial automation vendors have watched and waited for the validation of Java in their domain. At the top of the list of concerns are performance problems caused by simplistic implementations of the Java virtual machine (JVM) and garbage collection algorithm.


Like many in the embedded systems industry, industrial automation vendors have watched and waited for the validation of Java in their domain. At the top of the list of concerns are performance problems caused by simplistic implementations of the Java virtual machine (JVM) and garbage collection algorithm. However, with a new generation of Java virtual machines sporting real-time garbage collection algorithms and throughput speeds approaching that of C++ on many common operations, the time is ripe for industrial automation to reap the benefits of the Java programming language.

What makes Java fit the industrial automation world are the concepts of JVM and class file. A class file is a sequence of machine-independent instructions interpreted by the JVM running on a host computer. Java virtual machines and class files have been used on the Internet for several years to download and execute programs inside web browsers.

Typically, a class file is sent over a network and loaded into the Java virtual machine via a Java classloader, which reads the class file, validates it, and loads it into memory ready for the JVM to execute. Because class files are machine independent, the classloader and JVM combine to load and execute Java files in exactly the same manner, with the same results, on any hardware platform.

Hardware independence

One of Java's primary advantages is its ability to run programs on different hardware platforms without recompiling source code. For industrial automation, this has several benefits.

First, as hardware is updated and newer controllers replace older controllers, no change in the binary software is required. For example, if a PLC that fully utilizes a 40-MHz Intel processor is upgraded to a 100-MHz Power PC processor, then the same binary class files can be used for both controllers, assuming that hardware ports and external interfaces are programmed for portability.

Second, hardware independence allows developers to "simulate" the run-time environment on a desktop computer, greatly reducing development time. With the simple addition of low-level hardware simulation, the same application class files that run on the target PLC can also execute on a desktop computer for development and debugging.

Easier debugging

Familiar debugging tools and development environments not tied to specific hardware platforms are easier for developers to learn and use, and testing does not require the constant downloading and setup of the target PLC. Another benefit is that debugging is only required on a single version of source code—once for all platforms. This reduces project overhead and maintenance by greatly simplifying project build configurations, reducing coding errors, and simplifying bug tracking and change requests.

In addition to cross-platform compatibility, Java programming language provides the means for seamlessly downloading new or revised code to PLCs without any type of reset of the hardware or JVM. This ability, called dynamic downloading , was designed into the Java language with this idea in mind.

Imagine a factory with PLCs controlling automobile part production and connected via a wireless company intranet. Using a web browser, the production controller can change PLC configuration to produce camshafts for six-cylinder engines instead of four-cylinder engines without intervening with the machine physically. While such behavior could be accomplished using another programming language, Java makes this type of system architecture easy and intuitive to program. Benefits are clear when considering the movement towards just-in-time delivery of products.

Not only can dynamic downloading change hardware's behavior, it can also be used to "patch" existing code or add more functionality. Ability to change a single source file, recompile it, dynamically download only the changed class file, and link it into a running JVM provides added flexibility for software maintenance.

Essentially, Java brings cross-platform compatibility and dynamic downloading to industrial automation. However, Java also provides software safety, developer productivity, and access to a large set of libraries that provide rapid design and coding of applications. With embedded Java libraries designed to provide pure Java interrupts and input/output functions, developers can write platform-independent device drivers, providing further cross-platform compatibility. Rapid improvements in Java technology and advancements in hardware have made Java a viable solution for industrial automation. The question is not whether Java will be adopted for use in industrial automation, but rather who will be the first to take advantage of what Java offers.

Dr. James Lathrop, director of professional services, NewMonics (Ames, Ia.), ,

Java's advantages

1Portable binariesallow seamless deployment across platforms

Object-oriented programming improves productivity two to 10 times

Reuse of code leverages original code investment

Run-time environment enables extensibility

Java compiler and classloader aid security

No comments
The Engineers' Choice Awards highlight some of the best new control, instrumentation and automation products as chosen by...
The System Integrator Giants program lists the top 100 system integrators among companies listed in CFE Media's Global System Integrator Database.
The Engineering Leaders Under 40 program identifies and gives recognition to young engineers who...
This eGuide illustrates solutions, applications and benefits of machine vision systems.
Learn how to increase device reliability in harsh environments and decrease unplanned system downtime.
This eGuide contains a series of articles and videos that considers theoretical and practical; immediate needs and a look into the future.
Choosing controllers: PLCs, PACs, IPCs, DCS? What's best for your application?; Wireless trends; Design, integration; Manufacturing Day; Product Exclusive
Variable speed drives: Smooth, efficient, electrically quite motion control; Process control upgrades; Mobile intelligence; Product finalists: Vote now; Product Exclusives
Machine design tips: Pneumatic or electric; Software upgrades; Ethernet advantages; Additive manufacturing; Engineering Leaders; Product exclusives: PLC, HMI, IO
This article collection contains the 5 most referenced articles on improving the use of PID.
Learn how Industry 4.0 adds supply chain efficiency, optimizes pricing, improves quality, and more.

Find and connect with the most suitable service provider for your unique application. Start searching the Global System Integrator Database Now!

Cyber security cost-efficient for industrial control systems; Extracting full value from operational data; Managing cyber security risks
Drilling for Big Data: Managing the flow of information; Big data drilldown series: Challenge and opportunity; OT to IT: Creating a circle of improvement; Industry loses best workers, again
Pipeline vulnerabilities? Securing hydrocarbon transit; Predictive analytics hit the mainstream; Dirty pipelines decrease flow, production—pig your line; Ensuring pipeline physical and cyber security