As personal computer (PC) technology becomes more and more integrated into machine controls, there is a growing awareness of the benefits they bring, especially to CNCs in the areas of: fast computing speed, low cost, standardized communications, and compatibility with third party software. However, PC technology and its related software brings a family of idiosyncrasies to CNCs that control designers must be knowledgeable of and provide safeguards against, when integrating PCs and third party software into control systems. This family of idiosyncrasies or software bugs has jargon that is foreign to most of the CNC community. Examples of this new jargon are: fandango encore, smash the stack, spam, overrun, aliasing bug, precedence lossage, secondary damage, memory smash, and memory leaks. This article addresses the last one of these terms, "memory leaks," and looks at its relevance to CNCs.
The term "memory leak," also called "core leak," applies primarily to RAM memory in a computer although hard disk space can also become involved on a virtual memory machine where a swap file is utilized on the hard disk to extend the RAM's capability. A "memory leak" occurs when memory has been allocated for some use by a program and is not reallocated once it is no longer needed. This is an error or bug in a program's dynamic store allocation logic that causes it to fail to reclaim discarded memory.
Over successive allocations the memory dribbles (leaks) away, lost for use until the system is rebooted. Memory leaks will cause an application or software program to appear to use more memory over time than it should.
Severe leaks will cause the application to run out of memory and crash or "lock up." The impact that this action actually has on the machining process when it occurs in a CNC is determined by the individual design of the CNC. The most desirable design scenario is to have the real-time section of the control perform a safe stop of all machine axes in such a manner that the cutter does not violate the part surface.
Memory leak is no respecter of operating systems. They have been found to exist in MS-DOS based programs, Windows 3.xx programs, Windows NT programs, Macintosh programs, and OS/2 programs. Although there is the potential for memory leaks to occur anytime a software engineer writes a new software application for any operating system, there are adequate prevention techniques and software testing tools available today that can be used by CNC designers to prevent memory leaks within the operating system of CNCs.
However, one area where PC-based controls are still at risk for memory leaks is when third party software is run in the control. But, I should quickly point out that the risk of encountering a memory leak when running third party software in a CNC is no greater than encountering one on your PC at home. The difference between a home PC and a CNC is that the power to a CNC is usually left on for longer periods of time, sometimes for weeks, without rebooting. This extended operation time between boots will tend to highlight a memory leak problem more on CNCs than on a home computer that is turned off after each use.
So, have PC-based controls introduced a new set of problems that users should be concerned about? No, say most supporters of PC-based controls. They look on the memory leak issue as low risk and a small price to pay for the ability to run a variety of third party software, connect to factory networks, and access the Internet. Advantages of PC-based controls far outweigh the minor disadvantages caused by memory leaks.