How to use Linux in industrial automation

CrispTech Pty Ltd
Thursday, 10 November, 2011


The Linux OS can be found in many unexpected places in our daily lives. From GPS navigators to smartphones, countless devices now run the Linux kernel. As a free and open-source solution, Linux offers some advantages compared to Windows. Is this open-source OS relevant for industrial automation? The answer is YES.

Today there are many automation controllers or embedded systems that use Linux to provide services. Linux offers a customisable, reliable and efficient OS solution for automation controllers and embedded systems.

From x86 to embedded systems

Computer technology has advanced exponentially since 1980. Over the past 30 years, the x86 processor architecture paired with a proprietary Windows operating system has emerged as the dominant platform for mainstream PCs. This is an appropriate solution for the consumer and general market, but power users and system administrators needed a reliable operating system to provide consistent non-stop services to end users. Linux emerged as an attractive solution for server operating systems.

About 15 years ago, smaller and more portable computing devices began to appear on the market for more specialised use. Once again, Linux appeared as the most attractive solution for unique and demanding applications. Linux is now a popular OS solution for applications that are poorly served by conventional x86 systems. Because Linux is open-source, has low CPU requirements and is memory efficient, it is a very useful solution for this type of application. Many people interact with Linux systems every day, often without realising it. These systems include distributed computing clusters that deliver supercomputer-level performance on a budget, kiosk devices such as ATMs and vending machines, and industrial automation controllers.

Advantages of Linux

Open source

The collaborative, open-source nature of Linux is a central part of its developer culture. More practically, open source is also an attractive feature for licensors and users. Open-source software is free and can be adapted by the end user for their specific needs. In addition, you can take advantage of any existing solutions relevant to your application that the open-source community has already produced.

Security

Microsoft Windows faces constant security threats from viruses, malware and hackers. In order to remain secure from newly discovered security vulnerabilities, Windows users must keep their systems current with Microsoft’s latest patch files. The Linux OS is far more secure and faces much fewer threats. With Linux, system administrators can spare themselves the headaches of worrying about update downtimes and security vulnerabilities.

Stability and reliability

Linux solutions offer exceptional stability and reliability. It is possible to update parts of a Linux system without restarting the entire system. All services running on a Linux platform are independent. If one service stops, it will not damage the other services. With Linux, the entire system has higher productivity and uptime.

Cost-effectiveness

Linux’s cost advantages go beyond the price tag. The availability of free Linux OS licences for all your systems certainly provides substantial cost savings, but there are additional advantages. The increased stability and security of Linux systems reduces the workload and saves labour costs. In addition, there is an enthusiastic and passionate internet community of Linux power users available as a rich resource.

Why Linux is popular for embedded systems

Linux is commonly used in smartphones, GPS navigation devices, network switches, DVD players and MP3 players. Linux’s open-source code gives developers the flexibility to downsize the operating system to fit their target platform, or adapt it to better fulfil the specific requirements of their application.

Challenges facing Linux embedded systems in automation

Limited resources affect response time

Typically, embedded systems use a RISC-based CPU. In RISC-based systems CPU resources are limited compared to an x86-based system. Even with Linux, the software engineer will still need to downsize the Linux kernel to fit into the embedded system. The availability of system resources also affects system response time, which is a key priority for industrial automation. Imagine a typical automation system, in which hundreds of remote I/Os are managed by one embedded system. Now consider that in traditional polling architecture, the embedded system may need to check the I/O status every 500 ms. Performing this task alone could drive the CPU to 100% utilisation, leaving no room for other processes. In addition, the constant polling will also stress the network architecture.

Higher barrier to entry

Windows offers a familiar GUI for users. This is not available in embedded systems, which generally use a command line interface. A higher level of technical expertise is necessary to use Linux. In addition, certain Windows software programs or code libraries may not be available in Linux. Alternatives to these programs can be found, but the lack of code libraries or device drivers can be a huge hassle.

How to get the most out of Linux in automation

Linux-based SCADA software

Typically, SCADA systems monitor and control a process, and run on Windows. However, there are many Linux-based SCADA resources. A comprehensive list can be found at the LinuxSCADA website (http://www.linuxscada.info).

Talk with remote I/O using various fieldbus protocols in C

Fieldbus protocols are a family of industrial protocols used in control, monitoring and data acquisition. Examples of fieldbus protocols include Profibus and Modbus. In order to communicate with PLCs and remote I/Os, you need to know the details of the fieldbus protocol used. Currently, the most common, easy-to-use fieldbus protocol is Modbus, which is available free of charge. Details of the Modbus specification can be found at the Modbus Organization’s website (http://www.modbus.org/specs.php). With these specs you can implement the entire Modbus protocol on your own, but this will still take valuable development time.

 
Figure 1: A Linux code library dramatically simplifies the development process.

Reduce development workload with Linux code libraries

Code libraries are a valuable time-saving solution and make any automation application easier to deploy. A program library can include sockets, Modbus read/write functions and Modbus address code, which streamlines the creation of new programs and combines complex, multipart tasks into one simple step. Even more complete libraries might include sample code to help developers create their own programs. Most remote I/O vendors provide a program library for the Windows platform, but fail to do the same for Linux. To leverage the benefits of Linux for industrial automation, seek a professional partner that provides a Linux code library.

 
Figure 2: Front-end intelligence activates push-based communications, which reduces CPU load and network utilisation.

Front-end intelligence to reduce CPU load

As noted above, embedded systems connected to remote I/O devices can be overwhelmed by the constant queries demanded by a polling architecture. The more remote I/Os you add, the greater the strain on the system. The solution to this dilemma is front-end intelligence. A traditional ‘dumb’ remote I/O device will only respond to commands from the controller, so the system must use a multithread polling architecture in order to keep status up to date. This requirement is a nightmare for the limited CPU resources of embedded systems. But what if we changed the direction? If the remote I/O device is intelligent enough to know when to initiate communications and send out updates, then it will not be necessary to constantly poll for I/O status. This type of active architecture uses front-end intelligence to dramatically decrease the network and CPU load on the system.

By: Rick Peng, Business Development Manager, Moxa Inc

Related Articles

Mobile robotics: forklifts will never be the same again

Robotic technology will transform the forklift industry, causing a colossal transfer of value...

Factor 1 sensors: The evolution of metal detection

Sensing different metals with traditional inductive sensors is difficult without physically...

How zoomorphism can teach us to make better robots

Making more natural robots may be the answer to industrial woes.


  • All content Copyright © 2018 Westwick-Farrow Pty Ltd