PLCs, DCSs & Controllers


Hard realtime control: moving PLC technology to the PC

January 2003 PLCs, DCSs & Controllers

Many manufacturers are turning to alternate solutions to replace their current proprietary PLC technology used on the factory floor. PC-based control is increasingly the method of choice.

The benefits of using a PC-based control solution that incorporates flowchart programming include:

* Faster design cycles

* Lower downtime on the factory floor

* Ease of use through Windows-based solutions

* Improved economies of scale

For many manufacturers, these benefits alone are all the reason they need to switch from their 20-year-old PLCs to PC-based control. For manufacturers with discrete applications, however, the need for deterministic scan times under one millisecond requires a solution that can achieve hard realtime in the Windows environment. This white paper summarises the need for hard realtime in discrete applications and how a PC-based control solution can achieve it.

The overwhelming benefits of personal computers and the Windows operating environment in factory control is a trend that cannot be ignored. The economies of scale of the $100 billion dollar PC industries far outweigh the comparatively tiny PLC industry. The R&D alone spent on accelerating PC technology is greater than the entire industrial controls market. And now, as in most other industries, the industrial control market is moving from expensive proprietary hardware to open PC hardware and software solutions causing most experts in the industry to agree: PCs are the control platform of the future.

The commercial PC industry, however, is not focused on realtime requirements for discrete manufacturing. One of the biggest fears control engineers have about replacing their PLC with a PC is giving up deterministic hard realtime control. Hard realtime control provides the ability to get fast, deterministic, repeatable scan times from the control engine. PLCs are, by their nature, hard realtime controllers that give predictable, repeatable results every scan. Understandably, PLC users demand the same level of hard realtime control that they have now as they move to PC-based control.

How the PLC accomplishes hard realtime control

A PLC is really nothing more than a microprocessor with a realtime operating system (RTOS) in proprietary form. The RTOS is the kernel of code that controls all operations and tasks run on the microprocessor. PLCs perform control by building the control engine around the RTOS, which gives the PLC its fast, deterministic response. It is the RTOS that controls the PLC I/O scan and logic control functions inside the PLC.

This same level of deterministic control can be attained on a PC by using the same type of hard realtime operating system used in a PLC - an RTOS with capabilities beyond Windows NT. Microsoft defines a hard realtime operating system as one that "must, without fail, provide a response to some kind of event within a specified time window. The response must be predictable and independent of other activities undertaken by the operating system." Microsoft goes on to explain, "under this definition, Microsoft Windows NT Workstation is not a hard realtime operating system."

Certainly, some slower process applications can withstand control engine hiccups of 30+ ms while Windows services higher priority disk accesses or network communications. In these cases, soft-logic control with Windows-based engines may be acceptable (see Figure 1).

Figure 1. Soft logic control with a Windows-based control engine
Figure 1. Soft logic control with a Windows-based control engine

In discrete applications, however, where scan times range from under 1 to 50 ms; the impact of the non-deterministic nature of Windows is unacceptable. Stopping the control engine to run system tasks such as servicing the hard disk or Ethernet card could cause lost machine cycles, damaged equipment, or even injury.

Still, Windows offers too many advantages to be ignored. The ability to run Windows-based programming, operator interface, program monitoring and access to other Windows applications on the same PC that runs control is one of the key benefits of moving to PC-based control. The question remains: How does one gain all of the benefits of Windows running on the PC yet achieve the reliability required of a PLC?

The answer lies in moving PLC RTOS technology to the PC

Hard realtime PC-based controllers, like the visual logic controller (VLC) by Entivity, marry the core of the PLC (a hard realtime operating system) with Windows. By running the PLC control engine as high priority tasks in an RTOS and Windows as a background task, control engineers get the best of both worlds: realtime control and the Windows operating environment running on the same PC.

With a hard realtime operating system at the core, all of the memory and CPU bandwidth required for the PLC function is set aside at boot-up. Windows loads after the control engine as low priority background tasks within the RTOS. The control engine is completely protected from Windows, which cannot access the control engine memory or pre-empt the control engine. Windows can lock-up - or even crash - with no impact on the realtime control operation.

Using a hard realtime operating system for control, the PLC function can be separated and run as a higher priority task that is completely independent of Windows (see Figure 2).

Figure 2. Hard realtime control
Figure 2. Hard realtime control

Windows can run applications best suited for non-realtime: data management, network communications and graphical user interfaces. Control logic programming, operator interface, data acquisition and client/server networking can run on the same PC as realtime control logic without impacting control engine performance. Other Windows applications running on the same PC, while independent of the RTOS, can access its realtime control data. For example, shifts reports or batch recipes can be managed with Excel, Visual Basic can be used for custom applications and SPC packages can be implemented to monitor production data for quality problems at the control station.

As a practical note, because the control engine always takes precedence, heavy control programs may impact the performance of Windows applications. Like every control application, sizing the controller (in this case the PC) to the application is important. One of the benefits of PC-based control is the range of PCs available to meet your application need. Also important to note: PCs can already significantly out-perform most PLCs. For example, the VLC running on a low-end Pentium processor performs Boolean logic 50 times faster and integer manipulation 216 times faster than leading PLCs. Many PC-based control applications consume only 5-15% of the CPU bandwidth for logic control, leaving 85-95% of the PC left over to run Windows.

With a PC-based control system that can provide all of the hard realtime control characteristics of a PLC, control engineers can look to PCs to meet their most demanding discrete control applications that may require deterministic, repeatable scan times as short as 200 µs. By moving the capabilities of the PLC to the PC, hard realtime PC-based control can offer the best of both worlds: deterministic control and Windows functionality. The logic control engine can be combined with easy-to-use Windows programming tools and operator interfaces. The challenge is not trying to make Windows function as a PLC. The challenge is to move the PLC into the PC.

