United States Patent 19 11 Patent Number: 5.453,933
United States Patent 19 11 Patent Number: 5.453,933
United States Patent 19 11 Patent Number: 5.453,933
N-10
17--- / 23 -/
22 24
CONTROL JOG
PANEL PNDANT
19 21
U.S. Patent Sep. 26, 1995 Sheet 1 of 2 5,453,933
g?,v
1."91-)
z?, AHOWE'W
CO
fìci
U.S. Patent Sep. 26, 1995 Sheet 2 of 2 5,453,933
Process
Machine
Kernel
Motion logic
Controller Controller
Platform
Directory Services
Services
Operating
System
Device
GE) (E) Drivers
5,453,933
1. 2
CNC CONTROL SYSTEM the above simplified example illustrates.
The motion control function of the software receives
MICROFICHEAPPENDIX commands describing how a particular axis or motor should
This application includes a microfiche appendix having be moved. For example, in the above example for logic
39 frames.
control, the logic control function sent the motion control
function a command to raise the spindle. The motion control
FIELD OF THE INVENTION
function takes this "general' command, breaks it down into
smaller, discrete movements (i.e. controllably move the
This invention relates to computer numeric controlled spindle up 0.001" at a time until it has moved up a total of
(CNC) machine tools, and in particular, to the control O 6 inches), and sends and receive electric signals from
systems used to operate such machine tools. precision motors to ensure the movement is carried out. The
motion control function is also able to execute more com
BACKGROUND OF THE INVENTION plex, multi-dimensional commands, such as to move the
axes of a milling machine in a pattern so as to cut an ellipse
15
of specified dimensions in a workpiece.
CNC Control Systems Because the motion control function is the portion of the
The purpose of a CNC machine is to use a set of input software (except for device drivers) that interacts most
specifications describing a physical object to produce a closely with the hardware components that actually carry out
machined part according to the specifications. The part is shaping processes on a workpiece, the motion control func
typically formed from solid block stock material such as 20 tion also receives information about hardware faults from
metal, and shaped by various machine tools such as drills, hardware devices. For example, if a hardware device is
mills, lathes, electrostatic discharge machines (EDMs), unable to execute an instruction, the motion control function
gauging systems and the like. CNC machines are complex will receive a notice of the error from the hardware (or its
and include hundreds of components. Examples of input associated device driver). This information needs to be
devices include keyboards, operator consoles, pressure sen 25 communicated back to the other portion of the CNC control
sitive CRTs, various tools and machine sensors, limit software responsible for requesting the motion control func
switches and network interfaces. Output devices include tion to complete the function the software is currently
motion controllers that send motion control signals to undertaking, so that appropriate action, such as displaying a
motors driving axes or a tool, CRT displays, console status message on the operator CRT, may occur. However, there
lights and audible alarms. Other components include micro 30 are usually many other portions of the CNC control system
processors, memory, disk drives, data buses and wiring software that will also need to be informed of the hardware
harnesses. The software executed by the computer processor fault. Moreover, the portions that need to know about the
is a critical component of a CNC machine, as it coordinates fault will vary depending on the exact fault. In past systems,
the functions of the all the other components of the system. the motion control function has been used to keep track of
In general, CNC software is custom written for the particular 35 which portions of the CNC control system software must be
brand of components a CNC manufacturer or system inte notified of which hardware faults. This not only places an
grator chooses to include in the CNC machine. As a result, increased burden on the motion control portion of the CNC
CNC software is extremely complex, and a software pro control system software, but also makes this portion more
grammer for a particular CNC machine must be intimately difficult to maintain.
familiar with the way virtually every hardware component 40 Computer programmers writing CNC software have gen
interfaces with the software, and with the entire software erally designed the entire software system using structured
system itself. techniques that analyze what the entire CNC machine tool
For example, two representative functions of most CNC must do (functional decomposition). This has resulted in
software are the logic and motion control functions (collec complex, difficult-to-modify software systems. For
tively referred to herein as the "kernel”). The logic control 45 example, software code relating to the user interface by
function keeps track of the specific sequence of steps that which a user describes a part to be machined, can be found
must be taken by various movable hardware components to in other portions of the CNC control system software, such
accomplish a task. For example, the steps required to mount as the motion controller. One example is that when a motion
a differently sized drill bit into the tool holder of a spindle controller receives a signal from a machine tool indicating a
from an automatic tool changer in a milling application 50 fault condition (for example, when an object in the work
might be: (1) send a command to raise the spindle containing area prevents the table from moving to a desired location, or
the currently mounted drill bit so the tool changer will fit a blown fuse), the motion controller might directly display
underneath it, (2) send a command to the tool changer an error message on the CRT display. Because prior CNC
instructing it to move below the spindle, (3) send a com control system software generally is not broken down into
mand to the spindle instructing it to release the currently 55 portions corresponding to the discrete, physical components
mounted drill bit, (4) wait for a signal from the spindle of a CNC machine tool, a change in one portion of the
indicating that the drill bit has been released, (5) send a software is difficult to make and frequently requires changes
command to the tool changer instructing it to move to rotate to other portions of the software.
clockwise 30 degrees to position the new drill bit below the Another example illustrating this problem occurs when a
spindle, (6) interrogate the tool changer to confirm that the 60 user, system integrator or even machine tool manufacturer
tool changer has successfully executed the rotation com wishes to add a new hardware component to the machine
mand, (7) send a command to the spindle commanding it to tool. For example, it may be desirable to replace an AC
engage the new drill bit underneath it in the tool changer, induction motor with a DC brushless motor from a different
and (8) send a command to the tool changer instructing it manufacturer. The new motor will likely use a different
move away from the spindle and work area. Given the 65 communications protocol and have different tolerance speci
hundreds of moving, controllable parts in a CNC machine fications and operating limits. Therefore, the motion control
tool, the logic control function is much more complex than software will need to be modified to be able to communicate
5,453,933
3 4
with the new motor using its communications protocol. The modeling systems of interactive components in order to
user interface will also need to be modified so that the user determine sequences of actions such systems would perform
may specify the improved tolerance parameters. However, under various conditions. For example, a programmer may
with past CNC software, these changes will have a ripple wish to program a computer to mimic the manner in which
effect throughout the entire software system, greatly increas some particular digital logic network responds to a particular
ing the time required to develop a new software system input stimulus. When the programmer doesn't know beforc
capable of using the new motor. Many of the additional hand what sequence of steps the logic network would carry
revisions are caused by the fact that the data the Software out in response to the stimulus, but only knows how each
needs to access is dispersed throughout the entire software individual component changes its outputs in response to a
system. For example, to add a new software function, the 10 change to its inputs, the programmer often finds it difficult
software may need to know, what tool is presently in the to utilize sequentially organized instructions to program a
spindle, the speed the spindle is rotating, the coordinates of computer to model the behavior of the system.
the axes (location of the table), the readings of a thermal In contrast to sequentially organized software, 'objccl
sensor, information about forces being exerted on the cutting oriented' software is organized into "objects', each com
spindle, and the stage (or step) of processing the workpiece 5 prising a block of computer instructions describing various
is currently in. In past CNC systems, this information would procedures ("methods”) to be performed in response to
likely be diffused throughout various software modules, and "messages' sent to the object. Such operations include, for
the way these data elements interact is either too complex to example, the manipulation of variables and the transmission
discern (execpt to the original software author), or propri of one or more messages to other objects. Messages are sent
etary. 20 and received between objects having certain functions and
These problems with CNC control systems have led to knowledge to carry out processes. When one of the objects
several other problems throughout the industry. There is a receives a message, the object carries out an operation (a
long lead time for system integrators or CNC machine tool message procedure) corresponding to the message and, if
manufacturers to be able to incorporate new hardware necessary, returns a result of the operation. Each object has
components into existing systems. This problem applies not 25 a region where internal states (instance variables) of the
only to new CNC machine designs, but also to efforts to add object itself are stored and where the other objects are not
improved or additional components to an existing CNC allowed to access. The objects comprise concept objects that
machine tool, or to retrofit an existing machine tool with represent concepts and instance objects that represent
CNC capabilities. Another problem is that of scalability. instances of the concept objects. The concepts are clearly
Because CNC control software is usually written for use in 30 separated from the instances. One feature of the object
accordance with an anticipated collection of hardware com oriented system is inheritance. With respect to a ccrtain
ponents, the same software can not be easily adapted for use concept object, there is defined an upper concept object that
in connection with other hardware components. In other has a concept more abstract than a concept held by the
words, CNC software is generally not "scalable,” meaning certain concept object, and the certain object can inherit the
that the software used to operate Sophisticated, high-end 35 functions (message procedures) and knowledge (instance
CNC machines can not also be used to operate "bare-bones,' variables) of the upper concept object to utilize them. For
low-end CNC machine tools. As a result, CNC manufactur example, a concept object "circle' may inherit functions and
ers "reinvent' software having the same functionality knowledge from its upper concept object 'shape.”
merely because it designed to work in a CNC having A programmer"programs' in an object-oriented program
different hardware components. 40 ming language by writing individual blocks of code each of
Programmers for CNC control systems can also be which creates an object by defining its methods. A collection
required to "reinvent' software components not just in of such objects adapted to communicate with one another by
response to new hardware, but also in response to new means of messages comprises an object-oriented program.
standards for inputting descriptions of parts to be formed by Object-oriented computer programming facilitates the mod
the CNC machine. The earliest CNC machines accepted part 45 eling of interactive systems in that each component of the
definitions through punched paper tape. Subsequent CNC system can be modeled with an object, the behavior of cach
machines (such as that disclosed in U.S. Pat. No. 4,477,754) component being simulated by the methods of its corre
interrogated a machine operator through a series of ques sponding object, and the interactions between components
tions to obtain instructions about how to create a desired being simulated by messages transmitted between objects.
part. More recently, several standard data file formats have 50 An operator may stimulate a collection of interrelated
emerged for describing parts to be machined, such as the objects comprising an object-oriented program by sending a
HURCO conversational or RS-274D M&G code programs. message to one of the objects. A method of the object
In the past "part program interpreter' modules of CNC receiving the message may cause the object to respond,
control system programs, each module used for accepting a carrying out predetermined functions which may include
part definition in a different format, would generally have to 55 sending messages to one or more other objects. The other
access, as described above, various data elements and Soft objects may in turn carry out additional functions in
ware routines diffused throughout the CNC control system response to the messages they receive, including sending
software. Again, each different input format has resulted in still more messages. In this manner, Sequences of message
a unique part program interpreter Software program, and and responsc may continue indefinitely or may come to an
these programs all include much common, and therefore 60 end when all messages have been responded to and no new
needlessly duplicative, functionality. messages are being sent. When modeling systems utilizing
Object Oriented Software an object-oriented language, a programmer need only think
in terms of how each component of a modeled system
Most existing programming languages provide 'sequen responds to a stimulus and not in terms of the sequence of
tial' instructions for a processor to implement. These lan 65 operations to be performed in response to some stimulus.
guages have previously been used to implement CNC con Such sequence of operations naturally flows out of thc
trol systems. However, computers are often utilized for interactions between the objects in response to the Stimulus
5,453,933
S 6
and need not be preordained by the programmer. BRIEF DESCRIPTION OF THE DRAWINGS
Although object-oriented programming makes simulation FIG. 1 is a schematic diagram of the hardware compo
of systems of interrelated components more intuitive, the nents of a CNC machine tool system on which the control
operation of an object-oriented program is often difficult to system of the present invention may operate.
understand because the sequence of operations carried out
by an object-oriented program is usually not immediately FIG. 2 is a schematic diagram of the types of software
apparent from a software listing as in the case for sequen classes included in a CNC control system, and several
tially organized programs. Nor is it easy to determine how representative types of object-oriented objects within sev
an object-oriented program works through observation of eral of these classes.
the readily apparent manifestations of its operation. Most of 10
SUMMARY OF THE INVENTION
the operations carried out by a computer in response to a
program are "invisible” to an observer since only a relatively The control system of the present invention provides a
few steps in a program typically produce an observable real-time CNC software system that isolates system respon
computer output. sibilities into classes that permit a CNC manufacturer or
15
Object-oriented analysis and design methods permit reuse system integrator to manage complexity and change. The
of system analysis and requirements from other products in control system allows different systems to be created from
the same family. Object-oriented software design means that the same model and future, as yet unimagined, technological
software components are created from data and functions advances can be incorporated without redesigning or making
and are organized into objects. An object is an abstraction of 20
massive changes.
something in the real world, reflecting the capabilities of a The system utilizes an object-oriented software environ
system to keep information about it, interact with it, or both. ment. A first class of object types is provided for processes
It is, therefore, an encapsulation of attribute values and their (such as drilling, reaming, milling) to be carried out by
exclusive services. An object's attributes describe the object, machine tool components (the Process Class). Some pro
but not how it works. The object's services are instructions, cesses objects may inherit characteristics of other objects in
programs, procedures, or actions that describe what the the Process class. For example, a "hole" object may have
object will do when something happens. characteristics such as a depth and diameter, which can be
As described above, objects are grouped into classes. A inherited by other process objects, such as a drill, rean or
class includes a description of how to create new objects in bore process object. A second class of object types of is
the class and establishes the basic variables that are common 30 provided which represent instances of machine tool compo
to all of its objects. New objects inherit these common nents, such as a table (axes), a spindle, tool changer or
characteristics from the parent class. This feature allows the operator console. Again, some objects may inherit attributes
software engineer to build on existing design and code by of other objects. For example, an axis group, namely an
creating more specific objects from the easily reused code in object for simultaneously controlling multiple axes to shape
the general class. For example, a software engineer can use 35 complex three-dimensional objects, may be inherit attributes
a general class of characteristics for a "device' to create a of a single axis object. Other objects may be composite
model of a more specific device such as a spindle. Object objects of other tool objects. For example a tool changer
oriented analysis and design explicitly represent common may be a composite object of a collection of different milling
ality in the system's objects and use inheritance to identify bits which may be held in the tool changer (in addition to
and capitalize on commonality of attributes and services. 40 having its own attributes).
The system may only access data through the services, if at Most importantly, during execution of the software com
all. Services hide an object's data and send messages to ponent of the control system, the objects transmit messages
perform operations. This isolates dependency on aparticular to each other. For example a drill process object can be
data structure thus permitting new features to be added defined to hold all the information needed to define a drilling
without changing the arrangement of the original objects. 45 process, and this information may be sent in a message to an
This structure protects the data from the damage that com Machine Class spindle object (to move the spindle down and
monly occurs during changes in monolithic, proprietary form the hole) and to an axis group object (to position the
systems. workpiece in the proper location). However, the portion of
the software which defines the drilling process does not need
OBJECTS OF THE INVENTION 50 to access information regarding how the actual machine tool
One object of the invention is to provide a CNC machine component carries out its task, or how the motion control
tool control system that utilizes an object oriented program module controls the machine components. Therefore, in a
in which objects exchange object oriented messages. software implementation, the same process object can be
used in virtually any CNC machine, without undue regard to
Another object of the invention is to provide a CNC 55 its manufacturer or specific hardware components. More
machine tool control system that is scalable such that it may over, the object oriented messages through which various
be used for either high end or low end CNC machine tools. objects communicate provide a standard interface for adding
Another object of the invention is to provide a CNC additional functionality to a CNC machine tool control
machine tool control that is easily modifiable, in which system.
previously written software can be reused, and in which new 60 For example, the primary purpose of a user interface is to
objects can be added which inherit or comprise composi collect information about a series of machining processes to
tions of previously defined objects. be performed. Once the basic information is collected, the
Another object of the invention is to provide a CNC user interface can execute the processes by: (1) calling a
machine tool control system in which new processes may be process object with data about a new process to thereby
added by a programmer without requiring the programmer 65 create the object; (2) repeat step (1) for each process; and (3)
to know details of how particular hardware components sequentially sending a message to each defined object telling
carry out specific workpiece shaping processes. it to execute itself. Thus, the programmer of the user
5,453,933
7 8
interface may be completely insulated from motion control by the Kernel's components. New machine tool components
data required for the machine tools to carry out their tasks. can be added to the Machine class and existing components
Because communication between software objects is can be easily modified without making changes to thc
accomplished through messages, software functions can be Kernel.
more easily distributed among different, simultaneously The Process class holds the Process techniques (methods)
executing tasks. For example, instead of a motion control that perform specific common practices on the specific type
module needing to keep track of which task needs informa of machine (low-end milling machine, lathe, punch press,
tion regarding a particular hardware fault, information EDM, gauging system, etc.). The objects in this class usc
regarding a fault may merely be sent to an exception handler multiple Machine Class objects and can be accessed from
object. This allows the motion control module to devote O multiple part program interpreter (operator) programs. This
more processing time to its primary task of controlling class usually contains libraries of canned cycles to handle
motion, and permits all error conditions to be handled in a such operations as milling frames, tapping, and boring, but
uniform manner. Specifically, the exception handler may it also contains any subroutine that several different appli
keep a database of which objects have a need to know about cations need to use. The objects provide easy accessibility to
which types of faults, and report specific faults only to those 15 the complex CNC features. ar
objects. Therefore, in adding a new process or machine The Operator Class (including the Part Program Inter
component object to the system, modification of the motion preter) is an extension of the CNC operator's skills and job
control module can be kept to a minimum as fault conditions functions. It also holds the operator programs such as part
may be handled by the exception handler. programming and system diagnostics. This class makes use
20
There are seven basic Classes of software components: of services provided by other classes to manage control of
Device Drivers, Operating System, Platform Services, the the machinery. Using programs at this level, the operator can
Kernel, Machine Class objects, Process Class objects, and set the system parameters (e.g., maximum feedratc) and
the Operator Class. The Device Drivers class contains the communicate with the machine tool while it is running a part
interfaces to particular hardware such as the hard drive, 25
program. Most of the changes made to a CNC will bc
floppy drive, serial and parallel ports, motion board, and I/O modifications to change what the operator can do. These
device. This isolates all hardware interfaces into a single changes usually affect the part programming and part Cutting
class that only needs to be changed when new hardware environment and can be made at this level with any accom
components are added to the existing system components panying techniques changed in the Process class.
and need to communicate in a different manner with the Engineers changing a control system of the present inven
30
system. tion can easily make changes to the system because they do
The Operating System class is responsible for hardware not need to be experts on the entire system to make a
and software resource management. It manages memory, modification to a single component in a class. One change
timers, and the scheduling of all processes and tasks. This does not have a ripple effect of change throughout the
class makes it possible to port a control system in accor 35 system. Portions of the system that are most likely to change
dance with the present invention system to other hardware such as the user interface and device drivers are separated
platforms. The Platform Services class is responsible for from the Kernel. These components are more accessible to
facilitating the execution of tasks such as error handling and change through PLC programs, customizations to thc
communication between part program interpreters and the Machine class and addition to or modification of operator
lower levels of the system. This class simplifies system 40 programs.
communications and only requires change if advances in Users of the control system of the present invention will
computer science technology need to be incorporated have a more stable design that can be tested for completic
because they improve the efficiency or change the manage ness. The system makes possible the efficient reuse of
ment of initialization and message handling. The Kernel system analysis, requirements, design, and components. The
class handles continuous motion and discrete input/output 45 system forces system designers to consider all nearly all
implementation components. This class forms the stable levels of CNC responsibilities to be handled by object
core of the CNC control system that only needs to be oriented software. In addition, changes at the Device Driver
changed when performance scaling is required. This and Operating System levels may incorporate new technolo
approach is in sharp contrast to prior CNC control systems gies and at the Operator and Process levels will be changed
that require system developers to change the Kernel when 50 to enhance or scale down system features and functionality.
making changes to the Operator Class objects, such as the The core classes, Machine and Kernel, will change infre
Part Program Interpreter. quently due to the "all purpose' nature of the objects in thesc
The remaining three classes (Machine, Process, and two classes.
Operator) specifically tailor any system to be a machine tool The present system uses an open systems, object-oriented
CNC. The Operator and Process classes are the "tools' used 55 design approach. This allows users to tailor hardware and
to communicate clearly to the above hardware-oriented software to gain the competitive edge. The CNC control
classes. The Machine class contains the objects that makes system allows easy integration of hardware and softwarc
this communication understandable by the Kernel compo from different suppliers and permits the porting of systems
entS. to other hardware platforms. Industry standard hardware
The Machine class is a collection of objects that embody 60 interfaces to simplify assembly and maintenance may be
the abstraction of real-world components such as the tool used. The system is dynamically reconfigurable to easily
changer, spindle, or coolant. This class describes all generic permit third party development of software components.
categories of machine tool devices by their basic required The system uses simple, Standard messages in a message
characteristics. Operator programs usually communicate schema. The messages are flexible and allow a user to Sclect
through the objects in this class to the Kernel. The Machine 65 messages they want to use and to alter the messages to mect
class turns operator commands such as "change to tool #6' their needs. The system software is scalable to support less
into a message or series of messages that can be understood expensive and/or a full-featured CNC hardwarc system
5,453,933
10
using the same software structure. follows:
As with data characteristics, services can also be inherited
from the parent class when a new class or object is created.
20
Of course, the new class or object may use the service or There are three types of messages: actions, information
create a different version of it. Different objects can use blocks (info), and cycles. Actions are system messages that
identical services. Therefore, a software engineer writes the are required to conduct basic communication between sys
code for the service only once and then reuses it after that. tem components and do not change from one machine type
The reusability of existing object-oriented code makes to another. Info messages include a block of information that
development and modification faster because there is less to 25 was either requested by a system component or that is sent
write and maintain. relative to a button-event, key-press or mouse-click for
A diagram of the system of classes of software component example. Cycles are messages that perform customized
classes is shown in FIG. 2. operations that may change from one machine to another.
The software objects use messages to communicate Cycles may be supported by ladder logic sequences in the
between the components. The class structure simplifies
30 Logic Controller program. In addition to using new and
system operations and programming by limiting the mes existing Cycles, the system integrator may take advantage of
sages of interest to each class. For example, the Machine the Softkey and Prompt messages in conjunction with ladder
class does not worry about the Kernel's responsibilities such logic to form customized operations that allow interactive
as travel limits and servo errors. Conversely, the Kernel is input from the operator console. For example, toolchanger
not concerned about ownership or devices because the
35 calibration could be done by invoking a ladder logic
Machine class handles that exclusively. Messages sent from sequence which responds to a specific softkey and then
the Operator and Process classes to the system devices can performs the logic necessary to do calibration for a particu
originate from several sources, including the Part Program lar machine. This would require no hard-coded software in
the system and would be completely configurable by a
Interpreter, the User Interface, Push Buttons on the Console 40 system integrator without the control builder's assistance.
or Jog Pendant, or a Sensor Interface Applications can Any Part Program Interpreter (PPI) may be used as long
communicate with the Kernel through any or all of the as it uses the embodiment's interface.
system classes. For specific functions, a software engineer Components of the Operator Class may include the fol
may bypass a class and connect an application directly to the lowing: Conversational part program interpreter, NC inter
next class or another class down. This is accomplished 45 preter, Manual mode user interface, Auto mode user inter
through the standard message formats supplied for each face, Diagnostics user interface, Program editor for
object component in the system. conversational programming and Program editor for NC
The general format for messages sent between classes is programming
set up as a data structure containing a common header and The Process class contains pre-packaged objects using
the arguments that are unique for each specific message. The 50 multiple class objects. When an application uses packaged
header includes several variables that are common to all cycles, the operator can specify a type of operation and
messages. The messages are designed to be variable length define only the necessary variable information. Then the
for efficiency. The message type is a static identification system makes additional calculations to define the operation
number which is unique to the class of message being sent fully. For example, when the operator is programming a
(e.g., a calibration message). The transaction number, 55 shaping process such as a hole-making drilling operation
unique for each specific message transmission, is assigned at with pecking, the operator simply specifies the peck type and
the time the message is sent and is used to match responses depth (thereby defining the X, Y and Z dimensions) and the
to the messages. system uses a canned cycle to determine the exact move
The response message is set up so that it uses the request ments of the drill during the pecking process. Another
message's ID and transaction field, and the status is set to 60 example would be a milling object which represents a
"received” or “completed” or "denied” as required. This milling operation to be used to shape a workpiece. The
makes it clear which request is associated with the response. object may further include means for defining whether the
Responses have no arguments associated with them. Any shape to be milled is to be removed from the workpiece or
thing that requires arguments to be passed is considered to left remaining in the workpiece. The object may also include
be a new message. For example, the response to an IOSend 65 sequencing status means representative of whether the pro
Node message is an IOInfo message with the data field cess defined by the object has been performed. In one
passed as an argument. A Sample message structure is as embodiment, packaged cycles are contained in libraries that
5,453,933
11 12
can be used by different operator programs with little or no running applications. Applications register with Dircctory
modification. These cycles are pre-programmed, common Services and receive addresses of the other applications with
machining operations and include drill, tap, peck and ream. which they need to communicate. Directory Services does
The Machine class forms a device-oriented interface not assume any specific communications connections. This
between the details of the Kernel and the operator programs means that the system is dynamically configurable to allow
and canned cycles. The Machine class manages the com addition of other applications that use the interfaces of an
plexity of the system by handling the device responsibilities embodiment of the present invention. Applications store the
between the operator programs and the Kernel. The Machine addresses they receive from Directory Services in their own
class establishes and monitors the operator programs' con directories. Applications, such as the Kernel, that need
nections to the Kernel and handles messages between the 10 machine configuration parameters can retrieve those param
applications and Kernel. Each application has a copy of the eters from the shared memory where the Machine Configu
Machine class included in order to interface in a common
way to the Kernel. Shared data assures that all applications ration Library stores the information.
use the same Machine class state information. An operating system usable in connection with the present
Since the Machine class uses object-oriented design, it invention complies with IEEE-1003.1 POSIX (a standard
contains objects that define specific devices with possible 15 for application programming interface for UNIX) and the
functions for each device. For example, some possible IEEE-1003.4 POSIX standard that defines real-time exten
functions of the spindle object may be run, clamp, and stop. sions. This embodiment uses the Lynx operating system
The object's data describe the speed range and current (LynxOS), a real-time, UNIX-like, operating system that
speed. An operator program may not necessarily use all of runs on any 386 PC/AT or greater compatible computer.
a Machine class object's functions, but the functions are 20 LynxOS has these characteristics: (1) Compliant with
available and supported by the Kernel. POSIX 1003.1, POSIX 1003.4 real-time extensions and
Typically, a copy of the Machine class will be attached to POSIX 1003.4a threads interface; (2) Full UNIX compal
each operator application being used in order to provide a ibility (binary and source with System V, source with BSD
common interface to the Kernel. In addition, a customer may 4.3); and (3) Completely deterministic, including Multi
extend the functionality of the Machine class being used, as 25 tasking with user-defined priority levels, Multi-threadcd
long as the same Machine class is being used by all operator support for real-time ADA, Offers demand-paged virtual
programs. One embodiment of the Machine class contains memory, Runs off-the-shelf Interactive UNIX System V
the following objects: Push-button Console, Jog Pendant, software without recompilation, and Networking and com
Axis, Axis Group, Spindle, Tool Changer, Coolant and Lube. munication facilities including TCP/IP and NFS. The
The Kernel provides mechanisms for coordinating mul 30 LynxOS development tools including over 170 UNIX-com
tiple, servoed axes and to provide discrete I/O control. The patible utilities and the standard UNIX libraries may also be
CNC applications communicate with the Kernel compo used. The tool set used in one embodiment supports DOS
nents, the Logic Controller and the Motion Controller, I/O facilities, Debugger software, Re-entrant device drivers,
through the Machine class. These Kernel components decide Compilers for C, FORTRAN, Pascal, BASIC, and ADA,
how to implement the operator programs' commands for the 35 GNU Package (GCC, Emacs, GDB, C--E), X Window
hardware provided. System, Motif, Network File Sharing (NFS) and Transmis
The Motion Controller provides multi-axis coordination sion Control Protocol/Internet Protocol (TCP/IP).
as in most commercial CNCs. In its basic form, it controls The Device Drivers class forms the interface between the
five coordinated axes plus one spindle and two auxiliary operating system and the hardware devices such as I/O
axes. In addition it supports several types of interpolation 40 peripherals (e.g., serial communications ports), video dis
algorithms including linear, circular, elliptical, helical, and plays, and mass storage devices. The operating System calls
polynomial. Applications communicate with the Motion these drivers when a device is installed (at boot time or
Controller through the Machine class message interface. dynamically) and when application programs necd to access
The Logic Controller (LC) contains two programs: pro a device. The device drivers in the embodiment are capable
grammable ladder logic and the LC engine. The LC uses a 45 of handling multiple devices and respond rapidly to high
window-based programming environment either off-line or priority tasks. The present invention contains the following
at the Operator level to simplify production of a logic types of drivers: PC/AT keyboard and serial mouse, Analog
program to run on the LC. The LC also has software tools input/output card, SCSI device driver, Floppy disk devicc
to change, debug, and monitor the operation of the ladder driver, Ethernet interfaces, Internet message and transmis
logic. 50 sion control protocol, Internet protocol and protocol family,
The Platform Services class of the present invention Internet user datagram protocol, Pseudo terminal driver,
provides the structure that allows operator programs and Hard copy and video terminal interface, NFS client I/O and
third-party software to connect to the system and commu server drivers, CANbus, and MATRIX4
nicate with other software applications. There are four
services that control system connection and communication: 55 DETAILED DESCRIPTION
Initialization Sequence-a file, similar to a PC's autoex
ec.bat file, listing all operator programs in the order that Overview-Hardware
they will start during start up;
Directory Services-a registry of all active programs, FIG. 1 is a schematic diagram of a typical CNC machinc
60 on which the control system of the present invention may
Machine Configuration Library-a shared memory area operate. A standard PC-compatible ISA bus 10 is connectcd
to store default machine parameters for application to CPU processing unit 11 and its associated motherboard,
configuration. This is similar to the win.ini file in the preferably an Intel 80486 class microprocessor. The bus may
Microsoft Windows system; and also access RAM memory 12, which may alternativcly be
Exception Reporter-collects, organizes, stores and dis 65 connected directly to the motherboard, ISA bus 10 may
tributes all errors of interest to the active applications optionally provide an interface to network 13. Mass storage
Directory Services contains a "phone book” that lists all device 14, which may include both hard and floppy disk
5,453,933
13 14
drives is also connected to ISA bus 10, as are standard Interpreter (PPI) or user interface. This type of software is
communications ports 20, motion control board 18 (prefer generally well-known in the art, and except for the way it
ably a DSPCG, Inc. (Minneapolis, MN) Matrix 4 / Vector 4 communicates the information it obtains to the remaining
combination mounted on a VME bus), and video interface software components, does form a part of the invention per
15. se. The PPI may either interrogate the operator to input steps
In one embodiment, the CNC machine specific hardware to machine a workpiece, or may prompt the user to specify
of the system are interconnected via a CANbus bus system. a data file having a digitally stored part manufacturing
Accordingly, CANbus interface card 16 is also positioned in description. Regardless, once information about the part is
ISA bus 10. CANbus cable 17 connects other CNC machine obtained, the PPI dynamically creates appropriate objects in
hardware components and provides communication therebe 10 the Process class as further described below.
tween, CNC machine operator console 19, jog pendant 21, The control system of the present invention uses object
and servo motors 25, 26. In general, motion control board oriented design and programming object-oriented design
18, or CANbus interface 16 and CANbus cable 17, provide
means for transmitting command signals to a movable tool, means that software components are created from data and
such as servo motors 22–26 and/or the axes or tool fixtures 15
functions and are organized into objects. Software compo
connected thereto. Servo motors 22-24 control movable nents communicate through messages sent between objects.
tools for shaping a workpiece, such as X, Y and Z axes of Objects have two parts: data and methods. Objects are
the machine tool, respectively, while servo motor 25 may abstract representations of the basic things a system handles
control the spindle which rotates a cutting tool. Servo motor (e.g., a spindle, tool changer, or type of motion). An object's
26 may control an tool changer which holds a plurality of attributes describe the object, but not how it works. The
workpiece shaping tools, such as milling bits or may control 20 object's methods, are instructions, programs, procedures, or
a rotary table. actions that describe what the object will do when something
The system uses industry standard cards including the happens. So a spindle object's methods may be initialize,
new CANbus distributed I/O card. This bus allows a user to run, orient, speed override, and stop. The object's data
attach nodes to the system rather than insert cards into the describe the speed range and current speed.
25
cabinet. The high availability of the cards keep prices low Using object-oriented programming, objects can be
and reliability high. Standard board sizes and mounting quickly created using a class, the blueprint for the objects.
holes keep the system open to changes and upgrades. The class establishes the basic variables that are common to
Keyboards, trackballs, and jog pendants are connected as all of its objects, and the new objects inherit these common
CANbus nodes to the system. The keyboard may be located 30
characteristics from the parent class. This feature allows the
away from the main platform without decreasing the quality software engineer to build on existing design and code by
of the signal. However, to comply with safety standards, the creating more specific objects from the easily reused code in
emergency stop button and the power on/off switch are the general class. For example, a software engineer can use
wired directly. a general class of characteristics for a "device' to create a
The control system of the present invention System offers 35
model of a more specific device such as a spindle.
two back plane buses: ISA and VME. Both meet LynxOS A method belongs to an object and indicates how to
and POSIX standards and communicate with the control perform an action or how to react when an action is
system software. Using CANbus and MATRIX4 with either performed on the object. The system may only access data
bus permits real-time path correction based on auxiliary through the methods, if at all. Methods, therefore, hide an
sensors such as vision, secondary axis, and temperature 40 object's data and send messages to perform operations. This
SelSOS. isolates dependency on a particular data structure thus
The system's I/O backbone is the CANbus, a multi permitting new features to be added without changing the
master serial bus. CANbus can be structured to form many arrangement of the original objects. This structure protects
different architectures because it has different types of PC the data from the damage that commonly occurs during
configurations and the CANcore module to standardize the 45 changes in monolithic, proprietary systems.
interface to I/O peripherals. CANcore acts as a CANbus As with data characteristics, methods can also be inher
node allowing the customer to connect peripheral I/O ited from the parent class when a new class or object is
through the industry standard SPI (Serial Peripheral Inter created. Of course, the new class or object may use the
face) Bus. method or create a different version of it. Different objects
The system uses the MATRIX4 to decrease system inte 50 can use identical methods. Therefore, a software engineer
gration costs, increase motor control system performance, writes the code for the method only once and then reuses it
and create component sourcing options for the customer. after that. The reusability of existing object-oriented code
This controller is a fully digital, 4-axis position controller makes development and modification faster because there is
available on both the ISA and VME host platforms. The less to write and maintain. An additional benefit of using
flexibility of the controller design allows a user to adapt the 55 object-oriented methods is the localization of change. Data
controller to any motor design on the market. The controller hiding isolates code from other code and reusing methods
is capable of interfacing to DC brush, DC brushless, and AC removes the need for switch statements and other references
induction motors and allows most parameters to be pro throughout the code to the system's condition or processing
grammed dynamically. This allows immediate updates when state. This limits the ripple effect of changes and makes it
there are changes in the environment or operating condi 60 easier to maintain large, complex programs.
tions. The control system of the present invention software
Overview-Object Oriented Systems contains class libraries, of machining software. These librar
ies contain machining procedures and functions that can be
An overview of the broad categories of the software called with an expected result. These libraries are grouped
components of the CNC machine control system of the 65 into object-oriented classes that may be used as is and/or
invention is shown in FIG. 2. In the Operator class are extended. The core libraries contain the most basic charac
software programs generally classified as the Part Program teristics needed for primitive operations.
5,453,933
15 16
The software employs a bi-directional messaging inter Controller (LC) engine executes ladder logic/GRAFCET
face to facilitate communication between components. Mes programs to control the machine at the lowest level. There
sages are passed between the CNC applications (PPI and are two programs the LC engine executes: the user program
Process Class) and Kernel. Communication from the appli and the system program. The LC also has tools to change,
cations to the Kernel differs from communication between debug, and monitor the operation of the ladder logic.
the applications in that Kernel communication is more
precisely defined for the Kernel. Each component commu Operating System
nicates through messages. These messages may have differ
ent requirements. Messages are managed for efficient com The real-time, UNIX, execution environment provides all
munication. Unordered, independent messages are executed 10 of the standard advantages of a real-time environment with
immediately. Ordered, dependent messages are queued. A its diagnostics and response capabilities. In addition, X
queue message is not executed until the previous message is Window is a standard, graphical, user interface. X Window
complete, and each component maintains a separate mes permits a variety of input devices (e.g., mice, keyboards,
Sage queue. graphic displays) to be simultaneously shared by several
A key feature of the CNC control system of the present 15 programs. This flexibility allows developers to leverage
invention is the ease with which existing systems can be their areas of expertise without being concerned about the
brought onto the new platform. The obvious advantage of basic system graphics. This window-display interface also
this feature is that it preserves features of existing systems allows the user to run one machine and display its output on
while providing a migration path to future technologies. another, an definite advantage for a CNC application. Motif
There are two ways a user may take to move existing 20 manages the windows created by X Window. This manager
software to the control sytem of the present invention: (1) allows the user to control the size, location of windows on
porting "C' systems for immediate use, or (2) conversion of the screen, and identification of the active window. This
procedural code to C or C-H-. software also provides a library of X Window items to use
in system development. TCP/IP is a network protocol that
Machine Class 25 runs on Ethernet. It allows X Window to perform network
transparent activities such as remote procedure calls. Its file
The Machine Class is an object-oriented interface to the sharing capabilities means that programmers do not need to
Kernel and Process Class. This class contains the machine's download files.
device-specific application procedures to hide the complex
ity of the Kernel and the message interface from the CNC 30 Platform Services
applications. This is accomplished through the interface The Platform Services Class provides these functions:
between the Machine Class and the CNC applications (Pro Initialization Sequence-a file listing all applications in
cess Class/PPI). Applications call standard functions to the the order that they will start during power up;
Machine Class objects which sends a message to the Kernel.
The Machine Class objects handle all communication 35 Directory Services-a registry of all active applications
between the Process Class objects and the Kernel including Machine Configuration Library-a shared memory arca
the creation of the communications port, use of appropriate holding default machine parameters;
communication functions, and passing messages back to the Exception Reporter-collects, organizes, stores and dis
CNC applications. The specific Machine Class responsibili tributes all errors of interest to the active applications
ties are allocation of resources and connection to the Kernel, 40 Applications register with Directory Services and receive
message handling between the Kernel and the CNC appli addresses of the other applications with which they need to
cations, and device state monitoring and management. communicate. Applications store the addresses thcy receive
When the system starts up, the Machine Class allocates from Directory Services in their own directories. Applica
the resources that the application needs and creates a port to tions, such as the Kernel, that need machine configuration
the Kernel from each CNC application. After the port is 45 parameters can retrieve those parameters from the shared
created, the Machine Class logs in to the port creating a memory where the Machine Configuration Library stores the
two-way connection between the Kernel and each running information.
application. This allows messages to be sent back and forth Messages between the applications use POSIX message
from the applications to the Kernel. Multiple copies of the queues. These queues, are created at run time and have
Machine Class may be used in the system. In fact, it is 50 unique names. Each application receives messages through
customary to attach a copy of the Machine Class to each one instrument, but as when using telephones, each appli
CNC application being used. cation can communicate with many different applications.
The Initialization Sequence is the init script file listing all
Kernel applications in the order that they will start during power up.
55 It is executed after the operating system boots. The Initial
The Kernel Class is the mechanism through which CNC ization Sequence's primary responsibilities are to:
applications control machinery. The Kernel provides mecha Load various CNC system drivers (CANbus, MATRIX4,
nisms for controlling discrete I/O and coordinating motion and the serial port driver)
axes. This general controller can be used in a variety of Start Directory Services, the Exception Reporter, the
machining applications. The Kernel contains two compo 60
nents: Logic Controller and Motion Controller. The Motion Kernel, and the user display
Controller performs multi-axis coordination. In its basic Create the Machine Configuration Library
form, it controls five coordinated axes plus one spindle and Start listed applications
two auxiliary axes. In addition it supports several types of A user may create and change this script. It should begin
interpolation algorithms including linear, circular, elliptical, 65 with the device drivers, Platform Services, and the X Win
helical, and polynomial. Applications communicate with the dow System. Other applications in the script may be thc
Motion Controller through a message interface. The Logic CNC applications and the motion subsystem and Logic
5,453,933
17 18
Controller within the Kernel. To create or change the script, Platform Services Schema
the customer may use an editor (Vi) or the interactive setup The schema defines the data structure qualifiers for all
program. The script can also be created automatically with messages and global data used by Platform Services. Plat
the software installation program. The following is a repre 5 form Services' messages use the following qualifiers:
sentative initialization sequence script.
. String. PhoneListing
f . Description . Value
# Dynamically installed device drivers 10 FieldPir - FieldCount
f . DataType ErrorCode
dynaminst Devices/MATRIX4 instab
gainst /Devices/CANbusinstab The following qualifier descriptions contain definitions in
# System Services the form of text and in "C' code and the definitions of the
ifbin/DirectoryServices "C" code data names.
sleep 5
/bin/ExceptionReporter String
i
# Kernel String is a structure describing a collection of ASCII
Abin/Kernel & 20
characters. The "C" data structure follows:
# User Applications
i
|Apps/bin/Manual & pede? Struct
25 int length;
char characters;
} String;
Update
UnStep
Establishes a specific operational parameter for a device.
Update Description<name>Oualifier Engages the predefined operation of a specific device in a
15 reverse direction.
Update<Override>
Update<Gear>
Update{Feedrate> <values Machine Class Objects
Enable 20 The Machine Class's objects are representations within
the system of the devices on a machine and the functions
Enables special operation of a specific device. necessary to manage those devices (e.g., flow control, tool
Enable<Powere changer, axis, and spindle). All Machine Class objects have
two parts: data and methods.
Disable 25 The object's methods, are instructions, functions, proce
Disables special operation of a specific device. dures, or actions that describe what the object does in
DisableCPowere
response to an event. A method belongs to an object and
indicates how to perform an action or how to react to an
external event. An application may only access an object's
Clamp 30 data through its methods, if at all. Methods send messages
Engages the clamp on an axis or spindle. to perform operations. The Machine Class objects with their
methods are described in the following sections.
UnClamp
35
Disengages the clamp on an axis or spindle. Flow Control Object
Calibrate In an alternate embodiment of the invention, the control
system's Milling Machine Class's Flow Control object
Establishes a reference point for a specific device. controls the communication between a CNC application and
40 the Kernel's synchronous queue. This object allows a CNC
Run application to set up a communications port to the Kernel
and monitor the current state of the Kernel for the applica
Begins continuous operation of a specific device. tion. An application must get ownership of the Flow Control
object to gain control of the Kernel’s synchronous queue.
Cycle 45 The following methods are included in this object:
Marks the starting position of a sequential operation of a Grab-requests ownership of the Kernel’s synchronous
specific device. queue.
Cycle Description<cycleID> UnGrab-releases ownership of the Kernel's synchro
50
nous queue.
Move Initialize-establishes default parameters necessary to
operate the Kernel's synchronous queue.
Engages coordinated operation of a specific device GetzState>-gets the current active state of the Kernel's
Move Linear synchronous queue.
Move Velocity 55 Enable<Powerd-enables power for the Kernel's syn
Move<increment> chronous queue.
DisableCPower>-disables power for the Kernel's syn
Dwell chronous queue.
Begins null operation of a specific device for a specified 60
Run-directs the Kernel to process synchronous requests
time.
continuously.
Dwell FloatingPoint(times Stop-directs the Kernel to stop processing requests from
the synchronous queue.
Stop Cancel-directs the Kernel to stop all activity immedi
65 ately and flush the queue.
Ceases operation of a specific device in a manner that Step-directs the Kernel to process a single request in the
makes recovery possible. synchronous queue.
5,453,933
39 40
Push-button Console Object Axis Group Object
The Milling Machine Class's Push-button Console object The Machine Class's Axis Group object describes a
allows an application to initialize and reserve all necessary user-defined group of axes. The axis group handles multiple
buttons and lights on the console. In this way, the operator 5 axis motion for coordinated moves such as lincar and
can press buttons to control power, start a cycle, hold the circular and time-coordinated joint moves (point-to-point).
motion of the machine, and interrupt an operation while an The object defines the axes kinematics, handles ownership,
application monitors these actions. When an operator and includes these methods:
presses a button, a message is sent to the application Initialize-establishes default parameters necessary to
controlling that button. If the buttons are not enabled by an 10 operate the axis group.
application, they are ignored by the Logic Controller. Grab-requests ownership of the axis group.
The following methods are included in this object: UnGrab-releases ownership of the axis group.
Initialize-establishes default parameters necessary to Get-States-gets the current active state of the axis
operate the push-button console. group.
Grab-requests ownership of the push-button console. 15
Get-ParameterInfoD-returns current parameters.
UnGrab-releases ownership of the push-button console. Move<Linear>-engages coordinated operation of the
Get-requests specified information from system compo axis group as defined by the point vector, feedrale,
netS. attribute, and termination type.
Enable-enables remote operation on the push-button Move <Joint>-engages coordinated operation of the axis
console. group using point-to-point time coordination.
Disable-disables remote operation of the push-button Dwell-pauses in motion defined by time in tenths of
console. seconds.
Update-establishes a specific operational parameter for Update<Group>-(axes) identifies which axes belong to
the push-button console. 25
this group.
UpdateCOverride>-indicates the feedrate override fac
tO.
Jog Pendant Object UpdategFeedrate)-(value) indicates the speed applicd
The Milling Machine Class's Jog Pendant object allows 30 to a given Axis Group.
an application to initialize and reserve all necessary buttons Update<OffsetsD-indicates the offset used for Part Zero
and lights on the jog pendant. When an operator presses a and other general offsets.
button, the Kernel can generate a Move message immedi The Axis Group object has these additional methods:
ately after receiving an Enable message from an application. Enable<Power>-enables power to the axis group
If the buttons are not enabled by an application, they are 35
Disable-Power>-disables power to the axis group.
ignored by the Kernel.
The following methods are included in this object: Stop-stops the specified axes.
Initialize-establishes default parameters necessary to
operate the jog pendant. Spindle Object
40
Grab-requests ownership of the jog pendant. The Spindle object describes all possible functions of a
UnGrab-releases ownership of the jog pendant. machine tool spindle. This object grabs ownership of the
Get-requests specified information from system compo spindle axis and sends messages to the Logic Controller to
netS. initialize, enable, and handle the spindle's orientation angle,
Enable-enables remote operation on the jog pendant. 45 the maximum RPMs, and all other necessary operations.
Disable-disables remote operation of the jog pendant. This Machine Class object contains the following methods:
Initialize-establishes default parameters necessary to
operate the spindle.
Axis Object Uninitialize-forces a re-initialization of the spindle.
50 Grab-requests ownership of the spindle.
The Milling Machine Class's Axis object allows an appli UnGrab-releases ownership of the spindle.
cation to control an individual axis or joint. The following
methods are included in this object: GetzState>-gets the current active state of the spindle.
Initialize-establishes default parameters necessary to GetzParameterinford-gets current information param
operate an axis. 55 eters for the spindle.
Grab-requests ownership of an axis. Run-begins continuous operation of the spindle in the
UnGrab-releases ownership of an axis. specified direction and at the RPM of the movc.
GetzState> gets the current active state of an axis. Update<Override>-overrides the speed by a specified
factor.
GetzParameterInfoD-returns current parameters. 60
Update-Gear> initiates a remote change of the spin
Clamp-engages the clamp on an axis. dle's gear speeds.
UnClamp-releases the clamp on an axis. Clamp-holds the tool in the spindle.
Calibrate-establishes a reference point for an axis. Unclamp-releases a tool from the spindlc.
Move<Velocity>-moves the axis at a specified velocity. 65 The Spindle object has these additional methods:
Move<Increment>-moves the axis a specified distance. Enable-enables remote operation of the spindle's
Stop-halts axis motion. manual push-button.
5,453,933
41 42 w
Disable-disables remote operation of the spindle's Kernel-Machine Class Communication Example
manual push-button.
Stop-stops motion of the spindle. The following communication example demonstrates data
moving through the Machine Class to the Kernel compo
Tool Changer Object 5 nents. In this example, the CNC application is operating a
spindle using the following steps:
The highly detailed Tool Changer object describes all 1. Application grabs ownership of the Spindle. It receives
possible functions of a tool changer. This object has access an “OK” or a “Reserved” response.
to the data indicating the number of tools in the changer, the 2. Application requests SpindleRun.
current tool in the spindle, and the carousel position. The 10 3. Machine Class sends these requests to the Motion
tool changer grabs ownership of the required resources such Controller:
as the spindle and axes. The tool changer uses the storage Update <Gear> (directs Logic Controller to activate
slot number rather than the tool number for positioning. The sequence)
tool number and related data are included in the Tool Wait until LCflag (directs MC to wait for the LC flag)
database. This object contains the following methods: 15 Move Velocity <rpm.> (directs MC to apply voltage to
Initialize-establishes default parameters necessary to the spindle axis)
operate the tool changer. Update <Flag> SpindleAtSpeed (directs LC to report
Unlnitialize-forces a re-initialization of the tool changer. when up to speed)
Grab-requests ownership of the tool changer. Wait until LCflag (directs MC to wait for LC flag
UnGrab-releases ownership of the tool changer.
20 before continuing)
4. The Motion Controller returns "OK' or "Conflict'
GetzStates-gets the current active state of the tool responses.
changer.
Get-Parameterinfo> gets current information param 5. The Motion Controller sends a SpindieGear request to
eters for the tool changer. 25 Logic Controller and waits for LCTIag.
Update<Toold-sets the storage slot number for a tool in 6. LC executes spindle enable and gear change logic:
the spindle. spindleCrient=Off
spindleEnable=On
Enable-enables remote operation on the tool changer. spindleCon=On
Disable-disables remote operation of the tool changer. 30 select gear speed based on RPM
Calibrate-sets the indexer position. 7. LC sends request to MC to creep spindle axis.
This tool changer object also contains these methods: 8. MC sends "atCreep” message to L.C.
Cycle-marks the starting position of a sequential opera 9. C selects gear. If an error occurs an error message is
tion of the tool changer. sent to the Exception reporter and the Machine Class
Stop-halts tool changer motion. 35
flushes the queue.
Step-moves the tool changer one logical step at a time. 10. LC sets LCflag to satisfy first MCWait (indicates that
it is OK to start axis).
Coolant Object 11. MC begins spinning the Spindle axis based on Move
The Coolant object describes all possible functions of the 40 parameters. If an error occurs, send an error message to
coolant mechanism. This coolant object contains the follow Exception Reporter, and the Machine Class flushes
ing methods: queue.
Grab-requests ownership of the coolant device. 12. MC gives SpindleAtSpeed request to LC,
UnGrab-releases ownership of the coolant device. 13. LC waits for SpindleAtSpeed input or time-out. If an
GetzState>-gets the current active state of the coolant
45 error occurs, send error message to Exception Reporter,
device. and the Machine Class flushes queue.
Stop-indicates when to stop the coolant. 14. LC sets LCflag to satisfy second MC Wait (indicates
sequence is complete).
Run-begins continuous application of coolant and iden 15. LC sends Completion response to Application (if
tify the type of coolant (mist, flood, or both). 50
requested by Application).
Enable-enables automatic clearance plane detection and 16. Machine Class sets DalState=SpindleRunning (if
automatic shut-off.
requested by Application).
Disable-disables automatic clearance plane detection
and automatic shut-off. Customizing a Machine Class
55
Lube Object The open systems design of the control system of the
present invention permits modification of the Machine Class
The Lube object describes all possible functions of the to handle machines that have not been used by the control
lubrication mechanism. This lube object contains the fol manufacturer. This is possible because the devices are
lowing methods: 60 independently defined from the relationships between the
Grab-requests ownership of the lubrication device. devices. The Kernel's Logic Controller and the applications
handle the actual device interdependencies during operation.
UnGrab-releases ownership of the lubrication device. A system user may add features to a device definition
GetzState-gets the current active state of lubrication and/or modify the characteristics of the device without being
device. 65 forced to change other devices. This allows the customer to
Stop-indicates when to stop the lubrication. develop an implementation of the system customized for a
Run-begins continuous application of lubrication. specific machine.
5,453,933
43 44
The Machine Class's object-oriented design allows soft Message Structure
ware engineers customizing the Machine Class to quickly
create new Machine Class objects by inheriting from exist The messages of the control system of the present inven
ing Machine Class objects and then modifying them. tion have a standard grammar using command verbs with
Because of the advanced programming features of C++, a 5 possible qualifiers and variable attributes. There are threc
software engineer need not alter the source code of the types of qualifters:
control system for the objects in order to modify them. The Structure-defines a type of variables.
new objects then inherit the common data characteristics Enumeration-a list of integer values allowing associa
from the parent objects. This feature allows software engi tion of constant values with qualifier names.
neers to build on existing design and code by creating more 10 Union-a variable that may hold (at different times)
specific objects from the easily reused code in the existing objects of different types and sizes. It is used to
Machine Class objects. manipulate different kinds of data in a single storage
As with data characteristics, methods can also be inher area without embedding any machine-dependent infor
ited from the parent object when a new object is created. Of mation in the program.
course, the new object may use the method or create a 15 in the list of messages presented below, required data
different version of it. Methods send messages to perform elements begin with a capital letter, and optional elements
operations. This isolates dependency on a particular data use no capitals. Messages used by the Kernel have this basic
structure thus permitting new features to be added without Structure:
changing the arrangement of the original objects. Verb Qualifters
20
A verb describes the message request. Qualifters are data
structure names followed by the data structure elements.
Kerne These qualifters can be composed of other qualifters (i.c.,
The Kernel of the control system provides mechanisms dynamic data structures). Verbs act on the qualifiers.
for coordinating motion axes with discrete input/output (I/O) 25
The verbs used by the Kernel components are
control. This general controller can be used in a variety of Run is used to control the execution of the synchronous
machining applications. The CNC applications communi buffer (MC and LC),
cate with the Kernel components, the Logic Controller (LC) StopRun--is used to control the execution of the syn
and the Motion Controller (MC), through the Machine chronous buffer (MC and LC).
Class. 30 Move-directs the Motion Controller to move along a
Since the control system's software uses object-oriented linear path or move at fixed velocity.
design and programming techniques, the software compo Wait-tells the MC or the LC to not execute any messages
nents are created from data and functions organized into after the Wait message until a StopWaiting message is
objects. The Logic Controller and Motion Controller com Sent.
ponents communicate with each other and with the CNC 35
StopWait-tells the MC or the LC to begin executing
applications through special objects called messages. These messages again.
messages use a common message structure, and both have a Get-tells the MC or LC to send information to an
common message interface. Each component has an asyn application.
chronous queue and a synchronous queue. These queues
function in the same manner in both controllers. 40 Update-tells the MC or LC that an application wants to
Messages may be synchronous or asynchronous depend change the value of a parameter.
ing on the requirements of the application. The synchronous Flush-tells the Motion Controller to delete all of the
messages are ordered and, therefore, dependent on the messages in its synchronous queue.
execution of previous messages in the queue. The asynchro 45
nous messages are independent of previous messages so that
they can be executed immediately. Kernel Qualifters
The Kernel's schema describing the message qualifiers is
shown on this and following pages. The quali?ters define the
Kernel Message 50
data structures for all messages and global data used by
Kernel.
The system messages provide two-way communication
between the applications and the Kernel components. These
messages have the following capabilities: String
Single commands
Initialization parameters and configuration sent through 55 String is a structure describing a collection of ASCII
characters. The 'C' data structure follows:
the messages
Synchronous messages are queued
Asynchronous messages are executed immediately typedef struct
There are different categories of messages: 60 {
Flow control int length;
char charact.crs,
Parameters } String;
Diagnostics
Requests 65 length-is the number of characters in the string.
Data characters-is an array of letters, numbers, and/or sym
Error bols.
5,453,933
45 46
Name y-position for the Y axis. Range: Yi-Y (units:
Name is a structure that identifies the subject of the meters)
message with a descriptive term. The "C" data structure Z-position for the Z axis. Range: Z-Zmay (units:
follows: meters)
typedef String Name
XYZAB
Description XYZAB is a structure describing a position for the X and
Description is a structure used to define the basic char 10 Y and Z and A and B axes. Linear position is expressed in
acteristics of the subject of the message. The 'C' data meters. Rotary position is expressed in radians. The "C" data
structure follows: structure follows:
typedef String Description
Value 5 typedef struct
{
double x,
Value is a union representing a variable data type. double y;
DataType defines the data's size and type. The "C" data double a,
structure follows: double b,
20 } XYZAB;
XYZ is a structure describing a position for the X and Y 55 Position is a structure describing a position. The "C" data
and Z axes. The "C" data structure follows: structure follows:
Enable-turn on
ibute. w-
DS turn O Rt position-indicates the endpoint of the linear move.
1Sable-turn O attribute. data-attribute modifying the motion description.
35
TerminationType VelocityType
TerminationType is an enumeration
Ys describing the ending VelocityType is an enumeration of velocity represcinta
condition of a move. The 'C' data structure follows: tions. The 'C' data structure follows:
40
Building.../mnt/mydirectoryisharedfilename SVloadConfig
Size........ (4096) 45
Shmid...fmnt/mydirectorylsharedfilename) created. Next the engineer may load default values into the shared
kTerms)
kTerms Y
memory using the SVloadConfig utility. This utility uses an
kTerms2. ASCII file describing the values assigned to each field. The
kTermsS format of the file follows:
iTermsX
Terms Y 50
iTermsz.
TermsS # These are the default values used for SharedVariable example
wTermsX programs.
wTerms.Y # FieldName Index Wallic
wTerms.Z.
wTermsS 55 kTermsX O 7000
i limit kTermsX 1 30000
max accel kTerms) 2 12000
pwm freq kTermsX 3 19400
lines i
poles kTerms Y O O
hall 60 kTerris Y 20000
deadband kTernsY 2 5000
loopTypc kTermsY 3 7000
motorParam f
field kTerms Z. O 2000
OtOI kTerms.Z. 18000
TraveLimits kTermsz. 2 3000
65 kTerms2. 3 5350
Units
Bytes Used...... 1543
5,453,933
65 66
Table of Contents
-continued Data Storage
kTermsS O TOOO The header is divided into three fields:
kTermsS 1 30000 Number of fields defined in the shared area (first 4
kTermsS 2 12000 bytes)
kTermsS 3 19400 Offset into the shared area (used when allocating space
t
iTermsX O O for new fields)
iTermsX 15000 An integer storing the semaphore handle (used to
iTermsX 2 4000 synchronize access to the data area only)
iTermsX 3 O 10 The header structure is as follows:
i
Terms Y O O
iTerms Y l 28000
iTerms Y 2 15000
Terms Y 3 O typedef header {
i int number of fields;
Units O Metric 15 long offset into datastorage;
int semaphore;
header,
In the SVloadConfigutility, lines beginning with aii sign are
interpreted as a comment. The first column specifies the field The second four bytes of the header contain a long integer
name while the second column is the index. The fields or 20 (also four bytes) of the offset into the shared area. This value
indexes do not have to be defined in any specific order. The is used when allocating space for new fields in the shared
third column is the value. If a field cannot be found or a area. In this scheme the table of contents (the field descrip
value is invalid, an error message is printed. tions) grow downward while the data storage area grows
SVistData
upward. Finally, the header information contains an integer
25 storing the semaphore handle used to synchronize access to
The engineer may list all the data values that are currently the data area only. This means the semaphore is not used
stored in the shared area using the SVlistData utility. This when getting information about the fields, but only for
utility outputs a file that can be read using the SVloadConfig reading and writing into the data area.
utility. The value for each field by index is printed. Note: The byte sizes described in this document for
30 integer and double reflect those of a 386 and 486 architec
SVSave tre,
The second section of the shared area is the table of
After modifying the data stored in the shared area, an contents. This area contains a series of field descriptions
engineer may want to save the information to disk. This can each can be described using this data structure:
be done using the SVsave utility. Below is an example using 35
this utility.
#define (FIELD NAME LENGTH 3.1
typedef struct field description
NAME......(fmnt/mydirectorylshared filename) {
SIZE.......... (4096) 40 char fieldname FIELD NAME LENGTH;
Save Completed char type,
unsigned int count;
unsigned int size;
The save utility saves the shared area under the filename unsigned int offset;
specified in the configuration file with a .sav extension. field description;
SWrestore 45
The first 31 bytes of each field description contains the field
To restore a previously saved file, use the SWrestore name. This is the same name that is used in the configuration
utility. Below is an example using this utility: file. At this time an upward limit of 31 characters (including
Null terminator) is allowed. The next byte in the description
50 indicates the field data type. The six field data types are
NAME....../mnt/mydirectorylshared filename) represented by these letters:
SIZE.......... (4096) B-byte
Restore Completed I-integer
D-double
55
SVshmdump S-string
There is another utility, SVshmdump, that may be of H-short integer
interest for debugging the shared area at a very low level. L-long integer
This program dumps the shared area in hex bytes and is The next four bytes describe an integer representing the
number of elements to be stored under this name. This can
useful when the engineer wants to inspect the shared area. be considered an index into an array beginning with the
Shared Memory Organization index Zero for the first element. An integer representing the
size of each element is stored after the count. Doubles use
The SystemVariables area can be described as a contigu eight bytes and integers four, with user defined the string
ous area of shared memory. This memory is divided into 65 sizes. The final four bytes of the field description contains
three sections: the offset from the beginning of the shared area into the data
Shared Memory Storage Header storage area where the stored values are kept for the field.
5,453,933
67 68
Writing a Program SystemVariables Methods
An engineer wishing to write a program to access the The Machine Configuration Library uses an object, such
shared memory area may want to examine the following as a C-H object, SystemVariables, to read and writic data in
example. This program simply creates a SystemVariables
object, passing the configuration filename to the object. the globally accessible shared memory area. The System
Calls are made to the SystemVariables object for getting the Variables methods are defined below and the possible return
size, mapping the fields to field objects, getting and updating values are listed for each method.
data, and other necessary actions.
include <stream.h>
include "SystemVariables.hpp”
main (int argc, char *argvl)
int error,
doubledoublevalue;
if (argc < 2)
{
cout << form (“Usage: %s configuration-filename n', argv[0]);exit (-
1);
}
f* Instantiate a SystemVariables object, specifying the configuration file
name to be used if
SystemVariables systemVariables(argv[1), error);
f* Check the error code returned from the constructor calli
if (error)
perror ("SystemVariables Constructor');
exit (-1);
f* The Size method call is one of many calls that will return information
about the shared area *.
if (systemVariables.Size() = 0)
{
perror ("Invalid size”);
exit (-1); -
fk
Here is a simple call to get the value stored in the 0th index of the field
called "max accel'.
*/
error = systemVariables.Get("max accel", doublevalue, 0);
cout << form ("max accel value %f n'doubleValue);
fk
Finally, close the connection to the owed data area.
+/
if ((error = systemVariables. Close()))
{
perror ("Cannot close shared area");
}
Basept
CFLAGS=-X-Fusilocal/include Close
OBJE/
EXE=1 This class method closes a connection to the shared arca.
LIB-fusr/local/lib/
OFILES-c S(OBJ)example.o The function prototype for this method is
S(EXE)example: S(OFILES) int Close ( )
g-H--X S(OBJ)example.o S(LIB)libSV.a-o S(EXE)example Return Values:
S(OBJ)example.o: example.cc
g++ -c S(CFLAGS) example.cc -o S(OBJ)example.o 0-Success
-1-Error. Check"Errno' for a description of the error.
65 An error may occur during an unmap call of thc shared
The SystemVariables methods are described in the following area or a close call to the shared arca file. Errno is Sct whicn
section. these errors occur.
5,453,933
69 70
Description Get
This class method returns a character string describing the This method retrieves the value stored for a given field by
field. The string contains the field name, type, count and size C.
(in case of string types). The calling program must perform int Get (char *fieldName, int &data, int index)
a delete on the returned description. The application may use int Get (char *fieldName, char *data, int index)
the Field or GetField method calls to obtain the Field
parameter used in this call. The function prototype for this int Get (char *fieldName, double &data, int index)
method is The index parameter is optional. If it is not used, the 0th
int. Description (svField &field, char *description) See index is searched. Care must be taken when getting
10 string values. The engineer must make sure the
Also: GetField, Field character pointer that is passed into this method has
allocated enough space to store the character String.
Field A good way to do this is to use the FieldSize method
to get the size of the character string. Then allocate
This method finds the Field for the field specified by 15 the space before calling this method.
fieldName. The function prototype for this method is Return Values:
int Field (char *fieldName, SvField &field) 0-Success,
Return Values: -1-Invalid field type.
0-Success -2-Field not found.
20 -3-Shared Area Not Initialized.
-2-Cannot find field.
-3-Shared Area Not Initialized. See Also: Get, -4-Invalid Index.
Update. The Get method also retrieves the value stored for a given
field as specified by the sffield reference.
25
int Get (sffield &field, int &data, int index)
FieldCount int Get (sffield &field, char *data, int index)
This method gets the number of elements for the field int Get (sffield &field, double &data, int index)
specified by fieldName. The count is returned in the param The Field pointer is found using the Field or GetField
eter count. The function prototype for this method is methods.
int FieldCount (char *fieldName, int &count) The engineer must make sure the character pointer that
Return Values: is passed into this method has allocated enough
0-Success space to store the character string. A good way to do
-2-Cannot find field. this is to use the FieldSize method to get the size of
-3-Shared Area Not Initialized. the character string. Then allocate the space before
35 calling this method.
Return Values:
FieldSize 0-Success,
-1-Invalid field type.
This method gets the size of the field specified by field -3-Shared Area Not Initialized.
Name. The size is returned in the parameter size. The 40 -4-Invalid Index See Also: Field, GetField, FieldSize.
function prototype for this method is
int FieldSize (char *fieldName, int &size) GetField
Return Values: This method call is used to traverse the list of fields in the
0-Success shared area. By using a zero in the parameter data you will
-2-Cannot find field. 45 begin at the top of the list. After each call the data parameter
-3-Shared Area. Not Initialized. will be incremented. The list can be traversed by calling this
method successively until a return value of -1 is return. The
FieldType function prototype for this method is
int GetField (svPield &field, int &data)
This method gets the data type for the field specified by SO Return Values:
fieldName. The type returned in the parameter type is I for 0-Success
integer, D for double, S for string, B for byte, H for short -1-End of list.
integer, and L for long integer. The function prototype for -3-Shared Area Not Initialized. See Also: Get,
this method is Update.
55
int FieldType (char *fieldName, char type) Name
Return Values:
0-Success This class method returns the shared area name specified
-2-Cannot find field. in the configuration file. The function prototype for this
-3-Shared Area. Not Initialized. method is
60
char *Name ( )
FileName NumberOfHields
This class method returns the configuration filename used This class method returns the number of fields defined for
to define the shared data area. The function prototype for this 65 the SystemVariables. The function prototype for this method
method is is
char *FileName() int NumberOfFields( )
5,453,933
73 74
this eliminates the search for the individual field. In addition,
this provides information about individual fields by making -continued
calls to the SVfield class methods. This section describes the RESERVED 20 = 0x0020,
SVfield class method calls. RESERVED 40 = 0x0040,
RESERVED 80 = 0x0080,
Name USER DEFINED Ol = 0x0100,
USER DEFINED 02 = 0x0200,
This class method returns the name of the Field. Field USER DEFINED 04 = 0x0400,
names are currently limited to 31 characters including the USER DEFINED 08 = 0x0800,
USER DEFINED 10 = 0x1000,
Null terminator. The function prototype for this method is 10 USER DEFINED 20 = 0x2000,
char *Name ( ) USER DEFINED 40 = 0x4000,
USER DEFINED 80 = 0x8000,
Type ALL CATEGORIES = 0xFFFF.
ExceptionCategoryValues;
typedef enum ErrorCodes
This class method returns the field data type. The return 15 {
value may be I (integer), D (double), S (string), B (byte), H EX NO ERROR,
(short integer), or L (long integer). The function prototype EX_NOT FOUND,
for this method is EX REPLACE ME 001,
EX REPLACE ME 002,
char Type () EX REPLACE ME 003,
EX REPLACE ME 004,
20
Count
This class method returns the number of elements that
may be stored under this field name. Elements are numbered Machine Class Creating a New Machine Class
beginning with 0. For example, an integer field with a count
of five may be accessed using an index from 0 to 4. The Creating a completely new Machine Class is a more
function prototype for this method is complex process than simply modifying an existing
int Count ( ) Machine Class. A customer may create a new Machine Class
for one of the following reasons:
Size Existing Machine Classess do not contain the objects
30 needed to operate the customer's extremely specialized
This class method returns the size of each field element. machine
Under the Lynx OS (for 386/486 systems) integers and The customer wants to replace the messaging interface.
doubles are stored in four bytes, strings are stored by any
size. For example, a string field with a count of seven and a The customer has a specialized Kernel and needs to
size often means there are seven character strings of length 35
develop a Machine Class to communicate with it.
ten (including the Null terminator). The function prototype As with all development efforts there are two main stages:
for this method is preparation and development.
int Size ( ) Preparation
Exception Reporter 40 To prepare for development of a completely new Machine
Class, the customer should analyze the target machine tool
The error codes used to filter error messages are available to identify all of its devices.
in the file "ErrorCodes.hpp." This file may be modified and The customer must also identify the system tools to assist
expanded to meet the customer's needs. in this effort. Some of these tools are
45 OS utilities
ifndef ERRORCODESHPP
ANSI C compiler
idefine ERRORCODESHPP CH programming features (compiler, inheritance of
i
# FileName: ErrorCodes.hpp
object characteristics, and isolation of changes)
50 UNIX-based development tools
# SHeaderS The customer needs to become familiar with two important
# SLogS
i
control system components:
static char *ERRORCODESHPPRC string = "SHeaders"; Well-documented Kernel interface including message
typedef enum ExceptionSeverityValues parameters and Logic Controller flags (in this manual)
55 Full source code for the sample, generic Machine Class
NO SEVERITY = 0x0000,
INFORMATION = 0x0001, An understanding of these two components simplifies the
WARNING = 0x0002, development effort by helping the customer to connect the
FATAL = 0x0004,
All SEVERITIES = 0x0007,
new Machine Class to existing Kernel functions.
ExceptionSeverityValues; 60 Development Steps
typedef enum ExceptionCategory Values
NO-CATEGORY = 0x0000, The steps a developer should follow when creating a new
MOTION = 0x0001, Machine Class are as follows:
LOGIC CONTROLa 0x0002, 1. After a thorough analysis of the target machine, name
DEVICE LAYER = 0x0004, 65 all of the devices needed to operate the machine. These
DIRECTORY SERVICE = 0x0008,
RESERVED 10 = 0x0010, become the new Machine Class objects.
2. Identify all of the methods used by each device. It is
5,453,933
75 76
often helpful to use the same verbs as those used by model of a hole-making process capable of forming a hole
existing Machine Class objects. In that way, the devel in a workpiece, the model of the hole-making process
oper can connect and use the existing messages. including definitions of the X, Y and Z dimensions of the
3. Match the available Kernel functions to the new hole.
Machine Class objects. Create new messages where 8. The CNC machine tool control system of claim 1
needed. wherein at least one of said shaping objects comprises a
The Appendix includes representative source code which model of a milling process capable of being formed in a
may be useful to programmer to create and use a CNC workpiece, the model of the milling process object including
control system in accordance with the present invention. a two-dimensional definition of a shape.
However, it should be understood that variations in the 10 9. The CNC machine tool control system of claim 8
source in the appendix will likely be appropriate to accom wherein the model of the milling process object further
modate the design of the particular CNC machine tool with includes information representing whether the defined shape
which it is used. Moreover, those of skill in the art will is to be removed from the workpiece or left remaining as a
appreciate that many variations to the invention as described form in the workpiece.
herein may be made without departing from the spirit and 15
10. The CNC machine tool control system of claim 1
scope of the invention, and such variations are with scope of wherein at least one of said objects comprises a model of a
the below claims. contouring process capable of being performed on a work
What is claimed is: piece being turned in a lathe.
1. A CNC machine tool control system for a CNC 11. The CNC machine tool control system of claim 1
machine tool of the type comprising a controllable, movable 20
wherein said generating means includes status means for
tool for shaping a workpiece, means for receiving control indicating whether a process defined by one of said objects
instructions describing shaping functions to be performed on has been performed on a workpiece.
the workpiece, a processing unit and memory means, com 12. The CNC machine tool control system of claim
prising: wherein said generating means includes sequence storing
means for receiving and storing in the memory means 25
means for indicating the order in which a process repre
workpiece shaping instructions; sented by one of said objects should be performed relative
means for transmitting command signals to a movable to other of said objects representing other processes to be
tool to thereby cause the movable tool to move; and performed.
means for generating control signals, said generating 13. The CNC machine tool control system of claim 1
wherein at least one of said objects comprises a composite
means including an object oriented software program 30
object of multiple instances of another object representing a
comprising a plurality of objects, each said object process, the composite object further including physical
including a plurality of instructions and associated data, coordinate information regarding the locations on the work
said generating means including message means for piece in which each instance of the process is to occur.
transmitting information between said objects, at least 14. A CNC machine tool control system for a CNC
one of said objects including a model of a shaping 35
machine tool of the type comprising a controllable, movable
process to be performed on a workpiece by the movable tool for shaping a workpiece, means for receiving control
tool, said generating means coupled to said message instructions describing shaping functions to be performed on
means, said generating means generating control sig the workpiece, a processing unit and memory means, com
nals responsive to messages from said shaping objects, prising:
said generating means communicating said control 40
means for receiving and storing in the memory means
signals to said transmitting means. workpiece shaping instructions;
2. The CNC machine tool control system of claim 1
wherein at least one of said objects may be dynamically means for transmitting command signals to a movable
allocated in the memory means. tool to thereby cause the movable tool to move; and
3. The CNC machine tool control system of claim 1 45 means for generating control signals, said generating
wherein at least one of said objects comprises a model of a means including an object oriented Software program
movable tool for shaping a workpiece, and wherein at least comprising a plurality of objects, each said object
one of said movable tool objects exchanges messages with including a plurality of instructions and associated data,
at least one of said shaping process objects. said generating means including message means for
4. The CNC machine tool control system of claim 3 50 transmitting information between said objects, at least
wherein said shaping object includes a software procedure one of said objects including a model of a movable tool
specifying messages said shaping object needs to Send to for use in connection with shaping a workpiece, said
one of said movable tool objects to complete the shaping movable tool objects including instructions and data
process. relating to functions of a movable tool, said generating
5. The CNC machine tool control system of claim 1 55 means coupled to said message means, Said generating
wherein at least one of said objects comprises a location means generating control signals responsive to mes
object including information about the location on the sages from said movable tool objects, said generating
workpiece where a process is to be performed, and wherein means communicating Said control signals to Said
a shaping process object is associated with said location transmitting means.
object. 60 15. The CNC machine tool control system of claim 14
6. The CNC machine tool control system of claim 1 wherein at least one of said objects comprises a model of a
further including first and second objects each comprising a shaping process to be performed on a workpiece by the
model of a shaping process to be performed on a workpiece, movable tool, and wherein at least one of said movable tool
and wherein said second object includes at least one instruc objects exchanges messages with at least one of said shaping
tion which is inherited from said first object. 65 process objects.
7. The CNC machine tool control system of claim 1 16. The CNC machine tool control system of claim 14
wherein at least one of said shaping objects comprises a wherein said generating means includes status means for
5.453,933
77 78
indicating whether one of said movable tool objects is in use the workpiece, a processing unit and memory means, com
by a another object. prising:
17. The CNC machine too control system of claim 14 means for receiving and storing in the memory means
wherein the system comprises first and second objects each workpiece shaping instructions;
comprising a model of a movable tool for shaping a work
piece, and wherein said second object includes at least one means for transmitting command signals to a movable
instruction inherited from said first object. tool to thereby cause the movable tool to move;
18. The CNC machine tool control system of claim 14 an object oriented software program comprising a plural
wherein at least one of said objects comprises a model of a ity of objects, each said object including a plurality of
tool capable of forming a hole in the workpiece and the size 10 instructions and associated data, each of said objects
of the hole formed by the tool. carrying out operations with respect to a corresponding
19. The CNC machine tool control system of claim 14 concept and exchanging, with other said objects, mes
wherein at least one of said objects comprises a model of a sages indicative of what operation should be carried out
tool capable of milling a workpiece and the size of the tool. or a status of said sending object;
20. The CNC machine tool control system of claim 14 15 a motion controller software module for receiving mes
wherein at least one of said objects comprises a model of a sages from at least one of said plurality of objects, the
movable table on which a workpiece may be mounted and received messages including commands indicating
coordinate data regarding the position of the table.
21. The CNC machine tool control system of claim 14 desired movements of a movable tool; and
wherein at least one of said objects comprises a model of a said motion controller software module further compris
tool changer and includes descriptions of a plurality of tools. 20 ing means for sending command signals to said trans
22. The CNC machine tool control system of claim 14 mitting means to thereby cause the movable tool to
wherein at least one of said objects comprises a model of a OW.
rotatable spindle capable of receiving a tool, said spindle 29. The CNC machine tool control system of claim 28
object including means for storing information regarding wherein said motion controller software module includes
whether a spindle is rotating. 25 means for sending object oriented messages to a plurality of
23. The CNC machine tool control system of claim 14 said objects.
wherein at least one of said objects comprises a model of an 30. A CNC machine tool control system for a CNC
operator interface console through which an operator may machine tool of the type comprising a controllable, movable
utilize the CNC machine tool control system. tool for shaping a workpiece, means for receiving control
24. The CNC machine tool control system of claim 14 30 instructions describing shaping functions to be performed on
further comprising: the workpiece, a processing unit and memory means, com
a motion controller module for receiving messages from prising:
said objects indicating desired movements of a mov means for receiving and storing in the memory means
able tool and sending command signals to the movable workpiece shaping instructions;
tool to cause the movable tool to move in accordance 35
means for transmitting command signals to a movable
with the desired movements. tool to thereby cause the movable tool to move;
25. The CNC machine tool control system of claim 24 an object oriented software program comprising a plural
wherein said movable tool object periodically sends a mes ity of objects, each said object including a plurality of
sage to said motion controller module requesting informa 40 instructions and associated data, each of said objects
tion regarding the location of the movable tool. carrying out operations with respect to a corresponding
26. The CNC machine tool control system of claim 24 concept and exchanging, with other of said objects,
wherein said motion controller module includes storage messages indicative of what operation should be car
means for storing locations of movable tools, and wherein ried out or a status of said sending object;
said motion controller module provides a message including 45 a motion controller software module operatively associ
location coordinates in response to messages from said ated with said transmitting means and comprising
movable tool objects inquiring about the current coordinates means for receiving from movable tools signals indi
of the machine tool represented by said movable tool object. cating faults with a movable tool;
27. The CNC machine tool control system of claim 24
wherein: a device fault software module comprising:
at least one of said movable tool objects includes a model
50 means for storing information regarding detected faults
of a rotatable spindle capable of receiving a tool, said from movable tools;
spindle object including means for storing information means for storing, for each detected fault, a sublist of
regarding whether a spindle is rotating; said objects to which to send an object oriented
message identifying the detected fault, and
at least one of said objects comprises a model of a 55 means for sending, upon receiving information regard
movable table on which a workpiece may be mounted ing a movable tool fault, an object oriented message
and coordinate data regarding the position of a table; to each said object associated with the fault.
and said system further comprising: 31. The CNC machine tool control system of claim 30,
a composite object comprised of said rotatable spindle wherein said object oriented messages sent by said device
object and said table object, said composite object 60 fault software module are sent via said object oriented
including software means for simultaneously coordi software program.
nating the relative positions of the spindle and the table 32. The CNC machine tool control system of claim 30,
using said rotatable spindle object and said table object. wherein said messages sent by said device fault software
28. A CNC machine tool control system for a CNC module are sent through a call to an operating system to
machine tool of the type comprising a controllable, movable 65 another program.
tool for shaping a workpiece, means for receiving control 33. A CNC machine tool control system for a CNC
instructions describing shaping functions to be performed on machine tool of the type comprising a controllable, movable
5,453,933
79 80
tool for shaping a workpiece, means for receiving control of a plurality of objects, each said object including a
instructions describing shaping functions to be performed on plurality of instructions and associated data, Said
the workpiece, a processing unit and memory means, com objects being capable of receiving and transmitting
prising: messages to other of said objects in the System, and
wherein:
means for receiving and storing in the memory means at least one of said objects comprises a shaping process
workpiece shaping instructions, object comprising a model of a process to be per
means for transmitting command signals to a movable formed on a workpiece by a movable tool;
tool to thereby cause the tool to move; at least one of said objects comprises a movable tool
an object oriented software program comprising a plural 10 object comprising a model of a movable tool capable
ity of objects, each said object including a plurality of of shaping a workpiece,
instructions and associated data, said objects including the object oriented software system includes motion
a plurality of transmitting objects and a plurality of control means for receiving an object oriented mcs
receiving objects, said object oriented software pro sage containing movable tool motion information
gram including message means for transmitting a plu 5 and transmitting motion commands to a movable
rality of messages to said receiving objects from said tool to cause the movable tool to move in accordance
transmitting objects, and wherein at least one of said with the motion information;
objects comprises a motion control object capable of receiving workpiece shaping information and storing the
receiving object oriented messages from other of said workpiece shaping information in one of said shaping
objects specifying motion operations to be performed 20 process objects,
by a movable tool, the motion control object operably transmitting an object oriented message from a shaping
associated with said command signal transmitting process object to a movable tool object, and
CS.
34. The CNC machine tool control system of claim 33 transmitting an object oriented message from a movable
wherein said motion control object further comprises: tool object to the motion control means, to thereby send
25 a command signal to a movable tool and cause a
means for receiving fault signals from a movable tool; and workpiece to be shaped by the movable tool.
means for sending an object oriented message to another 36. The method of claim 35 wherein said shaping process
of said objects in the control system identifying the object is dynamically allocated in memory.
received fault signal. 37. The method of claim 35 wherein said shaping process
35. A method of operating a control system for a CNC 30 object includes embedded software commands identifying
machine tool control system of the type comprising a one of said movable tool objects to which a message is sent.
controllable, movable tool for shaping a workpiece, means 38. The method of claim 35 wherein the object oriented
for receiving control instructions describing shaping func software system operates in conjunction with a real time
tions to be performed on the workpiece, a processing unit multitasking operating system.
and memory means, the method comprising the steps of: 35
providing an object oriented software system comprised c: ; c. : :