Hard Real-Time with Windows XP
Software
With PC WORX, Phoenix Contact is offering automation software which combines programming in accordance with IEC 61131, field bus configuration and system diagnosis in a single tool. The OPC configurator integrated into PC WORX creates the connection to higher-level visualization systems, such as Genesis 32. Interfaces to ECAD software packages and Office engineering tools such as Excel make work simpler and prevent errors from occurring through multiple data inputs, thus reducing the time required. PC WORX uses an intuitively operated graphical user interface with preset views. The software supports the five languages specified in IEC 61131-3 and uses a Windows XP platform on the user side, while the real-time function runs in the Windows CE environment. PC WORX from Phoenix Contact supports both INTERBUS and PROFINET IO.
Real-time under Windows?
For several years, real-time extensions have been available for Windows; the real-time function being realized at the Windows XP kernel mode driver level. In principle, this has made real-time control possible; accordingly, extensions are available on the market which are based on this concept.
The real-time drivers are an extension of Windows, and are stored in the same memory as Windows resulting in a certain degree of protection against a Windows Blue Screen. However, it is always possible that a faulty driver under Windows will disable the entire real-time function. In theory, all the drivers in such a system should be custom-written in order to provide the necessary degree of operating safety. Usually, however, a driver will be used which is neither written by the real-time supplier, nor by Microsoft. As a result, errors can easily occur which can cause the real-time application to crash.
This is precisely the issue which causes problems with regard to product liability. If a machine is operated using a real-time extension running in the Windows memory space, a driver error may result in the machine crashing when the motor running at full capacity. For this reason, machine developers always avoided using Windows XP when it came to critical control systems, since they had already experienced crashes of this nature on their own office computers.
When developers program a real-time extension for Windows XP at the driver level, they are not working with well-accepted, open and standard operating system, but a niche product. Furthermore, only very few programmers are available that are familiar with the finer points of real-time extensions of this type. Due to the subsequent high support costs, Phoenix Contact considered this solution to be unsuitable.
Hard Real-Time Under Windows
For this reason, Phoenix Contact has also decided not to use a conventional real-time extension for Windows XP. Instead, the company is implementing the CeWin real-time solution from KUKA Controls for its Soft PLC products. With CeWin, both the real-time function under Windows CE and the visualization under Windows XP run on the same Intel XXX CPU - however both in separated and protected memory areas. For CeWin, KUKA Controls is using a "headless device" version of Windows CE, which leaves out the display and keypad control, since this function is provided by the Windows XP side.
In contrast to conventional real-time extensions, with CeWin, the real-time Windows CE operating system is run in parallel with standard Windows XP. An important factor here is that neither of the two operating systems, running in parallel, knows about the memory of the other. Thanks to the clear separation of the memory areas, any Blue Screen which may occur under Windows XP will not influence the real-time functioning of Windows CE. Alternately, a Windows CE thread will not be able to accidentally write to Windows XP memory.
The CeWin demo can be downloaded directly and tested from the KUKA Controls homepage via the "Download - CeWin - Evaluation Software" navigation item. The demo is a fully functional version of CeWin with a timeout function added. When the computer is rebooted after the demo version of CeWin has been installed, Windows XP will indicate a smaller memory space available. For example, if 512 MBytes of total system memory is installed, CeWin defaults to using 32 megabytes and therefore only 480 megabytes will be available for Windows XP.
This means that Windows XP does not even recognize the memory space in which CeWin is running. For Windows XP, the memory in which CeWin is running does not even exist. This therefore provides complete protection. If one of the drivers within Windows XP were to try to access this memory, an exception error message would be generated by Windows XP. Hardware protection is also provided, since KUKA Controls uses the x86 MMU intensively in order to ensure that both operating systems are completely separated from each other in memory.
Incidentally, after uninstalling the demo, nothing remains, either in the Windows registry or in any other part of the memory.
Even when Windows XP has been completely disabled (Blue Screen), the real-time environment continues to run properly, so that defined states can be achieved in due course, and all motors can be stopped.
If you found this page useful, bookmark and share it on:
If you are familiar with RSS feeds, you can also sign up for our free blog feed. Our RSS feed is updated in real-time while our newsletter is updated daily.