With most soft-logic control systems, the control engine is run as a high priority pseudo-realtime task under Windows. Pseudo-realtime tasks can be interrupted by deferred process calls (DPCs), which are used to service NT system functions such as disk accesses, network communications and mouse interrupts. DPCs can be triggered by lower priority user tasks such as opening files or starting applications. This phenomenon is known as priority inversion-when a user task can cause a higher priority task to wait.

Stated simply, user tasks or system functions can force the control engine to wait for a significant amount of time while the DPC is being serviced. In many slower process applications, these delays are insignificant to the speed at which the process must run. For discrete applications, however, these delays can be unacceptable.

In a hard realtime system, the core of a PLC - a hard realtime operating system (RTOS) - is loaded first. The control engine runs as the highest priority task in the RTOS. All Windows functions run as the lowest priority task within the RTOS. The logic control engine always has priority and is completely protected from Windows, which cannot pre-empt realtime control.

For many critical discrete applications, deterministic control is required. User and system functions cannot pre-empt control. Hard realtime PC-control provides deterministic scan times as short as 200 µs.

In conclusion

Discrete manufacturing applications can view PC-based control as a viable alternative to outmoded PLCs when that solution provides the necessary deterministic scan times applications demand. PC-based control solutions that provide hard realtime control guarantee that the control function runs as a higher priority task independent of Windows.

This benefits the control engineer by providing the hard realtime they need with an easy to use Windows environment running on a standard PC. The manufacturer benefits from the PC's economy of scale, its ease of use, its low maintenance and upkeep, and its ability to scale as the technology matures. A PC-based control solution that guarantees hard realtime enables a manufacturer to take advantage of the undeniable business benefits that result from using standard technology.

For more information contact Winston Ilsley, Alstom Automation, 012 664 1415, [email protected], www.plcdirect.co.za





Share this article:
Share via emailShare via LinkedInPrint this page

Further reading:

Innovating control and display solutions
PLCs, DCSs & Controllers
Mimic Group, founded in 1971, started with electronic and mimic displays before expanding into control desks, software and display electronics.

Read more...
ABB technology for greater circularity in metals and mining industries
PLCs, DCSs & Controllers
ABB has been selected by GreenIron, an innovative Swedish company working in the mining and metals industries with its patented materials reduction technology, to provide automation and control system solutions for a first commercial facility in Sandviken, Sweden.

Read more...
EtherCAT Box modules for confined spaces
Beckhoff Automation PLCs, DCSs & Controllers
Users of EtherCAT and EtherCAT P Box modules from Beckhoff’s EP and EPP series benefit from 25 years of IP67 expertise in the I/O sector. The broad product range for decentralised distribution of the I/O level directly at the machine or system has been continuously expanded and further developed during this time.

Read more...
ABB updates distributed control system
ABB South Africa PLCs, DCSs & Controllers
Leveraging 30 years of continuous innovation and reliability, ABB’s updated Freelance 2024 distributed control system (DCS) offers greater plant adaptability, faster and more reliable device communication, improved system security, and seamless data exchange.

Read more...
Four ways modern operations control can boost sustainability and efficiency
PLCs, DCSs & Controllers
With the growing importance of digital transformation, HMIs and scada have evolved from control panels to vast operational hubs. Next-gen HMI/scada can bring together data, personalisation, and advanced insights to successfully achieve organisational goals, it is important to think about HMI/scada holistically within the operations ecosystem.

Read more...
The convergence of intelligence: DCS, SCADA and TLC
Schneider Electric South Africa PLCs, DCSs & Controllers
In the early days of industrialisation, control systems were primarily mechanical, and relied on manual intervention and simple feedback loops to manage processes. Now, in the 21st century, industrial process automation systems are mind-blowingly intelligent, and provide almost unparalleled control and monitoring capabilities, making them integral to modern industrial systems.

Read more...
PC-based control for advanced hydrogen storage technology
Beckhoff Automation Editor's Choice PLCs, DCSs & Controllers
The proportion of renewable energies from solar, wind and water is rising continuously. However, sufficient storage options are of the essence to use these energies as efficiently as possible. GKN Hydrogen offers a particularly compact and safe option, low-pressure metal hydride hydrogen storage systems with PC-based control from Beckhoff.

Read more...
ABB modernises key board mill
ABB South Africa PLCs, DCSs & Controllers
ABB has secured a landmark contract to modernise Smurfit Kappa’s Paper Machine 5 at its corrugated cardboard mill near Mexico City. ABB will provide Smurfit Kappa with DCS, accompanied by a comprehensive paper machine drives system, encompassing some of the market’s most advanced drives and motors meticulously designed to optimise PM5’s performance.

Read more...
The synapses of the distributed control system
Schneider Electric South Africa PLCs, DCSs & Controllers
Industrial operations require a distributed control system (DCS) to coordinate and control their process subsystems in real time. Like the brain, a DCS is a multitasking maestro, controlling and coordinating complex processes in a myriad of industrial setting such as large manufacturing plants, providing valuable top-down control.

Read more...
Modular assembly platform for clean manufacturing
Beckhoff Automation PLCs, DCSs & Controllers
JR Automation delivers custom automated solutions for numerous industries. It has done this through its scalable, modular automation platform, FlexChassis, which speeds up time to market while cutting costs. The company chose the XTS linear transport system from Beckhoff because of its speed, and modular design that allows for multiple configurations.

Read more...