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:

Valmet’s automation powers world’s largest air-to-water heat pump
Valmet South Africa PLCs, DCSs & Controllers
Valmet will supply an automation system for Helen’s Patola air-to-water heat pump plant and two electric boilers currently being built in Helsinki, Finland. When completed, the air-to-water heat pump plant will be the largest in the world with a full heating production capacity around 30 MW.

Read more...
All eyes on the modern DCS platform
Schneider Electric South Africa PLCs, DCSs & Controllers
Modernised DCS platforms are no longer confined to hardware-dependent architectures. These systems have evolved to combine the strengths of both PLCs and DCS while adding capabilities that make them more open, resilient and collaborative.

Read more...
Automation solution for waste management at incineration facility
PLCs, DCSs & Controllers
Valmet is to deliver an automation system to Seongnam City’s incineration facility currently under construction in South Korea. By leveraging intelligent automation, the plant will optimise energy production, minimise emissions and deliver efficient, consistent performance throughout its entire lifecycle.

Read more...
Valmet’s supplies DCS to Europe’s largest electric boiler plant
Valmet South Africa PLCs, DCSs & Controllers
Valmet will supply an automation system to Helen’s Hanasaari electric boiler plant and a thermal accumulator being built in Helsinki, Finland. Once completed, it will be Europe’s largest electric boiler plant.

Read more...
Technology blueprint paves way for e-methanol fuel expansion
Schneider Electric South Africa PLCs, DCSs & Controllers
Schneider Electric has delivered the technology stack behind European Energy’s Kassø Power-to-Xfacility, the world’s first commercially viable e-methanol plant.

Read more...
PCS Global delivers turnkey MCC installation in Botswana
PCS Global Editor's Choice PLCs, DCSs & Controllers
PCS Global is delivering a turnkey containerised MCC installation for a major copper mining operation in Northwest Botswana.

Read more...
New energy-efficient evaporation line for dissolving pulp production
Valmet South Africa PLCs, DCSs & Controllers
Valmet will deliver a new evaporation line to Altri Biotek mill in Portugal. This delivery is part of Altri’s €75 million project to convert the Biotek mill to produce dissolving pulp for the textile industry.

Read more...
Valmet modernises turbine automation
Valmet South Africa PLCs, DCSs & Controllers
Valmet has received an order to deliver a comprehensive replacement of plant DCS and turbine control systems at Ennatuurlijk’s combined cycle power plant in the Netherlands.

Read more...
Hybrid DCS for an evolving industrial landscape
Schneider Electric South Africa PLCs, DCSs & Controllers
Today’s industrial automation continues to evolve at a blistering speed, which means traditional DCSs have to keep up to ensure continuous integration into modern, digital infrastructure.

Read more...
IIoT controller for the field and control cabinet
ifm - South Africa PLCs, DCSs & Controllers
The IIoT controller from ifm is a powerful, communicative and flexible PLC solution in machine and plant digitalisation.

Read more...









While every effort has been made to ensure the accuracy of the information contained herein, the publisher and its agents cannot be held responsible for any errors contained, or any loss incurred as a result. Articles published do not necessarily reflect the views of the publishers. The editor reserves the right to alter or cut copy. Articles submitted are deemed to have been cleared for publication. Advertisements and company contact details are published as provided by the advertiser. Technews Publishing (Pty) Ltd cannot be held responsible for the accuracy or veracity of supplied material.




© Technews Publishing (Pty) Ltd | All Rights Reserved