Method and apparatus for determining calibration options in a motion control system

Abstract
In one embodiment, a method of and apparatus for determining calibration options in a motion control system is provided. The method includes the steps of measuring error in a commanded motion, modeling the error, identifying sources of the error; and predicting a degree to which applying compensation for one of the sources of the error might affect the error.
Description


TECHNICAL FIELD

[0001] The present invention relates generally to motion control systems, and more particularly, to a method and system for tuning compensation parameters.



BACKGROUND OF THE INVENTION

[0002] The performance of a motion control system is of primary importance. In particular, a control system should be stable, result in acceptable responses to input commands, result in a minimum steady-state error for input commands, and be able to eliminate the effect of undesirable disturbances. Often-times, for optimum performance, adjustments are made to a control system. The alteration or adjustment of a control system in order to provide a desired performance is often referred to as compensation (i.e., compensation is the adjustment of a system in order to make up for deficiencies or inadequacies).


[0003] In some cases, an additional component (e.g., a compensator) is included within a motion control system to equalize or compensate for such deficiencies/inadequacies. For example, such compensators can be implemented as one or more parameters whose values are used by a controller to determine how to control a system. Accordingly, to provide optimum performance, appropriate values are determined for such parameters.


[0004] The process of adjusting these parameters (e.g., to compensate for system changes) is often referred to as tuning. Recently, techniques for tuning such parameters that involve minimal or no operator involvement have been developed. These techniques are generally referred to as autotuning. For example, autotuning can refer to a process in which a controller automatically determines appropriate values for such parameters.


[0005] Currently, in motion control systems such as those utilized with machine tools, relative displacement sensors, such as a telescoping ballbar, are used to provide an electrical output representing a measurement of incremental displacement caused by the motion control system. The electrical output can then be used to “tune” parameters of the motion control systems that account for errors in the motion of the machine(s) it controls. For example, a ballbar can be mounted between the two members of a machine tool that move relative to each other and create feed motion between a tool and a workpiece. More particularly, with respect to a machining center, for example, the ballbar is mounted between a spindle and a work-holding table.


[0006] Typically, the range of motion of a commercially available ballbar is limited to just a few millimeters. For example, the machine tool motion during a ballbar measurement is conventionally along a substantially constant radius arc. Measurement of deviation of the arc radius from the ideal constant radius can be used to provide information about the errors associated with the machine tool. This information can, for example, be used to determine certain aspects of positioning (static and dynamic) errors associated with the machine.


[0007] With reference to FIG. 1, a conventional use involving a motion control system and a machining center is herein described (where a user of the motion control system manually performs most steps). The center fixture of a ballbar is placed at a desired location on the machine with the setscrew loose. The spindle is then moved such that a magnetic cup in the tool holder of the spindle picks up the steel circle center ball of the ballbar and the setscrew is tightened. The positions of the axes are then recorded by performing a machine position set to redefine the coordinate system, such that the current position is the program system origin (e.g. G92X0Y0Z0).


[0008] A user of the motion control system then manually feeds the axes to move the magnetic cup off of the center ball, and creates a part program causing the machine to perform a circular move, an exemplary one of the part programs having a number of characteristics, including the following:


[0009] 1. The circle center corresponds to the location of the center ball.


[0010] 2. The circle radius is equal to or slightly less than the nominal length of the ballbar.


[0011] 3. The circular motion is constrained to lie within a major plane of the machine (e.g., XY, XZ, YZ).


[0012] 4. The circular arc includes some additional (overshoot) distance at the beginning and end of the move (allows the feedrate to accelerate from zero to full speed and to decelerate from full speed to zero), with the portion of the circle whose data is considered by the analysis being referred to as the data-arc (data collected during the feedrate transients at the beginning and end of the move is not considered during data analysis).


[0013] 5. The circular motion is preceded by a short (feed-in) move that travels along a circle radial line from a radius greater than the circle radius to the circle start point. Similarly, a short (feed-out) move following the circular motion travels along a circle radial line from the circle end point to a radius greater than the circle radius. These moves can be used to signal conventional software associated with the ballbar when the test begins and ends, and can be used by the software to provide an estimate of the instantaneous circle angle based on the elapsed time since the test start.


[0014] 6. Two successive sequences with overshoot arcs, a feed-in move, a data-arc, and a feed-out move are present for both clockwise and counter-clockwise directions within the plane.


[0015] 7. A program stop (M0) block is present prior to the beginning of each (clockwise and counter clockwise) sequence of moves (the program stop providing the operator with an opportunity to arm the trigger in the ballbar software).


[0016] The ballbar can then be plugged into a serial port of the computer running the ballbar software, and the ballbar length optionally calibrated (e.g., by placing the ballbar into a calibration fixture of known length and prompting the software to measure the ballbar's output). If the ballbar length is calibrated, the actual ballbar length is computed and stored by the ballbar software. One advantage of a length-calibrated ballbar is that it enables average circle diameter error to be estimated.


[0017] The ballbar software is then informed of the specific conditions for the current test by entering values for the following parameters: length of overshoot arcs, data arc start angle, data arc length, feedrate, and circle radius. The trigger in the ballbar software is armed on the machine (e.g., a personal computer) on which it is running, and the test program on the control is executed.


[0018] When the program reaches the stop (M0) after the first circular move, and after the data collection is completed, the ballbar software trigger is re-armed, and the machine is cycle started to perform the second circular move. At test completion, the test data is saved to a file and analysis software is run to diagnose error sources.


[0019] Accordingly, a method and system to automate and simplify this and other similar procedures is desired. In addition, it would be desirable to apply parametric compensation based on measurements from a ballbar.



SUMMARY OF THE INVENTION

[0020] It is an object of at least one embodiment of the present invention to provide an improved method and/or system for tuning compensation parameters of a motion control system.


[0021] Additional objects, advantages, and novel features of various embodiments of the invention will be set forth in part in the description of the exemplary embodiments that follows and, in part, will become apparent to those skilled in the art upon examining or practicing the invention.


[0022] One embodiment of the present invention is directed towards a method of and apparatus for determining calibration options in a motion control system. The method includes the steps of measuring error in a commanded motion, modeling the error, identifying sources of the error; and predicting a degree to which applying compensation for one of the sources of the error might affect the error.


[0023] Still other advantages of various embodiments will become apparent to those skilled in this art from the following description wherein there is shown and described exemplary embodiments of this invention simply for the purposes of illustration. As will be realized, the invention is capable of other different aspects and embodiments without departing from the scope of the invention. Accordingly, the advantages, drawings, and descriptions are illustrative in nature and not restrictive in nature.







BRIEF DESCRIPTION OF THE DRAWINGS

[0024] While the specification concludes with claims particularly pointing out and distinctly claiming the invention, it is believed that the same will be better understood from the following description taken in conjunction with the accompanying drawings in which like reference numerals indicate corresponding structure throughout the figures.


[0025]
FIG. 1 is a diagram illustrating a ballbar test;


[0026]
FIG. 2 is a screen shot of a setup interface according to an exemplary embodiment of the present invention;


[0027]
FIGS. 3A and 3B are screen shots of a test interface according to an exemplary embodiment of the present invention;


[0028]
FIGS. 4 and 4A are screen shots of an analysis interface according to an exemplary embodiment of the present invention;


[0029] FIGS. 5A-5E are screen shots of various subpages of an adjustment interface according to an exemplary embodiment of the present invention;


[0030]
FIGS. 6A and 6B are plots illustrating formulation of circle center error and the polar error plot signature resulting from a circle center error;


[0031]
FIG. 7 is a plot illustrating an effect of squareness error on radius;


[0032]
FIG. 8 is a plot illustrating effects of axis scale errors;


[0033]
FIG. 9 is a block diagram illustrating assumed axis position loop dynamics for estimating radius distortion as influenced by position loop band width according to an exemplary embodiment of the present invention;


[0034]
FIG. 10 is a polar error plot illustrating an effect of a parabolic straightness error;


[0035]
FIG. 11 is a plot illustrating an effect of servo (phase) mismatch errors;


[0036]
FIG. 12 is a plot illustrating an effect of lost motion on circular contour;


[0037]
FIG. 13 is a polar error plot illustrating a lost motion signature;


[0038]
FIG. 14 is a polar error plot illustrating a friction reversal error signature;


[0039]
FIG. 15 is a block diagram illustrating a system model employed by friction error estimation according to an exemplary embodiment of the present invention;


[0040]
FIG. 16 is a graph illustrating excitation as a function of data arc length according to an exemplary embodiment of the present invention;


[0041]
FIG. 17 is a plot illustrating an example of angular error (y-axis roll error);


[0042]
FIG. 18 is a graph illustrating clipping behavior of applied straightness compensation;


[0043]
FIG. 19 is a graph illustrating maximum and minimum axis deflection based on start and end quadrant according to an exemplary embodiment of the present invention;


[0044]
FIG. 20 is a block diagram illustrating a multi-threaded implementation of test realiziation according to an exemplary embodiment of the present invention;


[0045]
FIG. 21 is a block diagram illustrating resampling according to an exemplary embodiment of the present invention;


[0046]
FIG. 22 is a legend explaining symbols used in finite state machine diagrams according to exemplary embodiments of the present invention;


[0047]
FIG. 23 is a finite state machine diagram for a run test coordinator (RTC) algorithm according to an exemplary embodiment of the present invention;


[0048]
FIG. 24 is a diagram explaining a reusable “A” state according to an exemplary embodiment of the present invention;


[0049]
FIG. 25 is a diagram explaining a reusable “W” state according to an exemplary embodiment of the present invention;


[0050]
FIG. 26 is a plot illustrating machine motion for backlash test counterclockwise are according to an exemplary embodiment of the present invention;


[0051]
FIG. 27 is a class diagram illustrating a data hierarchy for a backlash test data structure according to an exemplary embodiment of the present invention;


[0052]
FIG. 28 is a flowchart illustrating a backlash program generation procedure according to an exemplary embodiment of the present invention;


[0053]
FIG. 29 is a finite state machine diagram for a test in progress (TIP) algorithm according to an exemplary embodiment of the present invention;


[0054]
FIG. 30 is a finite state machine diagram for a ballbar length calibration algorithm according to an exemplary embodiment of the present invention;


[0055]
FIG. 31 is a diagram illustrating structural dynamics parameter estimation using a ballbar according to an exemplary embodiment of the present invention; and


[0056]
FIG. 32 is an abstract framework for auto tuning on a CNC according to an exemplary embodiment of the present invention.







DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS

[0057] In general, the present invention relates to a motion control system capable of tuning compensation parameters. For purposes of illustration, exemplary embodiments discussed primarily herein relate to test software that runs on the control of a machine tool and, in one embodiment, to such software that allows a machine tool control to self-calibrate its parametric compensation based on measurements from an instrument called a telescoping ballbar. Moreover, in one embodiment, disclosed exemplary software provides the capability to: 1) specify test conditions; 2) automatically create the motion for measurements related to the test condition; 3) initiate the motion; 4) collect the data; 5) analyze the data; and 6) update the compensation of the control based on the data.


[0058] Further exemplary embodiments can, for example, be used to:


[0059] 1. Validate the appropriateness of test setup data.


[0060] 2. Validate the integrity of collected data.


[0061] 3. Aid a user in fixture setup by providing prompts of what to do next based, for example, on control state and axis positions.


[0062] 4. Monitor a control state to coordinate a test sequence.


[0063] 5. Send messages to control the execution of part programs.


[0064] 6. Robustly handle error conditions.


[0065] 7. Process measured data to account for effects such as servo gains and feedforward.


[0066] 8. When computing proposed changes to compensation, consider the values for compensation that were active during the test execution.


[0067] 9. Copy updated compensation values into, for example, a database of a control.


[0068] 10. Activate new compensation (e.g., by issuing a system event).


[0069] For example, certain exemplary embodiments of the present invention make use of access to controller internal data, program buffer, and system event services of an associated control to provide at least some of the aforementioned features.


[0070] According to one embodiment of the present invention, configuration of certain types of compensation can be automated. Referring specifically by example to an exemplary embodiment involving ballbars, values for the following types of compensation for axes in a machine tool that define a primary machine plane in which a ballbar circle test is performed can be automatically proposed: scale error; squareness error; straightness error; backlash; windup, and/or friction.


[0071] Ballbar measurements of radius deviations that occur during major plane circular motion of a machine are the combined result of the simultaneous motion of two axes. In order to attribute the measurements to error sources from a single axis, the analysis can be restricted based on a series of limiting assumptions about the nature of the errors. For example, the errors can be assumed to originate from a limited number of sources with a fixed mathematical relationship between an error source, the axes positions, axes velocities, and the radial error produced.


[0072] The particular mathematical relationships included within the model can be chosen based on some physical understanding of the machine structure and servo dynamics, and/or on previous experience with machine tool errors. Accordingly, each error source can be described by a single parameter that quantifies the amplitude and direction of the error. Therefore, data representing such error can be curve fit to extract optimal estimates for each parameter associated with each error type.


[0073] An alternative to the parametric model could include a data-based approach. If, for example, the desired goal of the ballbar measurement was the generation of data tables for bidirectional compensation (compensates for backlash and error due to variation in the pitch of a ballscrew) and cross-axis compensation (compensating for axis position as a function of one or more axis positions), then there might be an infinite number of data set combinations for these tables that might exactly account for the errors measured by the ballbar. However, only one of these combinations would be the “correct” one. Meanwhile, an incorrect selection could easily result in larger errors than what might occur on an uncompensated machine (e.g., for any axis motion that differs from the motion experienced during the ballbar measurement).


[0074] Although a parametric description of the errors might not exactly describe the measurement, it can allow for the derivation of an optimal combination of parameters that best describes the measurement. Accordingly, association of measured machine errors to a parametric model implies that the compensation for the machine errors can be based on the same parametric model.


[0075] In, for example, an A2100 control from Siemens Energy and Automation, Inc., the following types of parametric compensations are available: 1) backlash compensation; 2) windup compensation; 3) pitch (or scale) compensation; 4) squareness compensation; and 5) straightness compensation. Each of these compensations describes the motion of an individual axis or combined effect of two axes within a plane. Each of these error sources can also be described by a single parameter.


[0076] A mathematical model can be based on an understanding of the physical effects that often cause machine errors. If an error source exists that is outside of the scope of the mathematical model, then the error might be falsely attributed to one of the error types that is included in the model structure. To help avoid this situation, the scope of the mathematical model can be made larger than the scope of parametric compensations provided.


[0077] For example, servo mismatch error can be included within the scope of one of the exemplary models described herein for use with the A2100 control, even though the A2100 control does not have an explicit servo mismatch compensation. Such servo mismatch errors can instead be corrected in other ways based on other types of measurements. In any case, situations might arise where the mathematical model cannot properly describe the data. For example, this could occur if a machine has an error that is outside of the scope of the particular mathematical model, if there are problems with the measurement, such as the ballbar separating from the magnetic cup, or if there are high levels of noise in the measurement. To identify such a situation, statistical measures of the coherence between the model and the measurement can be computed and, for example, displayed to a user of the system (e.g., where a low value for coherence indicates to the user that a closer look at the data might be required).


[0078] According to one embodiment of the present invention, parameter estimates are used to describe machine errors within the range of motion that took place during a ballbar test. One potential concern associated with extrapolation of the model to regions outside of the range of motion of the test involves the uncertainty of the parameters in these regions. Therefore, one embodiment of the present invention includes a limitation that it reliably compensates for the region of a plane that is within the range of motion of the ballbar test. For example, for machine planes that have a rectangular (rather than square) range of motion envelope, a single circle test might not produce compensations that are reliable over the full range of motion.


[0079] Furthermore, certain error types appear to be more reliably extrapolated than others. For example, backlash, windup, and scale errors appear to be much more uniform over the full range of the axis than a parametric squareness and straightness error. Moreover, parametric compensation of a machine may be inappropriate in situations where the range of motion of the ballbar test used to develop the compensation is significantly less than the range of motion of one or more of the machine axes. In such a situation, parametric compensation based on a ballbar test may be most useful as a supplement to data-based bidirectional-axis-(pitch)-compensation and cross-axis-compensation that covers the full range of axis motion.


[0080] In other embodiments involving a ballbar test, the test may be used by the end user to fine-tune the compensation over a limited range of axis motion that represents the range of motion to be employed in an immediately upcoming machining operation. Accordingly, in one embodiment of the present invention, it is recommended that the diameter of the circle test encompass as much of the machining envelope as possible. As can be understood, the ability of the parametric model to exactly describe the motion within the limited region increases as the range of motion (circle diameter) decreases, (the error types are more likely within the scope of the model).


[0081] Another consideration that might affect the reliability of the parameters can be the nature of the circular motion itself. For example, sufficiently exciting each error source such that it produces a unique effect on the measurement allows different error sources contained within a model to be distinguished. For an exemplary model described herein, sufficient excitation involves collecting data for both clockwise and counter-clockwise moves. Additionally, in a further exemplary embodiment, the length of the data arc is as large as possible.


[0082] In an exemplary embodiment, both clockwise and counter-clockwise data arcs cover 360 degrees. In some cases, however, the mechanical limitations of the machine might not allow for a test that simultaneously covers a 360-degree arc and the maximum machining envelope of one or both of the axes. In such a situation, one embodiment of the present invention might involve using a data arc that is less than 360 degrees to enable the full axis envelope to be covered. In an exemplary embodiment described herein, the data arc is, however, at least 180 degrees, and the clockwise arc covers the same angular range as the counter-clockwise arc.


[0083] A statistical value referred to herein as the excitation may also be computed to provide the user with an indication of the sufficiency of excitation for distinguishing effects of different parameters. Two of the exemplary parametric errors, backlash and windup, are typically indistinguishable from each other during a standard (continuous motion) ballbar test, which provides an indication of the total lost motion. In one embodiment of the present invention, a separate backlash test is performed to determine the contribution of the backlash error to the total lost motion indicated by the measurement data from continuous motion test.


[0084] According to an exemplary embodiment of the present invention, a user interface, such as one containing four primary modes, can be provided for the system. In one embodiment, these modes include a setup test mode, a run test mode, an analyze data mode, and an adjust compensation mode. For example, each mode can be displayed as a separate page on a user interface.


[0085] Referring now to FIG. 2, in one embodiment of the present invention, a test-setup page 10 can be provided that acts as an interface for a user to, for example, either load a set of test condition parameters from a file or to specify such parameters manually. In an exemplary embodiment, the test conditions specified on this page can be used (e.g., by the control) to automatically generate a part program during a test execution stage (such as under the run-test mode that will be later described herein).


[0086] According to one exemplary embodiment, the test condition parameters may be specified for one test in each major plane of an associated machine (e.g., XY, XZ, YZ). For example, the user may modify the test condition parameters by entering an edit mode. While in edit mode, fields 12 that contain the test condition parameters could become modifiable.


[0087] Once any desired changes have been made, the user can then press an “apply” button 14. In such an embodiment, pressing an apply button 14 can be used to initiate a series of validation checks for the entered test condition parameters. For example, validation checks could be used to ensure that a reasonable test may be developed from an entered combination of test condition parameters. In one exemplary embodiment, if a validation test fails, an alert describing the problem is displayed, the user interface remains in edit mode, and the user is expected to change the test parameters until they represent a valid combination.


[0088] In a further exemplary embodiment, a separate group of test condition parameters can be stored for each of the three major planes. The test condition parameters could include the following:


[0089] 1) circle radius (less than or equal to the ballbar length)


[0090] 2) circle center (location in X, Y, Z where circle should be centered)


[0091] 3) data arc start angle (counter clockwise angle from horizontal axis at which to begin data collection)


[0092] 4) data arc length or test range (arc angle over which data is collected);


[0093] 5) overshoot arc length (arc angle where data is not collected to allow for transients during acceleration and deceleration; in one embodiment the acceleration overshoot arc and deceleration overshoot arc can both be specified by this parameter)


[0094] 6) ballbar length (this selection might be limited based on available extension bars);


[0095] 7) feedrate (programmed feedrate for data-arc, overshoot-arcs, feed-in, and feed-out); and


[0096] 8) process or feed mode (specifies the group of path parameters (e.g., G45.n) to be used for motion during the test; this may affect path acceleration, path jerk, step velocities, and feedforward status)


[0097] In one embodiment of the present invention, a combination of test conditions parameters are validated, such as against the following: 1) Is circle radius appropriate for the ballbar radius; 2) Is axis motion within the machine range?; 3) Is circle center within the machine range?; 4) Are overshoot arcs sufficiently long to enable constant feedrate during data arc?; and 5) Are the data arcs long enough to provide sufficient excitation to distinguish between error types?


[0098] In an exemplary embodiment of the present invention, a circle radius is required to be less than or equal to a ballbar radius. According to such an embodiment, if the circle radius is less than the ballbar radius, the length of the ballbar traces a conical surface. In such an embodiment, the circle radius is slightly less than the ballbar radius because the measurements might become overly sensitive to motion in the direction of a third axis (e.g., the axis perpendicular to the major plane). Motion along the direction of the third axis should be substantially indistinguishable from motion of the axes in the plane and can often distort the parameter estimation.


[0099] For example, as the angle of the cone increases from 0° (circle radius equal to the ballbar radius) to 45°, the relative contribution to ballbar deflection from motion in the third axis increases from 0% to 100% of the deflection caused by motion in the plane. A respective exemplary validation check requires that the cone angle not exceed 26°. In such an embodiment, at 260, the relative contribution to ballbar deflection from motion of the third axis is 50% of that of motion within the plane.


[0100] The selected values for ballbar length, circle radius, circle center, overshoot arc, data arc start angle, and data arc length can also be evaluated to ensure that the motion produced is everywhere within the range limits of the axes. For example, if it is detected that an axis range limit might be exceeded, a validation check can provide proposals for changing, for example, the circle center to allow the circle to fit within the envelope of the machine (if the motion can be brought to within the machine envelope by shifting the center).


[0101] Even if the circular arc is within the machine's range, it can still be possible that the circle center is not within the range of the machine. For example, this can occur when the circle radius is less than the ballbar length. Accordingly, in one embodiment, as a tool tip (e.g., a magnetic cup) should be brought to a circle center ball to locate a centering fixture, the circle center should be within the range of the machine.


[0102] Another exemplary embodiment can include requiring collection of data during a period of time when the circle is traversed at a constant feedrate. The frequency response of an axis typically involves distortion of the amplitude and phase as a function of frequency (for a circle, the frequency is proportional to feedrate). At a single feedrate, the amplitude and phase distortion should be constant, the shape of the circle should not be distorted (from individual axis frequency response), and it should be possible to compensate for the effects due to constant amplitude attenuation and phase lag when post processing the data.


[0103] An acceleration overshoot arc can be included to help ensure that the machine axes have an opportunity to accelerate to full feedrate before data collection begins. Meanwhile, a deceleration overshoot arc can be included to avoid collecting data during the deceleration from full feedrate to a full stop. While, in one embodiment, the overshoot arcs should be long enough to ensure constant feedrate during the data-arc, it can also be desirable to keep the length of the overshoot arc to be only slightly above its minimum possible value to minimize the total test time.


[0104] Length of the acceleration overshoot arc can depend on several factors, including: 1) an end of span speed constraint of a feed-in span preceding the acceleration overshoot arc, 2) a span maximum acceleration and jerk for an overshoot arc span, 3) programmed feedrate, 4) axis Kv gains, 5) axis feedforward levels, and/or 6) whether rate feedforward is activated. Similarly, the length of the deceleration overshoot arc can depend on similar factors. Furthermore, the span data's acceleration, jerk, end-of-span-speed-constraint, and feedforward status can vary depending, for example, on the axis configuration data, path configuration data, feed mode selection, data-arc start angle, and data arc length.


[0105] Typically, lengths for the acceleration and deceleration overshoot arcs can be substantially identical. In one embodiment, whether an overshoot arc is acceptably long can be determined by running a sequence of spans in a test move through motion algorithms of the control without directly controlling the machine. In an exemplary embodiment, appropriate subsystems of motion algorithms of the control (e.g., look-ahead and velocity management) are linked to form a limited scope emulation that can run as a callable function in a non real-time environment. The motion can be emulated in much less time than the actual move by, for example, limiting the emulation to small portions of the movement with the correct initial conditions (velocity and acceleration).


[0106] The emulated path distance signal can be passed through a filtering function that provides the same phase and amplitude distortion created by the axis Kv and feedforward level. According to one embodiment of the invention, the results of the emulation can be used to indicate whether or not the overshoot arcs are long enough. If the arcs are not long enough, then a conservative approximation can be used to develop a proposed value for overshoot arc length to provide to the user. This new estimate can also be validated against the actual motion.


[0107] With respect to one exemplary embodiment, an estimate of total lost motion for both axes in a plane can be obtained by including at least one reversal for each axis during the motion. This implies a minimum range of motion of somewhat greater than 90° if the data is aligned with one of the circle quadrants. In order to accommodate any data arc start angle, data arc length can be set somewhat greater than 180° to help ensure the occurrence of at least one reversal for each axis. Additionally, 180° of motion can help afford the ability to reasonably distinguish between squareness and straightness errors. Thus, in such an exemplary embodiment, a minimum allowable data arc is 180° and an excitation parameter exceeds a minimum defined threshold.


[0108] Setup test page 10 can also add additional content to increase overall usability. For example, a setup test page 10 can include a “Get Current” button 18 that, when pressed, copies current machine coordinates of the axes to the circle center coordinates for the current plane. It can also contain an “Auto Select” button 20 that sets the circle center as the middle of the machine's maximum range envelope and sets the circle radius equal to the ballbar length. In one embodiment, the “Get Current” and “Auto Select” buttons 18, 20 are enabled when in edit mode.


[0109] Setup test page 10 can further contain a graphical and/or animated representation 22 of the data arc and/or overshoot arc. Additional capabilities could include an ability to revert to the original test condition parameters that were present prior to any changes that were made during the current edit session (e.g., such as from within an edit mode). It can also include the ability to save the current test condition parameters (e.g., for each of three planes) to a file and/or to load new test condition parameters (e.g., for three planes) from a file. Still further, setup test page 10 can include the ability to assign the currently active test condition parameters as the default setup that is present when the user interface is opened.


[0110] In certain embodiments, setup test page 10 can contain content to assign data associated with, for example, a ballbar device itself. For example, a serial number of the ballbar can be copied to the header of a measurement data file for the purpose of creating a permanent record of the particular ballbar used to generate that data set. A ballbar scale factor can be used to adjust the measurements to account for the unique characteristics of the specific ballbar (typically printed on the side of the ballbar). Still further, a COM port to which the ballbar is attached can be specified on this page. There can also be a button that is used to debug ballbar problems.


[0111] Referring now to FIG. 3A, a run-test page 30 can be included, such as one that provides an interface to aid a user in setting up a fixture (e.g., a ballbar) and executing a test (e.g., a ballbar test). For example, such a run-test page 30 can comprise a drop-down list 32 for selecting a test (e.g., of three major plane tests) to perform. In one embodiment involving a ballbar test, for each of the major planes, five sequential tasks (or visible states) in the overall process of obtaining and saving a measurement are provided.


[0112] According to such an embodiment, when a major plane is selected, test setup data associated with that major plane is employed in the execution of the test. If a new major plane is selected, the state returns to its starting point in the test sequence. A finite state machine (FSM) that recurrently polls control and acquired data can coordinate the progression through these states. For example, such a test coordination FSM can contain more states than those that are made visible as a task. A detailed discussion of one embodiment of such a FSM involving a ballbar test is further discussed later herein.


[0113] According to an exemplary embodiment of the present invention, progress towards the completion of the tasks is indicated with a display on a screen. For example, each task can have an associated checkbox 34 that becomes checked when a corresponding task has been completed. A user can also be provided with the ability to, at any point in the process, go back any number of tasks by, for example, pressing a button associated with that task. Additionally, if a task fails to complete properly, the ability to automatically back up to the nearest previous state or task possible can also be provided.


[0114] In one embodiment, throughout a sequential process, a user can be provided with a text description of what to do next to progress through the sequence. For example, control data can be used to determine when the requirements for a state transition to the next state in the sequence (of tasks) have been fulfilled. In an exemplary embodiment, a user can avoid the manual intervention involved in completing the process by performing all operations using, for example, a pendant or panel of the control. One advantage associated with such an exemplary embodiment could include allowing the user to accomplish tasks at a machine without having to return to the control.


[0115] In one embodiment of the present invention involving a ballbar test, primary tasks in the process of completing the ballbar test include 1) MoveToCenter, 2) ConfirmCenter, 3) MoveToStart, 4) perform the test, and 5) save data associated with the test. A high level description of each of these tasks according to an exemplary embodiment is given below.


[0116] The state associated with the MoveToCenter task can be entered by, for example, pressing a Move to Center button 36 on run-test page 30. According to one embodiment, when the MoveToCenter state is entered, the recurrent polling for transition stimuli begins (if it has not already begun). Accordingly, when the MoveToCenter state is entered, a sequence of part program blocks to cause the axes to move to the circle center is created and loaded into, for example, a part program Manual Data Interface (MDI) buffer. A prompt text 38 can then be updated to inform the user to, for example, ensure that the path to the circle center is free of obstructions and then hit cycle start to begin the move. When it is detected that the final block in the move-to-center program has been completed and the control-state has transitioned from in-cycle to at end of program (eop) (described later herein), the FSM can transition to states associated with a ConfirmCenter task.


[0117] At the ConfirmCenter state, the FSM can update prompt 38 to ask the user to, for example, locate the center ball in the magnetic cup of the tool holder, tighten the set screw, and hit cycle start. Upon entering ConfirmCenter, the MDI program buffer can be loaded with some non-motion blocks and dwell blocks whose purpose is to message the FSM as the blocks are executed. Accordingly, when the FSM detects that the user has hit cycle start to confirm the center, the FSM can capture the current axis positions and store them as the circle center for the current test.


[0118] One advantage of such an embodiment can include facilitating the use of a slightly different circle center than the one defined in the test setup data. This can be useful because it can allow the test setup data to contain values for the circle center coordinates that are slightly offset from the plane of the center ball. Accordingly, the move to center can be performed with a high degree of confidence that the tool tip will not collide with the center ball. When the center has been confirmed, prompt 38 can be updated to, for example, suggest that the magnetic cup be power-fed or handwheeled off of the center ball.


[0119] The state associated with the MoveToStart task can be entered (e.g., from the ConfirmCenter task) when the FSM detects that the axes have been moved off of the center ball. As the state associated with MoveToStart is entered, the MDI buffer can be loaded with program blocks to move the axes to the start position for the test move and prompt 38 can be updated to, for example, suggest ensuring a safe path to the circle start point and hitting cycle start. The program blocks can move the axes to the position from which the initial feed-in move originates.


[0120] In one embodiment, when the FSM detects that the move to the start position has completed, it can generate a continuous motion ballbar test program and load it into, for example, the MDI buffer. If the user had indicated that a backlash test was also to be performed, the FSM can also include backlash test blocks in the program loaded into the MDI buffer. The display prompt can be updated to suggest that the user place the ballbar into the machine and hit cycle start to begin the test.


[0121] When the FSM detects that the ballbar test program execution has reached a certain point (e.g., prior to any motion), the FSM can cause program execution to temporarily suspend (e.g., using a technique to be described in a later section) and attempt to initialize the ballbar device. If the ballbar is successfully initialized, a button (e.g., “Cancel Test” button 40 of FIG. 3B) to enable the user to manually abort the test can be created and displayed, program execution can be allowed to continue, and the FSM can begin polling the ballbar position to detect the initial feed in the first (e.g., counter-clockwise) move.


[0122] After detecting initial feed-in, the FSM can begin, for example, storing ballbar measurements, checking for error conditions, measuring elapsed test time (e.g., based on the number of periodic ballbar measurements obtained), and testing for a feed-out move. In an exemplary embodiment, the program becomes suspended after the feed-out move. When the feed out move occurs, the data arc can be extracted from the total data set and validity checks (to be described later) can be performed. Assuming that the validity checks indicate no problems, the FSM can release the program from its suspended state and prepare to detect the initial feed-in from the second (e.g., clockwise) move.


[0123] In an exemplary embodiment, the sequence of events that occur during the second move is analogous to that of the first move. In one embodiment, once the second move completes and the validity check indicates a successful test, the program can begin to execute a backlash test (described later). Once testing is complete and validity checks are successful, the data can be extracted and stored in, for example, a temporary file.


[0124] A save data task can be initiated by, for example, the user pressing a save data button 42 after a valid test has been completed. In an exemplary embodiment, save data button 42 is enabled when a test has been completed and validated. For example, pressing save data button 42 can bring up an interactive dialog box (e.g., a window) used to assign a name for the file and to provide the user the opportunity to enter other information pertinent to the test (such as the machine type, serial number, etc). The data file can contain raw data and a header to describe the test conditions. In one embodiment, the save dialog initially contains a default file name that is created based on, for example, the test plane, machine serial number, calendar date, and number of data files with the same properties already present on the disk.


[0125] From the perspective of a user, the performance of a ballbar test according to an exemplary embodiment of the present invention could have the following sequence. The user selects a test plane from a drop down list 32, indicates a move to center (e.g., via button 36) on a user interface and indicates cycle start (e.g., via a pendant). An associated machine moves to a circle center.


[0126] The user manipulates a center fixture and uses a handwheel to make small adjustments to axis positions until a magnetic cup “picks up” a center ball. At that point, the user tightens a setscrew of the center fixture and hits cycle start. The user power feeds the axes off of the center ball, hits cycle start and the axes move to a start position. The user places the ballbar in the machine, hits cycle start, and the machine performs the test. When the test is complete, the user indicates that the data should be saved (e.g., via a save-data button 42) and the data is stored into a file.


[0127] In addition to its ability to perform the aforementioned steps, run-test page 30 can also provide some additional capabilities. For example, run-test page 30 can include an interface 44 for performing calibration of a test device (e.g., a length of a ballbar). Run-test page 30 can also provide an ability to select whether, for example, a backlash test is performed in addition to a continuous motion test. In still further embodiments, run-test page 30 can provide the ability to perform multiple tests at, for example, multiple feedrates without having to repeat the move-to-center, confirm-center and move-to-start tasks, and without having to return to, for example, setup-test page 10.


[0128] As previously alluded to, a length calibrated ballbar can enable a determination of an absolute axis scale error (a scale mismatch between axes can also be determined, even if the ballbar length is not calibrated). Accordingly, in one embodiment of the present invention, run test page 30 contains an interface 44 that enables device calibration, such as ballbar calibration. For example, such an interface 44 can include a numeric field 46 where the user can enter the length of a calibration fixture, an indicator (e.g., display 48) of whether the ballbar is currently length-calibrated, and a button 50 to request that calibration begin.


[0129] In an exemplary embodiment involving a ballbar calibration, to calibrate a ballbar length, a user first enters a calibrator length (e.g., as printed on the calibration fixture). The entered value is checked (e.g., by software) to ensure that it is reasonable given the configured ballbar nominal length. Whenever a valid new calibration length is entered, an internal state can transition from calibrated to uncalibrated. At that point, display 48 can indicate that the ballbar is not calibrated and the user can press calibration button 50.


[0130] According to one embodiment, pressing button 50 initiates a sequence where the ballbar initializes, powers on, collects data for a short period, and powers off. The data can then be checked for constancy and the reading used to determine an offset to add to the ballbar measurement to obtain an absolute ballbar length reading. This value can be stored and used when processing later measurements. Length calibration can be performed, for example, during the primary tasks described above, with the exception of the perform-test task. In an exemplary embodiment, the test coordinator FSM disables the calibration controls when the state is inappropriate for calibration.


[0131] With respect to ballbar testing, a backlash test can be an additional test. For example, a backlash test might be used to distinguish between windup and backlash components of the total lost motion measured by a continuous motion test. The term backlash is used herein to describe a type of lost motion that continues to persist after an axis has come to a stop. The term windup is used to describe a type of lost motion that occurs while an axis is in motion.


[0132] In an exemplary embodiment implementing a backlash test, the user can indicate that the performance of a backlash test is desired by checking a “backlash test” check box 52 at some point prior to the move to start task. Such a backlash test can be used, for example, to measure the persistent lost motion of each axis in a plane by performing ballbar measurements before and after single axis moves that end in a full stop. One exemplary backlash test part program is operative to move the axes along arcs to each of four circle quadrant boundaries (that are within the range specified in setup data). At each quadrant boundary, the part program and FSM can effect a sequence of events by incorporating schemes for messaging between the program and FSM.


[0133] In an exemplary embodiment, at each quadrant boundary, the following sequence takes place:


[0134] 1. Perform a single axis move toward the circle center along a radial.


[0135] 2. Stop axis motion, pause, and collect a first ballbar measurement.


[0136] 3. Feed the axis further toward the circle center along a radial.


[0137] 4. Stop axis motion, pause, and collect a second ballbar measurement.


[0138] 5. Feed the axis back towards the previous point along the radial.


[0139] 6. Stop axis motion, pause, and collect a third measurement.


[0140] According to one embodiment of the present invention, for every ballbar measurement, a validity check is performed to ensure that the ballbar is at a constant deflection for the duration of the measurement. Accordingly, the difference between the first and third measurement is the axis backlash. The second measurement can be used to check validity. The average measured backlash for each measurement point for an axis can be stored as the axis backlash. Meanwhile, axis windup can be computed by, for example, subtracting the axis backlash from the estimate of the axis's total lost motion from the continuous test's data.


[0141] Run test page 30 can also contain a numeric field 54 that enables the user to modify a feedrate. Such an embodiment might be useful in that it could allow the user to run multiple tests without having to return to, for example, test setup page 10. For example, each time the feedrate is changed, a validity test on the length of the overshoot angles can be performed. If the overshoot angles are not sufficiently long, an alert message can be displayed with a suggested value. In an exemplary embodiment, to perform a new test after having just successfully completed a test, the user can simply enter a new feedrate (if desired) and press a perform-test button 56. In a further exemplary embodiment, each successive test is stored in its own data file, such that every data file contains, for example, exactly one counter-clockwise result and one clockwise result.


[0142] With respect to the performance of a validity test on data acquired using a ballbar, such a validity test can be used to compare a number of data points collected through, for example, a data pipe of the ballbar, between a feed-in move and feed-out move to an expected value. If the number of data points deviates from the expected number of data points by more than a tolerated amount, the total test time is different than expected and the data can be considered invalid. An advantage associated with such a validity check can be that, if there is a significant deviation between the expected time and actual time, the estimate of circle angle based on elapsed time might not be reliable and the reliability of the data analysis might be questionable.


[0143] Among the many conceivable situations that can cause the actual test time to differ from the expected time, are: 1) incorrect feedrate, 2) circularity or center-offset errors that are so large that the deviations cause a stop-trigger to occur in the middle of the circle, and 3) lightly damped servo dynamics that result in overshoot or undershoot during the feed-in and feed-out moves. The expected total time between feed-in and feed-out triggers can be determined in advance by, for example, using motion control subsystem emulation (e.g., similar to the look-ahead/velocity manager/Kv emulation previously mentioned). The tolerance for comparing the measured time to the estimated time can be based on the uncertainty about the initial ballbar deflection prior to the feed-in move and the final ballbar deflection following the feed-out move. In one embodiment, the time to execute the emulation may be minimized, as it measures the elapsed time and distance covered during acceleration transients. The expected total time can also be used by, for example, the test coordinator FSM during test execution to detect an error condition where a feed-out trigger failed to occur when expected.


[0144] Run-test page 30 can also include numeric displays that indicate axis positions and, for example, an instantaneous ballbar measurement. It can also contain a graphical display 58 capable of indicating, for example, an instantaneous ballbar location. Such a display 58 might be useful for tracking the progress during the motion. Still further, another embodiment of run-test page 30 can include a display 60 of the part program blocks (e.g., those currently in a MDI buffer).


[0145] Referring now to FIG. 4, an analyze-data page 70 can be used to provide an interface for a user to view and manipulate an analyzed measurement. For example, a raw measurement can be stored in a data file that contains a header that describes the test conditions and relevant machine configuration at the time of the test. Analyze-data page 70 can have a file load/browse interface 72 that enables the user to load and perform analysis on a previously developed data file.


[0146] In an exemplary embodiment, when a test run is successfully completed, a data file developed during the run is automatically loaded, so that when the user switches from, for example, run-test page 30 to analyze-data page 70, the recently collected data is already loaded and analyzed. In one embodiment, whenever a raw data file is loaded, the data undergoes analysis processing. Data manipulation tasks performed for a file load according to one embodiment of the present invention involving ballbar testing are shown in the following list, and described further herein:


[0147] 1. Convert ballbar deflection to circle radius deflection (for cases where the circle radius differs from the nominal ballbar length).


[0148] 2. Estimate the circle angle for each data point.


[0149] 3. Estimate the circle center offset and circularity error (center offset errors could have been created when the center set screw was tightened, or by a servo drift).


[0150] 4. Estimate the error parameters and their statistical significance.


[0151] 5. Compute the model coherence statistic.


[0152] 6. Compute the relative contribution of each error type to the overall circularity error.


[0153] In an exemplary embodiment, some of the contents of analyze data page 70 associated with ballbar testing include: 1) displays 74 to reflect the test conditions reported in the file header, 2) an indication 76 of the center offset error, 3) an indication 78 of the circularity error, 4) a polar-error plot 80 of a center-corrected measurement, and 5) a legend 82 to identify traces on the polar-error plot 80. Polar error plot 80 can display, for example, the radius deviation from a reference circle as a function of circle angle. In one embodiment, error amplification is specified as the plot scaling (e.g., the number of microns per radial division on the polar plot's axes). The trace on polar plot 80 can be offset from the polar origin by some amount to make the plot readable. In an exemplary embodiment, the offset is specified as the percent of plot full range that defines the radius on the axes that should correspond to the average radius of the center-corrected measurement.


[0154] In still further exemplary embodiments, analyze-data page 70 contains slider controls 84, 86 and numeric-field edit boxes 88, 90 to enable a user to manipulate the scaling and offset used to generate the plot. The page can also contain an auto-scale button 92 that, for example, applies a standard offset and computes (and applies) a maximum amplification (minimum scaling) that results in a plot that is within the range of the display. According to one embodiment of the present invention, when a file is initially loaded, plot 80 is auto-scaled.


[0155] Analyze-data page 70 can also include the capability to simultaneously display plots of the results from two separate measurements (e.g., two separate data files) for comparison purposes. For example, two data sets can be classified as primary and reference data. A separate group of controls 94 for data file browse and load capability can be provided for the reference file, while statistics and error diagnostics can be displayed for the primary data. A swap button 96 can also be provided to allow for exchanging the primary and reference files. Furthermore, a button 98 to clear the reference file from the display can also be provided.


[0156] Referring now to FIG. 4A, in an exemplary embodiment, analyze-data page 70 contains a diagnostics button 100 that, when pressed, causes a new (e.g., diagnostics) window 102 to appear. Such a window 102 can contain, for example, a listing of error sources, their estimated values, and a checkbox for each error source. For example, checkboxes (e.g., checkbox 104) can be used to indicate whether polar error plot 80 should contain a contribution from the corresponding error source. In one embodiment of the present invention, the checkboxes are initially checked. Accordingly, unchecking such a checkbox (or several checkboxes) causes the estimated effect(s) of the error(s) to be removed from the measurement, and polar error plot 80 can be updated to reflect the adjusted measurement data. Diagnostics window 102 can also contain a checkbox 106 capable of enabling a user to select (or deselect) all the individual error components with a single click.


[0157] The described capability can, for example, allow a user to predict the degree to which applying compensation for one or more error types might improve the performance of the associated machine. One associated advantage could include determining which optional compensation capabilities to activate in a control.


[0158] Referring now to FIG. 4, in a further exemplary embodiment, analyze-data page 70 contains a cursor facility (such as one activated by pressing button 108) that aids a user in the task of manually assessing various aspects of the radial errors. The capability can be used to allow the user to place a polar cursor at any point on a trace on polar-error plot 80. Displays that indicate the angle and the deviation from the mean radius for the cursor point can also be provided.


[0159] Such a cursor may be controlled by, for example, a slider bar that increases or decreases the angular location, entering values into a numeric field for circle angle, touching (or clicking) a location on plot 80, or by pressing arrow keys on a keypad to increase or decrease the angular location. For example, when the cursor is moved by a slider control or arrow keys, it may be moved at either a slow speed (where the cursor-jump interval is a single measurement point) or at a high speed (where the cursor jump interval is a fixed amount of degrees (e.g., 5 degrees)).


[0160] Such a cursor facility might be useful when used in combination with a diagnostics capability for manually diagnosing cyclic errors that appear on, for example, ballbar plot 80. For example, cyclic errors can be isolated by using diagnostics window 102 to remove the effects of all the estimated error types. The amplitude and period of the remaining errors can then be manually identified with aid of a cursor.


[0161] Once again referring to FIG. 4A, in certain embodiments of the present invention, diagnostic window 102 can also be provided with the following functionality: 1) the ability to choose the order in which errors are displayed (e.g., either ranked based on relative contribution to overall error or grouped logically based on category), and/or 2) the ability to specify whether a numeric error value display should indicate either an error parameter or a contribution of that error to a total circularity error. Diagnostics window 102 can also contain readouts 110 for a measured circularity (e.g., a circularity error of the original (center-corrected) data), a corrected circularity (e.g., a circularity error of adjusted data that has error sources of the types whose checkboxes are checked), and/or a model coherence (e.g., a measurement of the ability of the error model to account for the content of the measurement data).


[0162] Referring now to FIG. 5A, an adjust-compensation page 112 can also be included that provides an interface for a user to change configuration data, such as that associated with, for example, certain types of axis compensation that have an effect on a ballbar measurement. For example, such a page 112 can contain a pull-down menu 114 for selecting a major plane (e.g., XY, XZ, YZ). Within such an adjust-compensation page 112, there can also be sub-pages associated with a particular type of compensation (e.g., six categories of compensation are described below).


[0163] In an exemplary embodiment of the present invention, within each category of error, a configuration data display 116 is provided that is limited to the axes involved in the major-plane circular move. The configuration data can be applied uniformly to all physical connections to the indicated logical axis (a detailed description of how cross-axis associations can be created for multiple physical connections to a logical axis is further provided herein). In the descriptions, the horizontal (H) and vertical (V) axes are defined differently depending on the major plane: {XY: H=X, V=Y}; {XZ: H=X, V=Z}; {YZ: H=Y, V=Z}). The displays can be used to indicate which axis is horizontal and which is vertical.


[0164] A horizontal axis cross-comp sub-page 118 such as that depicted in FIG. 5A can be included that contains configuration data to specify, for example, a straightness and squareness compensation that compensates a V-axis position as a function of a H-axis position. In one embodiment, the specific logical axes that form the association are indicated on the page header (e.g. Y=f(X)). Configuration items that can be on this page include: 1) squareness coefficient, 2) straightness coefficient, 3) H-coordinate of compensation origin, and 4) straightness compensation's range of applicability expressed in terms of ±displacement from the compensation origin.


[0165] Similarly, a vertical axis cross-comp sub-page can be included that contains configuration data to specify a straightness and squareness compensation that compensates, for example, an H-axis position as a function of the V-axis position. In an exemplary embodiment, the configuration items on this page mirror those on the horizontal axis cross-comp page discussed above and shown in FIG. 5A, except that they apply to the V-axis rather than the H-axis.


[0166] Referring now to FIG. 5B, a horizontal axis scale-error-comp sub-page 120 can be included that contains configuration data that is used to specify, for example, pitch-error or scale-error compensation of the H-axis. For example, such a page can indicate which axis is the H-axis for the particular major plane selected. The pitch or scale compensation can be achieved by creating an association for squareness/straightness compensation where the axis is associated to itself, the squareness compensation coefficient is the pitch-error coefficient, and the straightness compensation is disabled. In an exemplary embodiment, such a page also contains fields for pitch-error-comp coefficient and a compensation origin for the H-axis.


[0167] Meanwhile, referring now to FIG. 5C, a vertical axis scale-error-comp sub-page 122 can be included that contains configuration data that is used to specify scale-error-compensation for a V-axis. In an exemplary embodiment, such a page mirrors that of the horizontal axis-scale-error-comp page as described above, except that it compensates for scale errors in the V-axis instead of the H-axis.


[0168] Referring now to FIG. 5D, a lost motion compensation sub-page 126 can be further included that contains configuration data items for backlash compensation and windup compensation for the H and V-axes involved in the major plane circular move. In an exemplary embodiment, the specific logical axes associated with the H and V axes are indicated in a display.


[0169] Furthermore, and referring now to FIG. 5E, a friction comp adjustments sub-page 128 can be included that contains configuration data items for Coulomb-friction-feedforward parameters for the H and V-axes involved in the major plane circular move, for example. In an exemplary embodiment, specific logical axes associated with the H and V axes are indicated in a display.


[0170] In further exemplary embodiments, adjust-compensation page 112 can also contain a commit button 130 that copies the values from the (current-values) numeric fields to, for example, a database associated with the control and then, for example, issues a configuration-change system event to update the configuration data.


[0171] Adjust-compensation page 112 can also provide suggested values for changing existing compensation parameters. For example, each configuration parameter can be represented by three fields on the page: an original value field 132, a current value field 134, and a proposed value field 136. In an exemplary embodiment, each configuration item's current-value field is the source of that configuration item's value that is copied to a database when commit button 128 is pressed.


[0172] In one embodiment, the current-value field 134 is typically displayed. Meanwhile, in such an embodiment, the original-value and proposed-value fields 132, 136 can be displayed when parameter estimates for a primary file have been obtained from the most recent measurement and when the current database values for the compensation parameters are the same as those present during the most recent test. One associated advantage could be that this ensures that the compensation is adjusted using the appropriate data. One approach to accomplishing this involves displaying the original-value and proposed-value fields 132, 136 when each of the following two conditions are satisfied: 1) a primary file actively loaded (e.g., on analyze-data page 70) has a file-reference-number that matches a data-reference-number (a unique numeric string constructed at the beginning of test execution based on the test's major plane, date, and time) associated with the most recent test performed on the machine, and 2) the major plane selected on adjust-comp page 112 is the same as the major plane of the primary file.


[0173] According to such an embodiment, the file-reference-number can be extracted from a data file header when the file is loaded. When the file is originally created, the data-reference-number for the test can be copied to the file's header. The existing parametric compensation for the machine plane can also be captured at the beginning of the execution.


[0174] In an exemplary embodiment, when the currently loaded primary file is the result of the most recent measurement, and the selected major plane on adjust-comp page 112 corresponds to the plane of the most recent measurement, then fields 132, 136 for original and proposed values for each configuration item are displayed. In one embodiment, the numeric contents of these fields are not modifiable by the user. According to such an embodiment, the original value represents the value for the compensation parameter that was active when the data was collected. It can be copied from the snapshot of configuration that was taken at the beginning of test execution.


[0175] Meanwhile, the proposed value can be the value that was determined to be the correct adjustment to compensation. The proposed value can be computed based on the original value and the value for the associated error parameter as estimated from the measurement data. In an exemplary embodiment, adjust-comp page 112 provides the ability to copy the contents of the proposed value fields into the current value fields, to copy the contents of the original value fields to the current value fields, and to clear and disable the compensation for the current value fields. For example, buttons 138, 140, an 142 can be provided that are capable of respectively initiating each of these tasks when selected. In one such embodiment, each of these buttons could perform its operations for the fields on the current sub-page. Three additional buttons (e.g., buttons 144, 146, and 148) that perform these operations on all sub-pages can also be provided.


[0176] In addition to the development of the proposed values, the measured data can also be used to determine a measure of statistical significance for each of the proposed compensation parameters. As used herein, significance is a measure of whether an estimated error parameter is “significant” relative to the estimate for that error parameter's variance. Mathematics behind the development of the significance measure are further discussed herein.


[0177] Referring back to FIG. 5D, the significance for each of the proposed values can be displayed graphically, such as by a meter 150. In such an embodiment, a value that causes a needle of meter 150 to be high indicates that the proposed change to the compensation parameter is significant, while a value that causes the needle to be low indicates that the proposed change to the compensation parameter is insignificant.


[0178] In one embodiment of the present invention, the proposed value for a compensation parameter is determined by adding the (negative of the) latest estimated value for the error parameter to the compensation parameter that was active when the data was collected. Detailed descriptions of how the proposed values for each compensation parameter are developed are further provided herein.


[0179] A detailed analysis of the processing involved in an exemplary embodiment of the present invention involving ballbar testing is now provided. As part of the detailed description of the same by way of example, certain aspects of exemplary embodiments disclosed herein may be specific to a particular commercially available ballbar (the QC10 ballbar sold by Renishaw) and a particular motion control system (the A2100). One skilled in the art will, however, appreciate that embodiments of the present invention can be applied to, for example, other devices (including other ballbars) and control systems. In particular, certain of the embodiments to be further described herein relate to application software currently called Ballbar Autotuning for Parametric Compensation (ATB) and currently designed for use with the A2100 control, a detailed description of which will be provided herein as an illustrative example.


[0180] As an introductory matter, the QC10 ballbar outputs its data to a standard RS232 serial port. Certain exemplary embodiments to be discussed herein involve data collection and analysis running entirely within an operating system such as, for example, one currently sold under one of Microsoft Windows trademarks. In some of these embodiments, the real time measurement data from the ballbar is acquired at a constant sample rate and piped into memory accessible through the operating system. In this way, a contiguous data set may be obtained on a non-real time operating system.


[0181] Thus, with such an approach, ballbar data is not exactly synchronized to, for example, the real time internal data of the control. The type of analysis performed by certain embodiments of an exemplary embodiment as disclosed herein does not require synchronization of the ballbar data and internal control data. However, other embodiments of auto tuning might involve such synchronization.


[0182] With respect to the analysis of measured data in an exemplary embodiment of the present invention, the raw measurement data can undergo significant processing. For example, raw data can first be corrected for offsets between the center of rotation of the ballbar and the center of the circle. The circularity-error (a measure of the combined effect of all errors) can be extracted from the center-corrected data.


[0183] Next, estimates for the error parameters can be extracted from the data. During the parameter estimation, the coherence of the data can be determined. Once estimates for error parameters are obtained, individual effects of each error can be determined and the effect of the error may be removed from the data in response to, for example, user manipulation of the checkboxes of diagnostics window 102. Similarly, the relative impact of each error type on the overall circularity may be assessed.


[0184] Much of the data analysis involved in this specific example employs “curve-fitting” methods to extract parameters from the raw data. As used herein, the term “curve fitting” describes a process where the measured data is used to determine the parameters for a mathematical model of an assumed structure or framework. Ideally, curve fitting determines the values for the set of parameters in the mathematical model that have the maximum likelihood of having created the measured data.


[0185] For the parametric machine errors detected by an exemplary embodiment of the present invention, the curve fitting process involves a least-squares optimization. A least squares estimator can be a maximum likelihood estimator if each measurement error is normally distributed and each measurement error has the same variance. This might be untrue for the present case, but the least squares estimator can be used anyway because it tends to provide a decent result and there is no readily available alternative given the available a-priori information about the data. A relatively straightforward linear least-squares approach may be employed because the assumed structure of the radial error involves a linear combination in the model parameters.


[0186] A linear least squares formulation can be based on an overdetermined system where a linear combination of basis functions scaled by the model parameters yields the measurement. In this specific case, the basis functions can be functions of the (constant) nominal circle radius and the (varying) circle angle. The measurement can be a function of the radius measurements. The formulation may be written in matrix form as follows, where {P} is the m-element parameter vector, {f(r(t))} is the n element vector where each element is a function of measured ballbar radius at time t, and [A(R,θ(t))] is the n×m matrix whose columns are basis functions developed from the circle angle and nominal circle radius.


{f(r(t))}=[A(R,θ(t))]{P}  (1)


[0187] If n>m, Equation (1) represents an overdetermined system where there are more knowns than unknowns. This equation can be solved using the least squares technique which minimizes the sum of the squares of the errors between the modeled f(r) and the measured f(r).


Σe2={[A]{P}−f(r)}T·{[A]{P}−f(r)}  (2)


[0188] The solution for the parameter vector {P} that minimizes this quantity includes the least squares solution and can be written using the so-called normal equations.


{P}=[[A]T·[A]]−1·[A]T·{f(r)}  (3)


[0189] The solution involves inversion of the matrix [[A]T[A]]. This matrix has the properties of being real, symmetric, and positive-definite. These properties can be taken advantage of when finding a technique for inverting the matrix. The matrix inverse can be computed using Jacobi's method for finding the eigenvalues and eigenvectors of a real symmetric positive definite matrix.


[0190] Briefly stated, Jacobi's method involves successively applying rotation transformations to portions of the matrix until it is diagonalized. A full explanation of Jacobi's method is given in “Numerical Recipes in C” by Press, Flannery, Teukolsy and Vettering, which is hereby incorporated herein by reference. The Jacobi technique should work as long as the matrix is invertible. Another advantage of using Jacobi's technique for solving the normal equations is that it provides the eigenvalues of [A]T[A]. These eigenvalues can be used to determine the condition number of the matrix [A]—a factor related to the excitation provided by the axis motion.


[0191] The topics that follow related to the development of the equations that describe the effects of each parametric machine error on a ballbar radius measurement. Each of these equations can be combined into an individual overdetermined system formulation in such a way that the error parameters are estimated simultaneously. This approach minimizes possibility of incorrectly attributing measurement aspects to the wrong error type.


[0192] The equations can be developed in such a way to enable a description of the effect of each error type in terms of the measured ballbar radius. The following equations are developed for the case of the X-Y plane. These results are equally applicable to the XZ and YZ planes. The x and y designators used in this development may be interpreted to mean the horizontal and vertical axes of the circle-plane rather than the machine tool axes.


[0193] It is often the case that the circle center is not coincident with the center ball of the ballbar base fixture. These differences can occur if the center ball shifts when the set screw is tightened, if the servo offsets drift with time, the axis has a significant straightness error (discussed later), or any number of other reasons. In order to properly analyze the measurement, the effect of center offset can be considered along with other parametric error effects.


[0194] In an exemplary embodiment, center offset is not considered to be a machine error; it is considered to be an error associated with measurement. The formulation of the least squares equations for determining center offset can be developed by considering the equations for the length of the vector from the centering fixture location to a point on the ideal circle as a function of circle angle. The situation can be depicted graphically as shown in FIG. 6A. A polar error plot for the ballbar measurement with a center offset error contains a “kidney bean” signature of the type shown in FIG. 6B.


[0195] Examination of FIG. 6A leads to the development of the following equation for the measured radius r as a function of the circle angle θ, where R is the average circle radius that may differ from the programmed radius if the axes have scaling errors (discussed later).


(Rcos(θ)−ECTRX)2+(Rsin(θ)−ECTRY)2=(r(θ))2  (4)


[0196] The equation can be expanded to the following form.




R


2
−2RECTRXcos(θ)−2RE′(TRYsin(θ)+ECTRX2+ECTRY2=(r(θ))2  (5)



[0197] For the case of multiple measurements, the previous equation can be represented in the matrix form to accommodate the least squares solution.
1[-2cos(θ(t1))-2sin(θ(t1))1-2cos(θ(t2))-2sin(θ(t2))1-2cos(θ(tn))-2sin(θ(tn))1]{RECTR_XRECTR_YR2+ECTR_X2+ECTR_Y2}=((r(t1))2(r(t2))2(r(tn))2)(6)


[0198] The previous equation may be “solved” using equation (3) to obtain the parameter vector where the matrix to the left is [A], the 3×1 vector is P and the nx1 vector is f(r). The equation used to determine the circle center offsets also provides an average circle radius R. Three desired parameters, R, ECTRX, and ECTRY, may be extracted from the vector P by an iterative technique.


[0199] A first approximation of setting the quantity ECTRX2+ECTRY2 to be zero allows the parameters for the first iteration to be extracted directly. Typically, the center offset is very small relative to the circle radius and iterations are not needed. However, for the sake of robustness, an iterative algorithm can be made available in case it is needed. The iterative algorithm described below converges to the correct result as long as the ballbar center is inside the circle.


[0200] P=[ATA]−1ATr2


[0201] Rest=(P3)0.5,Restprev=0


[0202] ECTRX=P1/Rest, ECTRY=P2/Rest


[0203] Do Forever


[0204] Rest=(P3−(ECTRX)2−(ECTRY)2)0.5


[0205] If |Rest−Restprev␣>0.01 μ, Then, Break


[0206] ECTRX=P1/Rest, ECTRY=P2/Rest


[0207] Restprev=Rest;


[0208] Continue


[0209] Once the values for the circle center offsets are known, they can be used in manipulation of the raw ballbar radius data rraw to remove the effects of center offsets from the data. The center offset effects can be removed when computing the circularity statistic. An approximate equation for removing the effects of the center offsets can be obtained by examination of FIG. 6 and making the assumption that the angle of the ballbar relative to the horizontal axis is the same as the circle angle.




r


ctr









adj
(θ)={square root}{square root over ((rraw(θ)·cos(θ)+ECTRX)2+(rraw(θ)·sin(θ)+ECTRY)2)}  (7)



[0210] An equation for adjusting the measured radius for center offsets can be obtained by examining FIG. 6 and employing the law of cosines where the xce and yce designate the estimates for center offsets ECTRX, ECTRY.


[rctradj(θ)]2−(2{square root}{square root over (xce2+yce2)}cos(tan−1(yce,xce)−θ))·[rctradj(θ)]+(xce2+yce2−rraw(θ))  (8)


[0211] A solution for the center-adjusted radius is the positive root of the previous quadratic equation. The roots should be real as long as the center is inside of the circle. The circularity-error or circularity is a measure of the maximum deviation of the out-of-roundness of the circle. It can be defined as the maximum center-adjusted radius minus the minimum center adjusted radius.


circularity=max(rctradj(θ))−min(rctradj(θ))  (9)


[0212] In an exemplary embodiment, the computed circularity from the measurement is displayed. The circularity for data that has been mathematically manipulated in such a way that the effects of a combination of user-selected parametric errors can be removed can also be computed and/or displayed.


[0213] The most common machine tool design involves an arrangement where linear motion within a plane is effected by coordinating the motion of two individual linear displacement actuator mechanisms (axes) that are perpendicular to each other, i.e., the axes are square. The machine tool manufacturing process may result in a squareness error where the axes are not precisely perpendicular to each other as is intended. This deviation from perpendicularity is known as the squareness error or simply squareness.


[0214] The squareness error describes a relationship between the two axes in the plane with one squareness error per major plane. Individual proposed values for squareness compensation for each axis in the plane can also be developed by equally distributing the total squareness compensation among the two axes. The equation for the effect of a squareness error on the circle radius can be developed based on FIG. 7.


[0215] The coordinates of a point on the actual (non-circular) curve as a function of circle angle θ can be described by the following equations where R is the average radius which may differ from the programmed radius if the machine also has a scale error.




x
(θ)=R cos(θ)+R sin(θ)sin({fraction (1/2)}φ)−R cos(θ)sin(½φ)tan({fraction (1/2)}φ)  (10)





y
(θ)=R sin(θ)+R cos(θ)sin(½φ)−R sin(θ)sin(½φ)tan(½φ)  (11)



[0216] In these equations, the final terms on the right that involve the quantity sin(½φ)tan(½φ) are insignificantly small for small values of φ. This is a valid assumption for the amplitude of squareness errors found on most machine tools. The ballbar radius as a function of circle angle is the desired result and can be developed by computing the sum of the squares of the x and y components of the point on the curve and employing the aforementioned simplifying assumption.




r


2
(θ)=x2(θ)+y2(θ)  (12)





r


2
(θ)=R2(cos2(θ)+sin2(θ))(1+sin2(½φ))+2R2sin(θ)cos(θ)sin(½φ)  (13)



[0217] For small φ, the term sin2(½φ) becomes insignificant and the previous equation may be simplified to the following




r


2
(θ)=R2(1+2sin(θ)cos(θ)sin(½φ))  (14)



[0218] The parameter that describes the squareness error in the X-Y plane can be defined as the unitless proportionality factor sin(½φ). Analogous parameters can be obtained for the X-Z and Y-Z planes.




E


SQR









XY
=sin(½φ)  (15)



[0219] The following matrix equation is for an overdetermined system of equations represented as a linear combination of terms in the squareness parameter.
2((r(t1))2(r(t2))2(r(tn))2)=[2sin(θ(t1))cos(θ(t1))12sin(θ(t2))cos(θ(t2))12sin(θ(tn))cos(θ(tn))1]{R2ESQRR2}(16)


[0220] The axis squareness error is most often described as the perpendicular deviation in units of parts-per-million or equivalently microns/meter or inches/mil. This is the way the squareness compensation is represented and the way the squareness error can be displayed, such as on a screen. The conversion from the unitless squareness parameter to parts-per-million squareness can be obtained by multiplying the unitless parameter by 1 million.


squareness=1,000,000·ESQR(μ/m)  (17)


[0221] A conventional linear motion machine tool axis includes an accurate feedback measurement to move to the correct position. Axis scale errors can be created by an inaccurate feedback mechanism or an inaccurate parameter for converting a feedback measurement from, for example, a rotary device to linear displacement. One common linear axis mechanism involves a rotary motor that drives a ballscrew. A ball-nut converts the rotary motion to linear motion. The axis position may be estimated by measuring the motor angle and computing the axis position based on an assumed value for screw pitch. Alternatively, the axis position may be measured using a linear displacement sensor such as a glass scale, for example.


[0222] In the first case, differences between the assumed and actual pitch of the ballscrew can cause the axis to travel an incorrect distance due to this pitch error. In the second case, errors in the scale itself, due to factors such as thermal growth, for example, can cause the axis to travel to an incorrect position due to the scale error. Pitch error and scale error can cause an axis to travel a distance that is different than desired.


[0223] This type of error also appears on other axis mechanisms, such as rack-and-pinion and linear motor driven axes. The fundamental type of error experienced with these types of mechanisms is a position error that is linearly proportional to the distance traveled. The constant of proportionality may be represented using units such as parts-per-million (equivalent to microns/meter or mils/inch).


[0224] Effects of axis linear-scale-errors on circular motion in a plane are shown in FIG. 8. The figure shows the actual circle (not a polar error plot) for a case where the scale errors are very large relative to the radius. The figure shows how the two scale errors from each axis act together to create two effects: 1) a relative scale mismatch between the axes that causes the circle to be stretched or compressed in a direction parallel to the axis, and 2) an overall enlargement or reduction in the average (best-fit) radius of the (distorted) circle. The specific example shown in FIG. 8 is for a case where the scale error on the X axis is positive (the axis moves further than desired) and the scale error on the Y axis is negative (the axis moves a smaller distance than is desired). Since the (positive) X axis scale error is larger than the (negative) Y axis error, the average circle radius (best-fit-circle) is larger than the ideal circle radius.


[0225] The equations for the effect of each scaling error on the measured circle radius can be developed by first considering the x and y axes separately.




x
(θ)=Rprog cos(θ)(1+ESCLX), y(θ)=Rprog sin(θ)(1+ESCLY)  (18)



[0226] The square of the instantaneous radius is the sum of the squares of the x and y vector components. With the (valid) assumption that the square of the error parameters are insignificant, the following relation can be obtained.




r


2
(θ)=Rprog2+2Rprog2ESCLX cos2(θ)+2prog2ESCLY sin2(θ)  (19)



[0227] The above equation can be reconstructed as a nx2 matrix equation. This can be done if the ballbar is length calibrated such that the difference between r2(θ) and Rprog is meaningful.


[0228] In an exemplary embodiment, differences between x and y scaling errors are accounted for even if the ballbar is not length-calibrated. One approach involves transforming the individual X and Y scale errors into a scale mismatch error and an average radius. If the ballbar is not length-calibrated, then the estimate for average radius can be discarded. If the ballbar is length-calibrated, then the estimate for average radius can be used to extract the individual axis scaling errors from the scale mismatch error. The parameters in the new formulation have the following definitions:
3ESCL_XY=ESCL_X-ESCL_Y2,Ravg=Rprog(1+ESCL_X+ESCL_Y2)(20)


[0229] If the scaling error is small enough to make the square of the error terms insignificant, then the following equations for the x and y locations on the curve may be used. These equations assume that the circle is stretched in the x-direction; if the circle is actually stretched in the y-direction, then the scale mismatch parameter ESmismatch will be a negative number.




x
(θ)=Ravg cos(θ)(1+ESCLXY), y(θ)=Ravg sin(θ)(1−ESCLXY)  (21)



[0230] The sum of each component squared in the previous equation yields the expression for the instantaneous ballbar radius (where the error term squared can be once again ignored).




r


2
(θ)=Ravg2+2avg2(cos2(θ)−sin2(θ))ESCLXY  (22)



[0231] The previous equation can be represented in the following matrix form for measurements at corresponding times.
4((r(t1))2(r(t2))2(r(tn))2)=[2(cos2(θ(t1))-sin2(θ(t1)))12(cos2(θ(t2))-sin2(θ(t2)))12(cos2(θ(tn))-sin2(θ(tn)))1]{Ravg2ESCL_XYRavg2}(23)


[0232] If the ballbar is not length calibrated, then the estimate for Ravg is meaningless and the individual axis scale errors cannot be extracted from the scale mismatch errors. In this case, values for the individual axes' scale errors can be computed by assuming that each axis contributes equally toward the observed scale mismatch.




E


SCL









X


=E


SCL




—XY




, E


SCL









Y


=−E


SCL









XY
  (24)



[0233] If the ballbar is length calibrated, then the individual axis scale errors may be extracted using the following equations.
5ESCL_X=RavgRprog-1+ESCL_XY,ESCL_Y=RavgRprog-1-ESCL_XY(25)


[0234] The individual axis scale errors and the scale mismatch errors in the previous equation are unitless factors of proportionality. It is common, however, to represent these factors in parts-per-million units, also described as microns/meter or mils/inch. The conversion of a scale error (ESCLX, ESCLY, ESCLXY) from a unitless factor to a parts-per-million factor can be simply a matter of multiplying the scale error term by a factor of 106.


[0235] In the preceding discussions, it has been assumed that an axis' linear scale error is the phenomenon that can cause the average circle radius to differ from the ideal radius. The other parametric error types considered do not appear to affect the average circle radius. Specifically, the average circle radius does not appear to be affected by squareness errors, straightness errors, lost-motion errors, and servo mismatch errors.


[0236] There is, however, one phenomenon in addition to scale errors that does appear to affect the average circle radius. The dynamic characteristics of a position controller can result in amplitude attenuation (or amplification) that varies according to circle radius and feedrate. Position controllers have a low-pass frequency characteristic, and some may exhibit amplification at certain frequencies. Since the circle frequency is the per-second-feedrate divided by the radius, the frequency increases with increases in feedrate or reductions in nominal radius. For cases where the ballbar is length calibrated, an adjustment can be made to the estimate of average radius to account for the expected behavior of the position loop's dynamic response.


[0237] The expected behavior of the position loop response can be based on a number of approximating assumptions. The assumptions are expected to be reasonable for circle frequencies that are below the cutoff frequency of the position loop. Even the highest feedrate ballbar tests are expected to correspond to frequencies that are within the bandwidth of the axes for even the lowest gain controllers. For example, an axis with a Kv gain of 1.0 and no feedforward has a cutoff frequency of approximately 2.7 Hertz; for a circle radius equal to the minimum ballbar length of 100 mm, the feedrate associated with the cutoff frequency is 100,000 mm/min—a value beyond the capability of most machines and higher than what would typically be used during a ballbar test. The assumptions about the dynamic response of the axes can be as follows:


[0238] 1. Both axes that actuate motion in the circle plane have identical values for Kv and VFF.


[0239] 2. Both axes have identical amplitude response up to the cutoff frequency.


[0240] In 3. The effective Kv is identical to the nominal Kv adjusted by the Kvadjust.


[0241] 4. The axis dynamics are approximated as a continuous time system with an infinite bandwidth velocity loop.


[0242] Based on these assumptions, the effect of axis dynamic response on the average radius can be developed from the system shown in FIG. 9. A transfer function of this simplified model for a position controller is shown below.
6xfdbkxcmd(s)=(VFF/100)s+(1000Kv/60)s+(1000Kv/60)(26)


[0243] The amplitude scaling for a sinusoidal input of angular frequency ω can be determined by evaluating the magnitude of the transfer function at s=jω.
7&LeftDoubleBracketingBar;xfdbkxcmd(s=jω)&RightDoubleBracketingBar;=(VFFv/100)2ω2+(1000Kvv/60)2ω2+(1000Kvv/60)2(27)


[0244] For a constant feedrate circular move, the axis motion can be sinusoidal where ω=Feedrate/(60R). Since both axes are assumed to have identical responses, the radius amplitude scaling is identical to the axis amplitude scaling. Performing the substitution for ω, yields the final result for the radius scaling due to the position loop dynamic response.
8Ravgdyn=Rprog·(VFF/100)2(Feedrate/Rprog)2+(1000Kv/60)2(Feedrate/Rprog)2+(1000Kv/60)2(28)


[0245] The dynamic response can be factored into the estimate of the axis scale errors by measuring the overall scaling relative to the expected radius, given the programmed circle radius and the model for dynamic response.
9ESCL_X=RavgRprog(Feedrate/Rprog)2+(1000Kv)2(VFF/100)2(Feedrate/Rprog)2+(1000Kv)2-1+ESCL_XY(29)10ESCL_Y=RavgRprog(Feedrate/Rprog)2+(1000Kv)2(VFF/100)2(Feedrate/Rprog)2+(1000Kv)2-1-ESCL_XY(30)


[0246] An axis straightness error is a linear displacement error in a direction perpendicular to the axis containing the straightness error. Straightness errors can be treated in a similar way as squareness errors such that the linear displacement errors that have a direction that is parallel to the direction of one of the machine's linear axes (e.g., x, y, and z) are considered. In other words, the straightness errors can be considered for one machine major-plane at a time.


[0247] Straightness errors can be distinguished from squareness errors in that the relationship between the error in the direction of the perpendicular-axis relative to the position of the axis containing the error is non-linear. In the present discussion, the non-linear relationship is restricted to the case of a symmetric parabolic curve where the axis of symmetry passes through the location of the center of the circle in the ballbar test. The assumed structure for the straightness error of the X axis in the direction of the Y axis can be defined by the following equation, where the deviation caused by straightness errors is ΔY, X0 is the x coordinate of the center of the test circle, and ESTRXY is the X-axis straightness error factor for the Y directed component of straightness error.


ΔySTR(x)=ESTRXY(x−x0)2  (31)


[0248] The assumption that a straightness error is reasonably approximated by a parabolic curve can be based on experience with machine tools that has shown that axis guideways often have a fundamental straightness error that involves a bowing shape. Limiting the straightness error to include the fundamental component prevents the analysis from accounting for errors where the guideway has multiple bows or wiggles. Straightness errors that are more complex than a fundamental component can be handled using a data-based approach, such as developing tables based on laser measurements and employing the cross-axis error compensation.


[0249] The assumption that the parabola is symmetric about a line parallel to the perpendicular axis can be a reasonable one because the squareness error should account for the presence of any linear trend. The assumption that the parabola's axis of symmetry passes though the center of the test circle x0 is not based on any physical insight about the machine, since the location of the circle center is arbitrary and may change from test to test. This restriction can be included because it greatly simplifies the analysis, enabling the error parameters to be estimated from a single evaluation of the least-squares normal equations. This restriction does not limit the ability to identify error sources within the range of the ballbar test because an expansion of equation (31), shown below in equation (32), reveals that the choice of x0 may be arbitrary since it is a factor in: I) the linear trend accounted for by the estimate for squareness error and 2) a y-component of center offset accounted for by the estimate of center offset error.




E


STR









X









Y
(x−x0)2=(ESTRXYx2−(2ESTRXYx0x+(ESTRXYx02)  (32)



[0250] The choice for x0 may be arbitrary in the sense that the least squares approach should provide an optimal result by providing an estimate for squareness and y-center offset that accommodates the particular choice of x0 for straightness. However, the arbitrary choice for x0 makes extrapolation of the error model outside the range of the test invalid. Application of compensation based on the estimate to locations outside of the range of the test can easily cause larger errors to occur in these regions than those that might have occurred without any compensation.


[0251] The presence of the linear trend constant terms in equation (32) implies estimating the squareness error and center offset errors at the same time as the straightness error. Accordingly, in an exemplary embodiment, the center correction is not applied to the raw data prior to performing the diagnostics. This can be potentially important for data arcs that cover less than 360 degrees.


[0252] An example of a situation in the X-Y plane where the Y-axis has no straightness-error and the X-axis has a straightness error that complies with the assumptions is shown in FIG. 10. The plot shows how a straightness error might affect the shape of a curve on a polar error plot with a high degree of amplification. The equation for the distorted curve can be developed by applying the error from equation (31) to the equation for a circle where R is the actual best-fit circle radius that may differ from the nominal radius due to a scale error.




x=R
·cos(θ), y=R·sin(θ)+ESTRXY·(R·cos(θ))2  (33)



[0253] The square of the radius is the sum of the squares of the x and y coordinates of the curve. If terms involving the square of the straightness coefficient are ignored by assuming that the straightness error is small, then the following equation for circle radius as a function of angle can be derived.




r


2
(θ)=R2+2ESTRXYR3 sin(θ)cos2(θ)  (34)



[0254] An analogous equation for the impact of a Y-axis straightness error on the instantaneous circle radius may be derived in a similar manner. An equation for the effect of the Y-axis straightness error ESTRYX is shown below.


r2(θ)=R2+2ESTRYXR3 cos(θ)sin2(θ)  (35)


[0255] The combined effect of both planar straightness errors is shown below with the equations written for multiple measurements in matrix form. (36)
11{r2(t1)r2(t2)r2(tn)}=[2sin(θ(t1))cos2(θ(t1))2cos(θ(t1))sin2(θ(t1))12sin(θ(t2))cos2(θ(t2))2cos(θ(t2))sin2(θ(t2))12sin(θ(tn))cos2(θ(tn))2cos(θ(tn))sin2(θ(tn))1]·{&AutoLeftMatch;R3ESTR_X_YR3ESTR_Y_XR2}


[0256] As mentioned previously, the estimation of straightness errors can be performed simultaneously with the estimation of squareness and center offset; thus, in an exemplary embodiment, the previous matrix equation is not used directly. A global matrix equation that simultaneously estimates the parameters is further provided herein.


[0257] A servo mismatch error is an error created due to a difference in the dynamic response between the two axes of the circle plane. The dominant effect of servo mismatch is a phase mismatch. A previous discussion herein described how the amplitude response of an axis is expected to be flat beyond the highest conceivable circle frequency, even for low Kv gains. This means that the Kv gains may be mismatched without creating a mismatch in the amplitude response.


[0258] However, this is not the case for the phase response which, for a position loop without feedforward, begins to roll off immediately. For any given circle-frequency, i.e., feedrate/radius, the phase difference between the sinusoids for the x and y axes is desired to be 90 degrees, but may differ from this ideal amount by some constant deviation. The constant deviation should vary with circle frequency, and, in most cases, the deviation is more likely to be significant as the circle frequency is increased (but the relationship is not necessarily monotonic).


[0259] The phase deviation can be caused by mismatches in the effective position loop gain, velocity loop response, or both. It is not conventionally possible to diagnose the source of the phase mismatch with a single ballbar measurement—which can be accomplished by performing frequency response measurements for each axis individually. Even though no attempt to propose a compensation for an observed servo mismatch error is made, a servo-mismatch error can be computed because it informs the user that such an error is present, prevents servo mismatch errors from being falsely attributed to other error types, and allows the user to gauge the servo-mismatch error's impact on the circularity and to predict the improvement that might be accomplished if the error were removed.


[0260] The combined phase error between the two axes during a constant feedrate circle may be represented by the following equation where the total phase error φ is equally divided among the two axes by assuming a half Q lead on the X axis and a half φ lag on the Y-axis. For a counter-clockwise move, the circle angle θ increases with time (i.e., the frequency dθ/dt=ω is positive). For clockwise moves, the reverse is true—the frequency is negative. Equations for these two cases can be shown below.
12XCCW(t)=R·cos(ωt+12φ(&LeftBracketingBar;ω&RightBracketingBar;)),YCCW(t)=R·sin(ωt-12φ(&LeftBracketingBar;ω&RightBracketingBar;))(37)XCLW(t)=R·cos(-ωt+12φ(&LeftBracketingBar;ω&RightBracketingBar;)),YCLW(t)=R·sin(-ωt-12φ(&LeftBracketingBar;ω&RightBracketingBar;))(38)


[0261] In these equations, ω is the per-second feedrate divided by the programmed radius and, as mentioned, φ is expected to be constant for a given fixed value of |ω|. The analysis will proceed first for the counter-clockwise (positive-frequency) case. The results for the clockwise case can be derived in an analogous manner. The square of the radius for the counter-clockwise case is the sum of the squares of the axis locations. In the following equation, the term cot is replaced by the circle angle θ.
13rCCW2(θ)=R2·(cos2(θ+12φ(&LeftBracketingBar;ω&RightBracketingBar;))+sin2(θ-12φ(&LeftBracketingBar;ω&RightBracketingBar;)))(39)


[0262] The previous equation can be simplified by employing some trigonometric identities to the following form.




r


CCW


2
(θ)=R2+R2·2sin(θ)cos(θ)sin(φ)  (40)



[0263] Now returning to the clockwise case, the equation (38) can be reformulated by changing the sign of the arguments of the sine and cosine functions.
14XCLW(t)=R·cos(ωt-12φ(&LeftBracketingBar;ω&RightBracketingBar;)),YCLW(t)=-R·sin(ωt+12φ(&LeftBracketingBar;ω&RightBracketingBar;))(41)


[0264] These equations can be used to obtain the following result for the instantaneous radius of the clockwise circle.




r


CLW


2
(θ)=R2−R2·2 sin(θ)cos(θ)sin(θ)  (42)



[0265] The impact of a servo mismatch error on a polar error plot is shown in FIG. 11.


[0266] Comparison of equations (40) and (42) to equation (14) indicates that the formulation for servo mismatch error can be the same as the formulation for squareness error. This means that the two errors can be indistinguishable unless data for both clockwise and counterclockwise measurements are present in the matrix formulation. Thus, in an exemplary ballbar test, each measurement contains both a clockwise and counter-clockwise run, and for the sake of equal weighting, both runs cover the same data-range. This can be accomplished by “stacking” the matrix with rows developed from the counter-clockwise measurement on top of rows developed from the clockwise measurement. In the following equation, the superscripts clw and ccw on the i'th measurement indicator ti are used to identify whether a measurement is from a clockwise or counter-clockwise test.
15{r2(t1ccw)r2(t2ccw)r2(tnccw)r2(t1clw)r2(t2clw)r2(tnclw)}=[2sinθ(t1ccw)·cosθ(t1ccw)12sinθ(t2ccw)·cosθ(t2ccw)12sinθ(tnccw)·cosθ(tnccw)1-2sinθ(t1clw)·cosθ(t1clw)1-2sinθ(t2clw)·cosθ(t2clw)1-2sinθ(tnclw)·cosθ(tnclw)1]{R2sin(φ)R2}(43)


[0267] Lost motion describes an error that commonly exists in an individual axis mechanism that is caused by looseness in the mechanical components and linkages. When an axis with a lost motion error reverses its direction of motion (sign of velocity), the position of the end-point lags the position of the motor. The A2100 control identifies and compensates for two classes of lost motion, backlash and windup.


[0268] Backlash is a type of lost motion that is present regardless of whether the axis is in motion or at rest. That is, it persists after the axis has come to a stop. Windup is a type of lost motion that exists when the axis is in motion where the axis appears to creep to the correct position after the motor has stopped. An explanation of the differences between windup and backlash and how they can be compensated is given in U.S. Pat. No. 6,060,854, entitled “Method and Apparatus for Compensating for Windup in a Machine,” issued to Stephen J. Yutkowitz, the entire disclosure of which is incorporated herein by reference.


[0269] Both types of lost motion exhibit nearly indistinguishable signatures on a ballbar plot and cannot conventionally be separately identified based on a single ballbar circle-test measurement. An additional test that uses the ballbar to allow the two types of lost-motion to be distinguished from each other has been developed and can be called the backlash-test. In an exemplary embodiment, the backlash test is a separate type of test from the circle-test whose measured data has been the topic of discussion up to this point. An explanation of how to estimate the total lost motion error from the circle-test data will be presented first, then an explanation for the backlash test will be given.


[0270] The parametric description of total-lost motion makes the assumption that the lost motion parameter does not vary with axis position or velocity (as long as there are no full stops). Axis lost motion of the backlash type that does vary with position can be handled (e.g., in the A2100 by the bidirectional compensation capability whose data-tables are developed from laser measurements).


[0271] An effect of lost-motion on circular motion is shown in FIG. 12. The specific example shown in FIG. 12 is for a case with a very high amount of backlash on the Y-axis and no backlash on the X-axis. Unlike many of the previous plots, FIG. 12 is not a polar-error plot; it is a plot of the actual circular contour.


[0272] The plot of FIG. 12 shows the contour for clockwise motion. The case for counter-clockwise motion should look like the current plot reflected about the Y-axis, as can be imagined. The center-corrected curve is simply the actual curve shifted downward such that its geometric center corresponds to the center of the ideal circle. The actual y-coordinate of the curve center depends on the direction from which the ballbar center fixture was approached when the circle center was defined during the fixturing phase of the ballbar test.


[0273] Examination of FIG. 12 indicates that the total lost motion error ETLM causes a flat area following the axis reversal where the motion of the Y-motor does not result in any Y-axis motion while the X-axis moves with no error. This flat area can cause the best-fit circle to have a radius that is somewhat less than the radius of the programmed circle. It will be shown that for the type of data generated by an exemplary embodiment of the present invention, the amount of “shrinkage” caused by lost motion should be insignificantly small compared to the total lost motion error and need not be considered when determining the absolute scale errors. The command circle angle that defines the distance from the reversal where the (Y-axis) motion begins can be well approximated by the following equation when the ratio of ETLM to R is fairly small.
16cos(α)=R-12ETLM_YR+12ETLM_Y


[0274] For actual measurements on conventional machine tools, a minimum circle radius can be about 100 mm and the largest expected lost-motion error should be well below about 0.2 mm. Thus, the maximum conceivable value for the angle cc should be less than about 2 degrees. This confirms that the amount of shrinkage of the best-fit-circle radius due to lost motion should be insignificant relative to the lost motion error itself and need not be considered.


[0275] The observation that the flat area, STLM, covers a small percentage of the total circle also suggests that the exact shape of the curve just after the reversal (henceforth referred to as the transient portion) need not be considered by the technique for estimating the total lost motion from a ballbar measurement (since, e.g., a built-in requirement could be that the data arc is relatively large). Nevertheless, a good approximate representation of the transient portion can be useful when attempting to predict how backlash or windup compensation might improve circularity. The predicted effect of compensation can be obtained by subtracting a curve developed from the model parameter from the measurement curve, wherein it is desired to closely match the model to the actual transient. Thus, for a clockwise circle with a y-axis lost motion error, the following set of equations applies.




x
(θ)=R cos(θ)  (44)


17







y
clw



(
θ
)


=

(











R





sin






(
θ
)


+


1
2



E
TLM_Y



,












-

1
2



π


θ
<



1
2


π

-
α






(
a
)












R
-


1
2



E
TLM_Y



,













1
2


π

-
α


θ
<


1
2


π






(
b
)













R





sin






(
θ
)


-


1
2



E
TLM_Y



,












1
2


π


θ
<



3
2


π

-
α






(
c
)













-
R

+


1
2



E
TLM_Y



,













3
2


π

-
α


θ
<


3
2


π






(
d
)









(
45
)










[0276] The equation for the radius squared as a function of circle angle can be obtained by summing the square of the x and y components. The estimation of the total lost motion error may be based on regions (a) and (c) in equation (45) because regions (b) and (d) are very small and should not significantly bias the result if their effects are ignored. As a practical matter, the angle ox is not known until ETLM is known, so the transient effects cannot be considered until a first approximation in an iterative method is obtained. The approximate equation for the radius squared can thus be obtained by applying the equation for region (a) to both regions (a) and (b), and by applying the equation for region (c) to both regions (c) and (d). The following equation can be developed by assuming that the lost-motion squared terms are insignificantly small.
18rclw2(θ)=(R2+Rsin(θ)ETLM_Y,-12πθ<12πR2-Rsin(θ)ETLM_Y,12πθ<32π(46)


[0277] The results for the counter-clockwise circle may be analogously obtained and can be shown below.
19rccw2(θ)=(R2-Rsin(θ)ETLM_Y,-12πθ<12πR2+Rsin(θ)ETLM_Y,12πθ<32π(47)


[0278] The equations for estimating the lost motion errors of the X-axis may also be obtained using similar techniques or by replacing θ with (θ+½π) in the previous equations.
20rclw2(θ)=(R2-Rcos(θ)ETLM_X,0θ<πR2+Rcos(θ)ETLM_X,πθ<2π(48)rccw2(θ)=(R2+Rcos(θ)ETLM_X,0θ<πR2-Rcos(θ)ETLM_X,πθ<2π(49)


[0279] Equations that are analogous to (45) for the counter-clockwise y-axis case and for both x-axis cases can also be developed, but are not shown here. The matrix equation for total lost motion presented below includes factors for lost motion on both axes. In the equation, the notation QI, QII, QIII, QIV are used to represent the circle quadrants (where the measurement data is segregated into quadrants). (50)
21{r2(t1ccwQI)r2(tnccwlccwQI)r2(t1ccwQII)r2(tnccwIIccwQII)r2(t1ccwQIII)r2(tnccwIIIccwQIII)r2(t1ccwQIV)r2(tnccwIVccwQIV)r2(t1clwQI)r2(tnclwlclwQI)r2(t1clwQII)r2(tnclwIIclwQII)r2(t1clwQIII)r2(tnclwIIIclwQIII)r2(t1clwQIV)r2(tnclwIVclwQIV}=[+cos(θ(t1ccwQI))-sin(θ(t1ccwQI))1+cos(θ(tnccwIccwQI)-sin(θ(tnccwlccwQI))1+cos(θ(t1ccwQII))+sin(θ(t1ccwQII))1+cos(θ(tnccwIIccwQII))+sin(θ(tnccwIIccwQII))1-cos(θ(t1ccwQIII))+sin(θ(t1ccwQIII))1-cos(θ(tnccwIIIccwQIII))+sin(θ(tnccwIIIccwQIII))1-cos(θ(t1ccwQIV))-sin(θ(t1ccwQIV))1-cos(θ(tnccwIVccwQIV))-sin(θ(tnccwIVccwQIV))1-cos(θ(t1clwQI))+sin(θ(t1clwQI))1-cos(θ(tnclwIclwQI))+sin(θ(tnclwIclwQI))1-cos(θ(t1clwQII))-sin(θ(t1clwQII))1-cos(θ(tnclwIIclwQII))-sin(θ(tnclwIIclwQII))1+cos(θ(t1clwQIII))-sin(θ(t1clwQIII))1+cos(θ(tnclwIIIclwQIII))-sin(θ(tnclwIIIclwQIII))1+cos(θ(t1clwQIV))+sin(θ(t1clwQIV))1+cos(θ(tnclwIVclwQIV))+sin(θ(tnclwIVclwQIV))1]{R·ETLM_XR·ETLM_YR2}


[0280] An example for a polar-error plot for clockwise and counterclockwise moves on a machine with lost motion on both X and Y axes is shown in FIG. 13. The post-reversal transient portions for this synthesized example are very similar to the post-reversal portions of measurements on actual machines. In the example, the best-fit circle and the ideal circle are so-similar that they are substantially indistinguishable, as was expected based on the argument of insignificantly small circle shrinkage.


[0281] Up to this point, the discussion has been limited to the identification of the total lost motion from a continuous motion circle-test measurement. Experience with these measurements indicates that there is no substantially detectable difference between the effect of the backlash and windup components of total lost motion. In order to separately identify each of these errors, an additional backlash test can be employed.


[0282] An exemplary backlash test involves a sequence where the ballbar is used to detect the lost motion that occurs when the axis moves to position stops and dwells (as previously described). The windup error for an axis can then be computed by subtracting the measured backlash from the estimate for total lost motion. If a backlash test is not performed, backlash can be assumed zero and the measured lost motion from the circle-test attributed to a windup error. For example, this could be based on the assumption that the machine is properly compensated for backlash using bidirectional compensation.




E


windup









X


=E


TLM









X


−E


backslash









X




[0283] Friction on a machine tool axis can be the source of a transient error following axis reversals. Currently, for example, the A2100 employs friction compensation algorithms as part of its integrated feedforward capability. The A2100 friction compensation assumes that the friction forces and torques acting on the axis are reasonably represented by a Coulomb+viscous friction model.


[0284] A torque discontinuity due to Coulomb friction occurs after an axis reversal and results in a transient error where the axis lags the command for some period of time until the integrator in the velocity control loop builds up to contain a torque that counters the friction torque. In general, the size of the transient error increases with the friction level and decreases with the velocity loop's proportional and integral gains. A description of how to iteratively tune the friction compensation based on a ballbar measurement is described in the A2100 Installation Service & Support Manual (referred to hereinafter as the “ISS manual”), which is hereby incorporated by reference.


[0285] An effect of Coulomb friction errors on a ballbar plot is an increase in the circle radius following the reversal for some angle until the servo detects the error and the radius returns to the desired value. A signature of a friction reversal error on a polar-error plot is shown in FIG. 14.


[0286] In contrast to the effect of lost motion, friction errors can cause the best-fit radius to be slightly larger than the ideal radius. The amplification of the best fit radius over the ideal radius relative to the magnitude of the friction reversal error depends mostly on the angular duration of the friction error, which itself is related (primarily) to the velocity loop's integrator time constant and the circle frequency. To assess the degree to which friction errors may bias the best fit radius, a worst case scenario could be considered to get an approximate value for the largest expected angle of the reversal spike.


[0287] For example, the anticipated highest circle frequency should occur at a minimum ballbar radius of about 100 mm and a maximum anticipated feedrate of about 15,000 mm/min—making the frequency about 2.5 rad/sec. Experience shows that the integrator time constant is typically less than about 0.020 sec. The duration of the reversal error is considered to be significant over two integrator time constants. The angular distance traveled in two time constants can thus be about 0.040 sec*2.5 rad/sec=0.10 rad or 5.7 degrees. Even for the worst case scenario, the friction error should not significantly amplify the best-fit radius relative to the amplitude of the friction error itself.


[0288] In another embodiment of the present invention, algorithms for estimating the parameters associated with the friction errors can also be included. The results for friction compensation parameters obtained via feedforward auto-tuning can often be improved upon by performing some manual adjustments based on ballbar measurements. The manual adjustments can be typically performed based, for example, on the procedure outlined in the ISS manual. An explanation for why the results of the feedforward auto tuning may be improved by further manual tuning is that the transient friction forces/torques that occur during an axis reversal are more complex than the assumed step discontinuity at zero velocity. The exact nature of these transient friction torques may be very complex and may be a function of a number of state variables including the positions, velocities, and accelerations of a number of bodies in a multi-body system.


[0289] This complex behavior may be partially approximated by adjusting the amplitude and time constant of friction compensation (feedforward) to differ from the ideal values obtained from feedforward auto-tuning's torque measurements and measurements of the response of the velocity loop compensator. This observation has led to the addition of a Coulomb-Width-Adjust parameter to the set of feedforward parameters to enable adjustments of the friction compensation time constant without affecting the other types of feedforward that operate directly on the integrator time constant (acceleration and viscous friction feedforward). Thus, the ballbar measurement may be used to determine an optimal value for the Coulomb-Width-Adjust parameter, given that the feedforward-auto-tuning process has already been performed and has resulted in a value for the estimate of the integrator time constant.


[0290] In one embodiment, the ability to estimate friction parameters (e.g., amplitude and time constant) directly from a measurement of a machine without any active friction compensation can be included (e.g., if a precise estimate of the circle angle for every measurement can be obtained). For example, such an algorithm could first remove known error types from the data using the techniques described below. Next, the radial error in the immediate region of the axis reversal could be converted to deviation of the reversing axis and the corresponding angles could be converted to the time since reversal. Then, an iterative process can begin by selecting a candidate value for the time constant τ (inverse of integrator gain) and performing a simulation based on this time constant. A model used to develop the simulation is shown in FIG. 15.


[0291] The transfer function for the position error in response to a friction force signal can be derived from the block diagram in FIG. 15 and can be shown in equation (51) below. The DC amplitude of this transfer function is arbitrary. The transfer function formulation may be used to develop a numerical solution to the associated linear differential equation.
22e(s)f(s)=ss3+KPs2+KP(1τ+KV)s+KVKPτ(51)


[0292] The known axis Kv, an assumption that Je≈J (where Je is an inertia estimate from feedforward auto tuning and J is actual total axis inertia), and an estimate for the axis Kp (velocity loop proportional gain) can be used to develop an estimate for the error-transient versus time function of the data sequence for the axis error transient following a reversal. The scaling of such a time sequence might be arbitrary since the friction torque is initially unknown. The value for Kp need not be very precise as the pulse shape is quite insensitive to this parameter (assuming the velocity servo is reasonably well tuned with a phase margin of more than 40°). The simulation parameter for Kp can be the same as the iff_kp_estimate.


[0293] The amplitude of the estimated transient can be determined using least squares to obtain an optimal scaling between the arbitrary-amplitude simulated transient and the y-axis deviation sequence derived from the measured radius. The sum of the residual errors squared can be computed and retained. Residual errors can be computed for a number of selections for the time constant as part of an iterative optimization process. The time constant and associated amplitude that results in the minimum sum-of-residual-error-squared can be chosen as the estimated friction parameters. The process can be constructed to simultaneously include available measurements of reversals of the axis under consideration.


[0294] A potential problem with the above-described procedure for estimating the friction reversal error can be that it might not be valid for cases where, for example, the friction compensation is actively applied during the ballbar measurement. The ballbar measurement is expected to have the most value in determining an adjustment to nominal values for friction compensation parameters obtained via feedforward auto-tuning. Thus, in an exemplary embodiment, a ballbar measurement will be performed under circumstances where friction compensation is actively applied during the measurement.


[0295] If the friction compensation that is applied is not optimal, then some error at the reversal might occur, and such an error might be more complex than the type produced when friction compensation is turned off. One approach to take in this case could involve attempting to remove the effects of friction compensation. However, the effects of friction compensation are not easily removed from the data because the DC scaling of the transfer function may no longer be arbitrary. This means that a 1-dimensional optimization problem could become a 2-dimensional optimization problem.


[0296] One solution could include automatically applying the iterative manual tuning procedure outlined in the ISS manual. Such an approach could iteratively execute the following sequence: 1) perform a ballbar measurement, 2) isolate the reversal errors, 3) use heuristic rules to determine whether to increase or decrease the Coulomb-Width-Adjust and whether to increase or decrease the Coulomb-Friction-Level, 4) perform a model-based curve fitting to determine candidate values of these parameters for the next iteration, 5) configure the friction feedforward with these new values, and 6) return to step 1. The iterative sequence can be exited once the errors are below a defined threshold or the improvements obtained between iterations become insignificant.


[0297] Estimation of the friction-related parameters is a capability that could be useful for the purpose of data analysis in ranking the impact of different errors on the overall circularity. It could be used to auto-tune friction compensation for systems where feedforward-auto-tuning is unavailable. For systems where feedforward-auto-tuning is available, it could, for example, be used to propose modifications to the friction compensation parameters obtained via a previously run feedforward-auto-tuning test.


[0298] The preceding discussion developed the equations for the individual error types by assuming that each of these error types was the one existing in a measurement. In real applications, the error types occur simultaneously and are present in some proportion. In order to get an optimal estimate for each error types, the effect of all known errors can be considered simultaneously. This can be accomplished by formulating a single matrix equation that includes the effects of all known errors.


[0299] The matrix of basis functions can contain, for example, ten columns, with each column containing a basis function for one of the following exemplary parameters:


[0300] 1. X axis center offset.


[0301] 2. Y axis center offset


[0302] 3. XY Squareness Error


[0303] 4. XY Scale-mismatch error


[0304] 5. XY Servo mismatch


[0305] 6. X Straightness Error


[0306] 7. Y Straightness Error


[0307] 8. X Total Lost Motion


[0308] 9. Y Total Lost Motion


[0309] 10. Best Fit Radius


[0310] The matrix equation can be formulated by simply combining each of the matrix equations previously discussed. Since the servo-mismatch and lost-motion estimate includes separate treatment of data based on circle direction, the data can be segregated into clockwise and counter clockwise segments. Additionally, the total lost motion estimate involves separate treatment of data based on quadrant, with the data being further partitioned based on circle quadrant (estimate angle). Partitioning of this type has already been described during the discussion of lost motion estimation as seen in equation (50).


[0311] A combined matrix equation for simultaneous estimation of all parameters is shown below. To enable the equation to fit on the page, the data partitioning is not explicitly shown (the ± symbols are used to designate matrix columns whose basis function depends on direction and/or quadrant).
23{r2(ti)}=[{-2cos(θ(ti))}T{-2sin(θ(ti))}T{cos(θ(ti))sin(θ(ti))}T{2(cos2(θ(ti))-sin2(θ(ti)))}T{±2cos(θ(ti))sin(θ(ti))}T{2sin(θ(ti))cos2(θ(ti))}T{2cos(θ(ti))sin2(θ(ti))}T{±cos(θ(ti))}T{±sin(θ(ti))}T{111}T]T·{R·ECTR_XR·ECTR_YR2·ESQR_XYR2·ESCL_XYR2·sin(φsvo)R3·ESTR_X_YR3·ESTR_Y_XR·ETLM_XR·ETLM_YR2}(52)


[0312] The following symbolic matrix equation can be used to describe the previous specific equation.


{r2(t)n×1)=[A]n×10)·{P}(10×1)  (53)


[0313] The estimation of the above ten parameters can be accomplished by applying the least squares solution of equation (3) to equation (52) above. In the following equations the ˆ symbol is used to designate a parameter as being an estimated value.


{{circumflex over (P)}}=[[A]T[A]]−1[A]T{r2}  (54)


[0314] The inversion of the matrix ATA may be accomplished using eigenvalues and eigenvectors obtained by Jacobi's technique. Using the Jacobi technique has the advantage that it provides the eigenvalues of [ATA], which are used in the computation of the condition number as described below.


[0315] Once the matrix is inverted, the scaling of the parameter by powers of the best fit radius can be removed by multiplying each parameter by the appropriate power of the inverse of the best-fit radius obtained by square-rooting the final element of the parameter vector.
24R^=P^10,ECTR_X=P^1R^,ECTR_Y=P^2R^,ESQR_XY=P^3R^2,ESCL_XY=P^4R^2φsvo=sin-1(P^5R^2),ESTR_XY=P^6R^3,ESTR_YX=P^7R^3,ETLM_X=P^8R^,ETLM_Y=P^9R^(55)


[0316] Examination of the matrix [A] in equation (52) reveals that there are opportunities in the formulation for some columns to be redundant with other columns. If a column is not unique, then the parameter associated with that column cannot be uniquely identified and the least squares solution to the matrix equation fails to exist. The columns can be made unique by ensuring that the data arc is sufficiently large and that both clockwise and counter-clockwise data is present.


[0317] An indicator of the overall uniqueness of the columns in the matrix formulation is the matrix condition number (the ratio of the maximum singular value to the minimum singular value). The singular values may be obtained by computing the square root of the eigenvalues of the [A]T[A]] matrix (from equation (3)). The condition number for a given set of test conditions can be normalized based on the (best case) condition number for a full 360 degree data arc in both directions.


[0318] A statistic called the “excitation” is defined as the inverse of the normalized condition number. A test for the sufficiency of excitation provided by a collection of test setup parameters might be to compare excitation statistic to a threshold. When an inappropriate set of test conditions is proposed by the user, the excitation falls below a predefined threshold and the test conditions can be rejected.
25{λ}=eig[([A])T[A]],CNUM=λmaxλmin,excitation=CNUMCNUM(360°clw&ccw)(56)


[0319] A plot of the excitation as a function of data arc length for a data arc starting at 0.0 is shown in FIG. 16. Similar plots for other (non-zero) data start angles are very similar to the one shown in FIG. 16. The plot indicates that the best excitation is obtained for a data arc whose length is greater than about 280 degrees. The minimum acceptable excitation allowed for by the test setup validity test can be chosen to be about 0.2 or approximately 220 degrees of data arc.


[0320] Some data analysis tasks provided as described by example herein involve computing a synthesized value for the ballbar radius for each angle at which a ballbar radius measurement has been taken. The sequence of synthesized radii can be referred to as rsynth(t). The synthesized radius sequence can be used by the following analyses: 1) modeling coherence, 2) ranking the relative impact of each error type on the overall circularity error, 3) predicting how the circularity error would change if a selected combination of axis compensations were employed, and/or 4) estimating the measurement variance used to determine the significance of each estimated parameter.


[0321] The synthesized radius vector can be obtained by evaluating equation (52), where the parameter vector is populated with the estimates, and performing the square-root of the result. The synthetic data can then be modified at the axis reversals to account for the lost motion transients of the type described by equation (45)b and (45)c. The data following the reversal can be modified by computing the radius for a constant axis deviation over the region defined by the angle a. The following equations describe how the synthetic data can be generated.
26{rsynth(θ)}=[A]·{P̑}(57)α^X=cos-1(R^-12E^TLM_XR^+12E^TLM_X),α^Y=cos-1(R^-12E^TLM_YR^+12E^TLM_Y)(58)rsynth(θ)={R^2sin2(θ)+(R^-12E^TLMX)2''clw:-α^Xθ<0orπ-α^Xθ<πccw:0θ<α^Xorπθ<π+α^X(59)rsynth(θ)={R^2cos2(θ)+(R^-12E^TLMY)2''clw:π2-α^Yθ<π2or3π2-α^Yθ<3π2ccw:π2θ<π2+α^Yor3π2θ<3π2+α^Y(60)


[0322] In the previous equations, the value for mean radius was for the case where all errors, except for the lost motion under consideration, are present in the data set.


[0323] The sequence of synthesized radii can be used to demonstrate what is expected to occur in the absence of certain error types or combinations of error types. As described earlier, for example, analyze-data page 70 can allow a user to select a combination of error types to be removed from the measurement (e.g., by checking or unchecking checkboxes to designate the desired combination). For example, when a checkbox is checked, the associated error type can be included in the predicted-radius polar-error plot. When it is unchecked, the effect of the corresponding error can be removed. In this way, the user can get a realistic idea of how application of compensation can improve performance by removing the known error effects from measured data that may contain error types for which no compensation is available.


[0324] The first step in constructing the predicted radius sequence can be to compute the residual error by subtracting elements of the synthesized radius sequence from corresponding elements in the measured radius sequence. The residual error can then be added to a second synthesized radius sequence rsynthpartial that can be created by zeroing all elements of the {P} vector except for those whose error types remain (e.g., those checked on diagnostics window 102). If an axis lost motion error is included, then modification of the synthesized sequence can be performed by employing equations (59) and (60) for the axis or axes whose lost motion error should be included in the prediction sequence.


[0325] In an exemplary embodiment, checkboxes for the center offset errors are not provided because the center offsets are not machine errors and the predicted radius sequence should have the effect of center offsets removed. This means that, for the computation of rsynthpartial, the first two elements of {P} can be set to zero. A procedure for computing the predicted radius rpredicted is now explicitly described.


[0326] First, the residual error between the synthesized radius and the measurement can be computed.




e


r


=r−r


synth
  (61)



[0327] Next, the synthesized radius including only the error types whose checkboxes are checked can be computed.


[0328] In the following equation, each element of the vector {c} can be assigned a value of 0.0 when the checkbox associated with the parameter is checked, and a value of 1.0 when the checkbox associated with the parameter is not checked.


{rsynthpart(θ,{c})}={square root}{square root over ([A(θ)]·{0c3{circumflex over (P)})}3c4{circumflex over (P)}4c5{circumflex over (P)}5c6{circumflex over (P)}67{circumflex over (P)}7c8{circumflex over (P)}8c9{circumflex over (P)}9{circumflex over (P)}10}T  (62)


[0329] If c7=1, use equation (59) to apply the x-axis reversal transient modification to rsynthpart. Likewise, if c8=1, use equation (60) to apply the y-axis reversal transient modification to rsynthpart. Finally, the predicted radius for the selected combination of error types can be computed.




r


predicted
(θ,{c})=rsynthpart(θ,{c})+er(θ)  (63)



[0330] The predicted radius sequence from the previous equation has no center offset error. It can be used directly in the computation of the corrected circularity displayed, for example, in the diagnostics window 102.


[0331] A capability that can be provided by diagnostics window 102 can include displaying and ranking error types in order of their relative contribution to the circularity error. Each error type's contribution can be determined by evaluating equation (62) for rsynthpart(θ,{c}) where the elements in the vector {c} are set to zero, except the one associated with the particular error type under consideration (set to 1.0). The circularity error for the resulting synthesized radius can be computed and retained.


[0332] The process can be performed for each of the, in this embodiment, seven error parameters. The circularity errors associated with each error type can be sorted and displayed when the user requests. The process can be summarized by the following equation, which makes use of the Kronicker delta δ(k): a 10 element vector whose elements are zero, except for the k'th element which has a value of one.




E


CTRC
(k)=max(rsynthpart(θ,{c}=δ(k)))−min(rsynthpart(θ,{c}=δ(k))), k=3,4, . . . 9  (64)



[0333] A statistic called the “model coherence” can be used to indicate whether the data is well approximated by the model. It can be used to identify situations where error sources that are beyond the scope of the assumed model may be present, or situations where the measurement data was corrupted for some reason. A coherence parameter can be obtained by computing the square of the coefficient of correlation between the measured radius vector to the synthesized radius vector rsynth that contains the effects of all known errors.


[0334] In an exemplary embodiment, the center offset errors are removed from both radius vectors prior to computation of coherence. Additionally, the contiguous data segments that follow an axis reversal over the angular ranges of αx and αy can be removed from both the measured and synthesized radius. One advantage associated with eliminating these data regions can include avoiding the inclusion of much or all of the friction reversal error transient, which can lower the coherence, in the computation.


[0335] As the coherence deviates from the ideal value of 1.0, the ability of the model to represent the observed behavior becomes potentially questionable. Typically, a coherence value above about 0.90 indicates a good fit. Accordingly, in an exemplary embodiment, a warning is given (e.g., displayed) if the coherence is unacceptably low to avoid situations where a less experienced user might attempt to compensate a machine based on a bad measurement.


[0336] One problem with a definition of coherence based on correlation coefficient can be that, when the machine has little or no errors, or when the errors are well compensated, the presence of random noise or axis vibration may cause the computed coherence to be low. If the same machine had some errors present that are within the scope of the model, the coherence would have been high. One solution to such a problem could involve performing analyses to distinguish between components of the residual error that appear to be random relative to significant changes in circle angle to those residual errors that appear to have a deterministic low-frequency relationship to circle angle. Evaluation of the autocorrelation function of the residual error or applying an angle-domain smoothing filter to the residual error could potentially identify the existence of non-random signal content.


[0337] Another solution involves intentionally adding some random noise to both the measured and the synthesized data in order to provide some correlation for the case where there are no errors present. The amplitude of this intentional random noise should be low enough to allow for true problems with the measurement to be identified with a low coherence, but high enough to prevent low coherence statistics from being reported for error-free data. Thus, the amplitude should be based on the expected residual error caused by vibration and measurement noise.


[0338] Coherence can be computed based on the following equations where ρ2 is the coherence, η(t) is a sequence of uniformly distributed random noise with a predefined range, the “˜” overstrike is used to designate a signal that has been intentionally augmented with the addition of noise, the “−” overstrike is used to designate the mean value of a sequence, and the “synth” subscript is used to identify the synthesized data sequence. Experience has shown that a good value for the range of the uniformly distributed random variable η is about ±10 microns.




{tilde over (r)}


synth
(t)=rsynth(t)+η(t)  (65)





{tilde over (r)}
(t)=r(t)+η(t)  (66)



[0339] Next, these data sequences can be modified by computing the center offset error and removing its effects from the data by applying equations (6) and (7) to both data sets. Otherwise, a large center offset error may result in a good coherence even if there are measurement problems. Finally, the correlation coefficient can be computed for the relationship for the center-corrected, noise-augmented sequences for measured and synthesized radius.
27ρ2=(Σ(r~synth(t)-r~synth_)·(r~(t)-r~_))2(Σ(r~synth(t)-r~synth_)2·Σ(r~(t)-r~_)))2(67)


[0340] “Significance” is a statistic that can be computed for each estimated parameter. It is designed to indicate, for example, whether the magnitude of the parameter estimate is significantly large relative the estimated uncertainty of the parameter. For example, the parameter estimate for lost-motion on a machine with zero backlash is likely to be non-zero due to the presence of measurement noise. In this case, the computed significance for the total-lost-motion parameter should be small and the user can appreciate that the estimate for the total lost motion is not particularly meaningful.


[0341] The equations for the computation of significance can be developed based on several assumptions about the data. These assumptions are not necessarily totally valid, yet the significance statistic developed based on these assumptions has proven to be useful. The significance statistic compares the parameter estimate to an estimate of the standard-deviation associated with the parameter. The estimate of the standard deviation of the parameter can be computed based on the assumption that the error model is capable of perfectly describing the measurement, with the exception of normally distributed, uncorrelated random noise of constant variance on the radius-squared measurement.


[0342] Implicit within the stated assumption is that the basis functions that constitute the matrix [A] in equation (54) are deterministic (i.e., the estimates for the circle angle based on the elapsed test time contain no errors). With these assumptions, the covariance matrix for the parameter estimate vector {{circumflex over (P)}} in equation (54) may be determined from the equation shown below, whose derivation can be found in many textbooks whose topic is statistics and estimation-theory.


[0343] The following equation computes the exemplary 10×10 covariance matrix, where N is the total number of measurements and 10 is the number of parameters estimated. As with the estimation of coherence, the data immediately following the reversals is not included in the computation in order to assure that the transient reversal errors do not bias the estimate of the measurement noise variance.
28[COVP]=(1N-10i=1N(r2-[A]{P^})2)·[[A]T[A]]-1(68)


[0344] The estimated standard deviation of the estimated parameters is the square-roots of the diagonal elements of the covariance matrix.


{{circumflex over (σ)}P}={square root}{square root over ({diag(|COVP|)})}  (69)


[0345] Each component of the standard deviation vector can be compared to the value of the corresponding component in the parameter estimate vector {{circumflex over (P)}} to determine whether the estimated value is significant relative to the standard deviation. The formulation for the significance statistic can be based on the following statement: the significance increases as the ratio of parameter-estimate to standard deviation increases, and a parameter estimate whose amplitude is less than, for example, five standard deviations is considered insignificant. An equation for the significance S of the k'th element of the parameter estimate vector developed to meet the stated criteria is shown below.
29Sk={1-(5·σ^P_k)&LeftBracketingBar;P^k&RightBracketingBar;,P^k5·σ^P_k0,P^k<5·σ^P_k(70)


[0346] The previous equations provide a general approach for computing the significance. Some special consideration for the scale error estimates for the case of a length-calibrated ballbar can be included as these parameters are not explicitly contained in the parameter estimates vector and can be developed based on two separate parameters, each with its own variance estimate. When a simplifying assumption that the average radius is much greater than the variance of the estimate for the average radius is employed, the following expression may be obtained from equation (25).




var
({circumflex over (R)}2·ÊSCLX)=var({circumflex over (R)}2·ÊSCLY)≈({circumflex over (σ)}P4)2  (71)



[0347] Equations for the significance for the axis scale errors are shown below.
30S(E^SCL_X)={1-(5·σ^P_4)(R^2·E^SCL_X),R^2·E^SCL_X5·σ^P_40,R^2·E^SCL_X<5·σ^P_4(72)S(E^SCL_Y)={1-(5·σ^P_4)(R^2·E^SCL_Y),R^2·E^SCL_Y5·σ^P_40,R^2·E^SCL_Y<5·σ^P_4(73)


[0348] Although the exemplary development of the significance statistic is based on an assumption that model residual errors were uncorrelated, normally-distributed random-variables, it has proven to be a useful statistic even for cases where the residual error is caused by some deterministic phenomenon that is not included within the scope of the model structure. The computed significance for each error parameter can be used by the update compensation algorithms to determine whether or not to update a proposed value for a particular compensation parameter relative to the existing compensation. If the significance for a parameter is zero, then the proposed value for compensation can be chosen to be the existing original value. Otherwise, it can be developed based on the parameter estimate as described below.


[0349] Additionally, the significance of the parameter estimate associated with each proposed compensation value can be graphically displayed (e.g., as meter 150 on adjust compensation page 112). This can, for example, provide the user with some additional information to aid in the decision of whether to use a proposed value for compensation.


[0350] The model structure for machine tool errors employed as specifically disclosed by example herein addresses a limited range of possibilities. Many other error types are known to exist that are not currently handled by this particular example (but which one of ordinary skill in the art could appreciate could be handled using the teachings of the present invention). Some of the unmodeled errors might be static, while others might be dynamic.


[0351] With respect to analysis of ballbar measurements, some unmodeled error types may be falsely attributed to one or more of the errors that are contained within the model structure, while other error types do not fit within the model structure and their presence results in a reduced value of the coherence statistic. Some unmodeled errors are parametric in nature (i.e., they can be represented by a limited number of parameters) while others are not suitable for parameterization. Some known machine error types that are not addressed by the structure of the machine error model of the exemplary embodiments as specifically disclosed by example herein are listed below.
1FalseAttrib-ution inExemplarySuitable ForDynamic/ModelParameter-Error DescriptionStaticStructure?ization?Feedback or Mechanism Kine-StaticNoYesmatics Cyclic ErrorsTorque Ripple Cyclic ErrorsDynNoPotentiallyComplex Linear Axis Straight-StaticNoProbably notness ErrorsSimple Axis Angular ErrorsStaticPotentiallyYes(Roll, Pitch, Yaw)Complex Axis Angular ErrorsStaticNoProbably not


[0352] Of the error types listed above, the simple axis angular errors may, for example, be falsely attributed as linear squareness, straightness or scale errors under the exemplary embodiments discussed herein. Simple axis angular errors refer to errors in the orientation of the machine member that vary linearly or parabolically as a function of axis position.


[0353] For example, there can be a total of nine angular error types (e.g., roll, pitch, and yaw errors for each of three linear direction axes). Each error type can be associated with an associated error amplitude parameter and two parameters associated with the location of the rotation axis (e.g., resulting in a total of 27 parameters). If both linear and parabolic varieties of these error types are present, then there can be a total of 54 possible angular error parameters. Errors of this type not only potentially effect the relative orientation of, for example, a tool tip to a workpiece, but can also create displacement errors between the tool tip and workpiece.


[0354] The displacement errors created by angular errors may appear very similar to the linear axis squareness and straightness errors contained within the assumed exemplary error model structure. This can be seen by examining FIG. 17, showing the displacement errors created by just one of the nine error types.


[0355] Referring to FIG. 17, it can be seen that a Y-axis roll error creates a displacement error with components in the X and Z directions. The displacement error depends on the location in the machine envelope relative to the roll axis. For a ballbar measurement, the effect of the angular errors should appear to be very similar to YX squareness, YZ squareness, YX straightness, and YZ straightness errors.


[0356] Attribution of angular errors to the linear squareness, straightness, and scale error parameters is not necessarily a detrimental effect. Parameters for squareness straightness and scale error compensation developed based on displacements that originally was caused by angular errors will likely improve the accuracy of the machine as long as the machine motion is in or near the plane of the ballbar test. Any attempt to incorporate these “simple” angular errors into the assumed exemplary model structure might involve estimating error parameters by simultaneously analyzing measurement results obtained from multiple ballbar measurements in multiple machine orientation planes and in stacked parallel planes.


[0357] The A2100 control, for example, has the ability to compensate for most of the error types previously identified herein. The compensation algorithms can be parameterized in much the same way as the errors themselves, with some minor differences that will be discussed below. Typically, the compensation parameter has an inverse relationship with the error type.


[0358] For example, if the straightness error coefficient is positive, then the compensation parameter is negative. The error parameters can be estimated for the Cartesian horizontal and vertical axes within the circle plane, but the compensation is applied to a physical axis or axes that actuate motion of the logical axis that corresponds to the horizontal or vertical axis. If the test is performed with some amount of compensation active, then the estimated error parameter defines the incremental adjustment to the existing parameter.


[0359] Accordingly, an exemplary embodiment of the present invention has knowledge of the configuration of each compensation type for each physical axis involved in the motion within the circle plane. Thus, conversion of an error parameter estimate to a compensation parameter involves mapping the existing compensation from data associated to a physical axis (or axes) to the circle plane-axis (horizontal or vertical), computing the new value of compensation based on the parameter estimate for the circle-plane axis, then mapping the new compensation value to the physical axis or axes.


[0360] The discussions regarding the analysis of measured data referred to the x and y axes. The equations can be interpreted in such a way that x designates the horizontal axis and y designates the vertical axis. In this way, the equations that have been developed for x and y can be applicable to the axes in any of the machine's major planes.


[0361] The major planes can be identified by naming the horizontal axis followed by the vertical axis (e.g., XY, XZ, YZ). The equations discussed herein require no modification for the XY plane, and may be applied to, for example, the YZ plane by substituting x for y and y for z.


[0362] Unlike the other two planes, the horizontal and vertical axes of the XZ plane describe a left-handed coordinate system and, for squareness and straightness coefficients, a sign change accompanies the substitution. This plane is defined by the left-handed XZ coordinates rather than the right-handed ZX coordinates due to a previously established convention for machine tools. The discussions that follow use designators h and v for horizontal and vertical axes within the circle-plane, and p to designate the third axis perpendicular to the plane.


[0363] It has already been seen that configuration data for the physical axis that produces motion of a circle-plane axis is involved when computing an error parameter for the circle plane axis. Such a mapping from physical axis to circle-plane axis can be anticipated by equations (28) through (30) that account for the expected servo effects on the average circle radius. These equations can be used when computing the overall axis scale errors for a test involving a length-calibrated ballbar.


[0364] The aforementioned equations need knowledge of the circle plane axes values for Kvnominal, Kvadjust, and velocity feedforward (VFF). These parameters can be data items associated with the physical axes. The composite Kv (Kvnominal,* Kvadjust) and the applied VFF for the circle plane axis can be stored in, for example, the test result data-file's header (the applied VFF can be the configured VFF percentage for the axis if test-setup-data's feed-mode has an apply_rate_feedforward attribute that is true and is zero otherwise). A system level assumption can be that the machine's linear axes have matched gains and VFF levels.


[0365] Ideally, values for Kv and VFF can be obtained by examining configuration data from one physical axis that actuates one of the circle-plane axes. In practice, the Kv and VFF are included for each of the circle-plane axes in the data file header. Thus, a data file header according to an exemplary embodiment of the present invention contains a Kvh a Kvv a VFFh and a VFFv.


[0366] The evaluation of equations (28) through (30) uses each parameter's average value for the plane. This is considered reasonable because a significant mismatch between axes can be identified by parameter estimation, and a user would be expected to correct the situation and re-perform the test. Another complicating factor can be the possibility that a logical axis may be mapped to one or more physical axes. This situation occurs for split and slave axes.


[0367] In order to accommodate for both split and slave axes, the configuration data item for the logical axis can be obtained from the data for the first actively normal physical connection at the time of the test. This is reasonable for split axes because the configuration sets for each of the physical connections are expected to match each other and it is anticipated that compensation be applied equally to the physical axes that make up the split set. For slave axes, it is anticipated that each axis may be compensated separately. This can be accomplished by performing a separate ballbar test for each slave axis while the other slave axes are removed. Since the other slave axes have a status of removed (i.e. not normal) during the test, the data set for the first normal connection can be the appropriate choice.


[0368] Similar considerations as those discussed for Kv and VFF can be made when obtaining the existing compensation for an axis. As mentioned, the development of proposed modification to compensation based on a ballbar test measurement can include: 1) the estimate of the parametric error; and 2) the values for compensation parameters that were active in the machine at the time the test was performed. As with the retention of the Kv and VFF, in an exemplary embodiment, the compensation present on the machine during the test may be stored in the data file header. In an alternative embodiment, rather than store the compensation in the data file header, a unique text string, the data reference number, can be written to the file header.


[0369] The data reference number can be developed based on the time and date at the beginning of a ballbar test run. If the data reference number stored in memory for the most recent test matches the data reference number from the file header for the measurement data currently loaded into memory, then the proposed values for compensation for the circle plane of the loaded measurement can be computed based on the existing compensation parameters from the data base. Once changes to the compensation are applied, the data reference number in memory can be cleared and the display of proposed values can be terminated (the compensation values present during the test are no longer accurately represented by the current values in the database).


[0370] The existing parameters for scale, squareness, and straightness compensation from the data for the first physical connection to the logical-axis associated with the circle-plane axis can be employed as the original compensation values. This approach can be taken to accommodate both split and slave axes as described above. Once the compensation is computed, it can be applied uniformly to normal connections to the logical axis. This can be done if the exemplary embodiment described herein is the primary method for developing these compensation parameters.


[0371] Uniform application to all axes making up the split set can be a reasonable choice given that measurements of positions of individual physical axes are not performed. The same approach can be taken for backlash and windup compensation; but, in this case it is conceivable that the exemplary embodiment might detrimentally over-write values for backlash and windup that are intentionally set to different values for each axis in the split set based on a more specialized measurement. In an exemplary embodiment as described herein, however, backlash and windup compensation are typically applied uniformly to all axes in a split set based on the results of a ballbar or similar measurement of logical axis end point.


[0372] Associations between axes for straightness/squareness compensation can be based on physical axes and limited to four compensation axes per independent physical axis. The straightness/squareness compensation facility can also be used to compensate for scale errors by compensating an axis relative to itself. For a simple configuration where each linear axis (e.g., X, Y, Z) is actuated by a single physical axis, three associations for each physical axis can be sufficient to compensate each cross axis for straightness and squareness errors in the direction of the cross axis and to compensate the axis itself for scale mismatch errors.


[0373] For the case where there is one split axis actuated by two physical axes, four associations per independent axis are utilized. For example, consider a case where the x axis is a split with two physical axes, and the y and z axes are actuated by a single physical axes. Compensation relative to the x-axis position can be accomplished by associating the y and z axes to the first x connection for squareness and straightness, a third association for the first connection can be consumed in compensating for scale error, and the second connection uses just one association (to itself) to compensate for scale error. Compensation relative to the y (or z) axis consumes all available associations (e.g., each of the two physical connections to x consume one association, z consumes another, and the self-association for scale compensation consumes the fourth).


[0374] As is implied by the previous example, associations for squareness/straightness can be allocated separately from associations for scale-error. The algorithm for assigning associations attempts to create the cross-axis associations by using the first connection to logical as the independent axis. A cross axis association can be used when either squareness compensation or straightness compensation for the independent axis is enabled.


[0375] When an attempt is made to apply the proposed values of compensation, existing associations for each physical axis can be first scanned through to identify any existing associations of the type required and the parameters associated with these associations updated. If there is no existing association of the type required, a new one can be created. If all available associations for an axis are consumed, an alert can be reported instructing the user to delete any extra associations, such as those that involve a rotary axis.


[0376] Proposed values for compensation parameters are typically computed by subtracting the computed error parameter from the value for the original compensation parameter (i.e. the value of the parameter that was used to actively apply compensation during execution of the circle-test). Proposed values can be computed for the axes involved in the plane of the most recent circle test. The following equations summarize how compensation can be developed from an estimated error parameter for the horizontal or vertical axis. It should be understood that the equations are applied to each physical connection to the logical axes associated with the h or v axis for the particular circle plane.


[0377] Squareness/straightness compensation can be defined by the following four parameters: 1) the squareness comp coefficient, 2) the straightness comp coefficient, 3) the compensation origin, and 4) the compensation range. A procedure for developing the compensation parameters from the measurement results is outlined below. In the equations that describe the compensation parameters, the axes to which squareness or straightness compensation applies are identified by the subscripts where the first subscript identifies the independent axis and the second subscript identifies the dependent axis. For example, sqr_compHV is the coefficient of squareness compensation that adjusts the position of the V axis as a function of the position of the H axis.


[0378] Equation (52) provides the parameter ESQRHV that describes the squareness error of the two axes that make up the circle plane. However, squareness compensation parameters can be available for both axes. Compensation can be applied to the vertical axis as a function of the position of the horizontal axis and compensation to the horizontal axis can be applied to the horizontal axis as a function of the vertical axis position.


[0379] For the sake of symmetry, both available compensations can be employed by equally distributing the squareness error to each available association. For the case of the XZ plane, the sign of the squareness error can be negated to account for the fact that the equation was developed for a right-handed coordinate system, but H=X, V=Z is a left handed coordinate system. The equations can be generalized for any of the three coordinate systems by defining a sign-adjust variable that is a function of the circle plane.
31sgn_adj={+1,XYPlane-1,XZPlane+1,YZPlane(74)


[0380] A general equation for squareness compensation adjustment is shown below.
32sqr_compHVproposed=sqr_compHVoriginal-12sgn_adj·ESQR_HVsqr_compVHproposed=sqr_compVHoriginal-12sgn_adj·ESQR_HV(75)


[0381] When considering squareness compensation, the compensation origin can be arbitrary since it defines the location of the independent axis from which to measure displacement. However, this same parameter can be re-used by straightness compensation and, in that case, the straightness error can be computed as if the compensation origin is equal to the independent axis coordinate of the circle center.


[0382] The proposed value for straightness compensation can be developed directly from the original value for the coefficient and the estimated straightness error if the independent axis coordinate of the circle center for the test from which the error parameters are estimated is the same (or nearly the same) as the compensation origin from the original data. The following equation, for example, may be employed. In the equation below, the sign of the estimated straightness coefficient is modified for the X axis in the XZ coordinate system.




str





comp


HV


proposed


=str





comp


HV


original


−sgn





adj·E


STR









HV






str





comp


VH


proposed


=str





comp


VH


original


−E


STR









VH
  (76)



[0383] Straightness compensation limits the amount of compensation applied to be the compensation applied at a distance from the compensation origin that is equal to the compensation range. Accordingly, the compensation origin can be matched to the circle center for the recent test or, for the case of partial circles, be set to the coordinate that represents the midpoint of the axis range of motion experienced during the test. The proposed value of the compensation range can be the radius of the test circle. This “clipping” can help avoid large errors that can be introduced when compensation is extrapolated to regions outside of the range of the measurement. The clipping behavior is illustrated by FIG. 18.


[0384] If the clipping did not occur, then changes to the circle center could be accommodated by making adjustments to both squareness and straightness compensation. Given the presence of the clipping, the effect of straightness compensation present in the measured data can be removed from the data prior to performing the estimate for the parametric straightness error. The resulting estimate could then be used directly (with a possible sign adjustment) as the straightness compensation coefficient. Such a consideration can also be used for cases when the original compensation origin matches the circle center, but the radius of the circle test is greater than the original compensation range.


[0385] Another solution to the changing center problem involves having test setup validation algorithms test whether the selected values for circle center coordinates are near the compensation origin for the currently configured straightness compensation. If the circle center is significantly different from the compensation origin, or if the circle radius is significantly larger than the compensation-range, then the test setup validation can issue a message informing the user that, if the test results are to be used to develop squareness/straightness compensation, then the straightness compensation for the axis or axes whose circle center does not match the compensation origin should be disabled prior to performing the test.


[0386] A threshold to identify a significant difference between circle center coordinate and original compensation origin coordinate can be about 20% of the circle radius. Likewise, a threshold for a significant difference between the circle radius and the original compensation range can be when the circle radius is about 20% greater than the original compensation range. With these precautions in place, equation (76) may be applied directly.


[0387] Since squareness compensation varies based on the arbitrary choice of circle center, both types of compensation might be clipped or not-clipped together. The decision of whether or not to clip a compensation might be configurable for each compensation type for each association.


[0388] Scale error compensation can be implemented via, for example, the straightness/squareness compensation capability of a control (e.g., the A2100) by associating the axis to itself and populating the squareness compensation parameter with a parameter derived from the estimated value of the scale error. The straightness coefficient for the self-association can be zeroed and the enable Boolean for straightness can be set to off. Thus, the proposed value for scale compensation can be developed using the following equation.




sqr





comp


HH


proposed


=sqr





comp


HH


original


−E


SCL









H


, str





comp


HH


proposed
=0





sqr





comp


VV


proposed


=sqr





comp


VV


original


−E


SCL









V


, str





comp


VV


proposed
=0  (77)



[0389] If the ballbar is not length calibrated, then the compensation can be adjusted to account for scale mismatch (equation (24) would have been used to compute the estimate for scale error). This might be reasonable if the original value for scale compensation was developed based on a measurement with a length-calibrated ballbar. However, if the scale error has changed significantly since the development of the original compensation, or if the scale error compensation is originally developed with the ballbar length not-calibrated, then the scale error compensation can probably only adjust for mismatches between axes within the plane.


[0390] As tests (with the ballbar not length-calibrated) are performed for multiple planes, the scale mismatch compensation that worked for one plane will be detrimentally over-written by the scale mismatch compensation for another plane. In such a situation, the order in which the per-machine-plane tests are arranged can affect the value for an axis' scale compensation, and a compensation coefficient that corrects a mismatch in one plane can conceivably aggravate a mismatch in the other plane. This problem should not occur when all tests are performed with a length calibrated ballbar, as the result for an axis's proposed value for scale error compensation should be the same (correct value) for tests performed in either of the two machine major-planes in which the axis lies. The associated exemplary embodiment helps the user avoid this situation by issuing a warning message when the user attempts to copy the proposed values for scale error compensation to the active values column if the proposed value was developed based on measurements where the ballbar was not length calibrated.


[0391] Straightness compensation could be used in a self-association to correct for screw-pitch errors that are not constant everywhere on the screw, but where the pitch error increases in an approximate linear relationship to screw position. If such cases are found on actual machine tools, then augmentation of the existing capability could include a parameterized variable pitch error using the straightness coefficient.


[0392] Backlash compensation and windup compensation are both represented as positive numbers for positive windup and backlash errors.




backlash





comp


H


proposed


=backlash





comp


H


original


+E


backlash









H






backlash





comp


V


proposed


=backlash





comp


V


original


+E


backlash









V
  (78)





windup





comp


H


proposed


=windup





comp


H


original


+E


backlash









H






windup





comp


V


proposed


=windup





comp


V


original


+E


windup









V
  (79)



[0393] Both types of lost motion are errors that occur on the axis. They are not expected to vary with circle plane and can be compensated per-axis. It is expected that the estimated value for axis lost motion should be the same regardless of which of the two available circle-planes was used to perform the measurement.


[0394] One capability that can be provided by an exemplary embodiment of the present invention could involve ensuring that a user constructs a set of test conditions that are within the capability of the machine and capable of providing usable results. For example, validity checks can be performed on user-entered test-setup parameters and combinations of parameters. These validity checks were previously summarized in the previous discussion regarding test setup page 10.


[0395] Exemplary equations employed for these checks are herein provided. A test for the validity of measured data that compares the total test time to the expected test time is also described here. The data validity test can be very similar to the overshoot arc length test and a design for a single utility (e.g., software) employed by both tests is presented.


[0396] In an exemplary embodiment, a circle center is within the range limits of the machine axes. The test setup displacement coordinates can be specified using the machine coordinates for the axis. The test-setup configuration values for circle center can be directly compared to the machine configuration data for axis range limits.


[0397] If the following equations are true, the validity test should pass. Xmin designates the lower limit for the x-axis range (LOWLIMT[X]), Xmax designates the high limit for the x-axis range (HIGHLIMT[X]), etc.




X


min


≦X


CIRC









CTR


≦X


max






Y


min


≦Y


CIRC









CTR


≦Y


max






Z


min


≦Z


CIRC









CTR


≦Z


max
  (80)



[0398] As previously described with respect to the discussion regarding test setup page 10, the circle radius can be less than or equal to the ballbar length, but not so small that motion in the direction of the axis perpendicular to the circle plane contributes significantly to the ballbar measurement. In an exemplary embodiment, a change in ballbar length dL, relative to a change in position in the direction of the perpendicular axis dP can be chosen that is less than half the change in ballbar length relative to a change in position along a radial with the circle plane dR.
33(LP12LR)(P12R)(81)


[0399] The previous equation specifies a maximum cone angle φmax.
34tan(φmax)=P-PCTRRmax=12φmax=tan-1(12)=22.6°(82)


[0400] A circle radius relative to the ballbar length based on the maximum cone angle is shown below.




L
cos(φmax=22.6°)≦R0.9·L≦R  (83)



[0401] Finally a requirement for circle radius can be:


[0402] ti 0.9·LBALLBAR≦RCIRCLE≦LBALLBAR  (84)


[0403] Since this check involves knowledge of the ballbar radius, in an exemplary embodiment, it is not performed until the user attempts to apply a proposed set of test configuration parameters. In an exemplary embodiment, the ballbar length is not subject to a validity test because its configured value is limited to a finite number of selections in a drop-down menu uicontrol (described further herein). The values in the drop down menu can be nominal lengths of the ballbar, plus the available extension bars and combinations of extension bars.


[0404] A previous discussion regarding equations for simultaneous estimation of the error parameters describes how the parameter estimation algorithm distinguishes one error type from another based on the excitation of the measurement. The excitation increases with the length of the data arc, but can also depend on the angle of the data arc start point. A test of whether the data arc is long enough to provide sufficient excitation for uniquely identifying the various error parameters can be to compute the excitation parameter using equation (56). In an exemplary embodiment, the excitation is required to exceed the value for a 180° data arc starting at an angle of 45° relative to the horizontal axis. The excitation can be computed by constructing an [A]-matrix from equations 52 and 53 with clockwise and counter-clockwise data covering the same data-arc range. The condition for a data arc and start angle providing sufficient excitation is represented by equation (85) below. The angular spacing used to construct the [A]-matrix in equation (85) can be the greater of 1° or the predicted angle change based on federate and radius as represented by equation (86) below.


Excitation([A](θdatastartdatarange,Δθ))≧Excitation ([A](45°,180°,1°))  (85)

35






where


:






Δ





θ

=

max
(



1

f
sample


·

180
π

·

Feedrate

60
·

R
CIRCLE




,

1.0

°


)





(
86
)










[0405] In an exemplary embodiment, tests for ensuring that the circle test will not cause an axis range limit to be exceeded simultaneously consider the circle center, circle radius, ballbar length, start angle of acceleration arc, and total arc length. An exemplary test is designed to ensure that the total circle from the beginning of the acceleration overshoot arc to the end of the deceleration overshoot arc nowhere involves exceeding a range limit of an axis. If the test discovers that a range limit might be exceeded, changes to the circle center and/or circle radius bringing the test to within range can be proposed.


[0406] A constant height of the perpendicular P axis can be checked. The test setup parameter for the P coordinate of the circle center is not really the circle center—it is the P coordinate of the center ball. In an exemplary embodiment, the perpendicular coordinate of the true circle center is located at or “above” the entered value for circle center in test setup data. Thus, in the following equation, the square root is added to the configured circle center (not subtracted).




P


min
≦(PCIRCCTR+{square root}{square root over (Lballbar2−Rcircle2)})≦Pmax  (87)



[0407] Once the perpendicular axis position is found to be within range, the maximum and minimum axis locations during the circular motion can be determined. These values can be evaluated by first determining the bounds for a circle whose total arc (acc-overshoot-arc+data-arc+dec-overshoot-arc) covers 360°, and then refining these bounds by considering the specific case if the total arc is less than 360°. The bounds can be initially computed for circle center coordinates of (0,0), and the actual coordinates can be considered after having made any refinements for a partial circle.




H


max


=R


circle


, H


min


=−R


circle


, V


max


=R


circle


, V


min


=−R


circle
  (88)



[0408] If the total circle (overshoot-arcs+data-arc) spans an arc of 360°, then there need not be any additional refinement of axis bounds. Otherwise, the next step can be to identify the quadrant in which the arc begins and the quadrant in which the arc ends, identify any quadrant boundaries that are crossed, and re-evaluate the bounds that correspond to quadrant boundaries that are not crossed. This process might not easily be represented by a single equation since it involves a large degree of logic and unique handling for each of the 16 possible combinations of start-quadrant and end quadrant according to an exemplary embodiment. The start and end quadrants can be determined by establishing the unit vector from circle center to acc-arc-start point and the unit vector from circle center to dec-arc-stop point.
36u^start={cos(θdata_start-θovershoot)sin(θdata_start-θovershoot)},u^end={cos(θdata_start+θdata_length+θovershoot)sin(θdata_start+θdata_length+θovershoot)}(89)


[0409] The start and end quadrants can be determined from the unit vectors as follows:
37Qstart={I,ustartH>0,ustartV0II,ustartH0,ustartV>0III,ustartH<0,ustartV0IV,ustartH0,ustartV<0,Qend={I,uendH>0,uendV0II,uendH0,uendV>0III,uendH<0,uendV0IV,uendH0,uendV<0(90)


[0410] The maximum and minimum axis displacements can be refined based on the particular combination of start quadrant and end quadrant for each of the 16 combinations shown in FIG. 19. Exemplary equations for each combination are provided below.
38Qstart=I{Qend=I&(ustartH>uendH)Qend=IIQend=IIIQend=IV:Hmax=R·ustartHHmin=R·uendH:Hmax=R·ustartHHmin=R·uendH:Hmax=R·ustartHHmin=-R:Hmax=R·{ustartH,uendH}MAXHmin=-RVmax=R·uendVVmax=RVmax=RVmax=RVmin=R·ustartVVmin=R·{ustartV,uendV}MINVmin=R·uendVVmin=-RQstart=II{Qend=IQend=II&(ustartV>uendV)Qend=IIIQend=IV:Hmax=R:Hmax=R·ustartH:Hmax=R·{ustartH,uendH}MAX:Hmax=R·uendHHmin=-RHmin=R·uendHHmin=-RHmin=-RVmax=R·{ustartV,uendV}MAXVmax=R·ustartVVmax=R·ustartVVmax=R·ustartVVmin=R·uendVVmin=R·uendVVmin=-RQstart=III{Qend=IQend=IIQend=III&(ustartV>uendV)Qend=IV::::Hmax=RHmax=RHmax=R·uendHHmax=R·uendHHmin=R·ustartHHmin=R·{ustartH,uendH}MINHmin=R·ustartHHmin=R·ustartHVmax=R·uendVVmax=RVmax=R·ustartVVmax=R·{ustartV,uendV}MAXVmin=-RVmin=-RVmin=R·uendVVmin=-RQstart=IV{Qend=IQend=IIQend=IIIQend=IV&(ustartH<uendH)::::Hmax=RHmax=RHmax=RHmax=R·uendHHmin=R·{ustartH,uendH}MINHmin=R·uendHHmin=-RHmin=R·ustartHVmax=R·uendVVmax=RVmax=RVmax=R·uendVVmin=R·ustartVVmin=R·ustartVVmin=R·{ustartV,uendV}MINVmin=R·ustartV(91)


[0411] After evaluation of the equations from the appropriate row above, the circle axis ranges can be tested against the available machine axis range to determine whether the machine envelope is large enough to accommodate the specified circle. If the machine is not large enough, and a change to the center coordinates can bring the circle within the machine envelope, a proposed change to the center coordinate can be provided. The process can be represented by the following pseudo-code for the case of the H axis—an analogous procedure can be implemented for the V axis.
2IF: (HCTR + HMAX) > HIGH_LIMIT[H] OR (HCTR + HMIN) < LOW_LIMIT[H]MESSAGE: “defined circle parameters will cause H axis to exceed a rangelimit . . .”IF: (HIGH_LIMIT[H] − LOW_LIMIT[H]) < (HMAX − HMIN)MESSAGE: “chosen circle radius is too large for H axis range”ELSE:HCTR1 = LOW_LIMIT[H] + ½(HMAX − HMIN)HCTR2 = LOW_LIMIT[H] + ½(HMAX − HMIN)MESSAGE: “valid H axis range for circle center. {HCTR1}<H<{HCTR2}”ENDIFENDIF


[0412] The messages seen by the operator contain the appropriate axis letter associated with the H or V axis rather than the H or V as shown above. The terms inside the braces “{ }” above will contain numeric values.


[0413] Assuming that it has been established that the circle is within the machine range, then one final test can be to ensure that the position prior to an initial (e.g., 1.5 mm) feed-in and the position following a final (e.g., 1.5 mm) feed-out are also within range. These positions can be defined by the following equations.
39φ=tan-1(P-PCTRR)(92)Pfeedin=Pfeedout=PCTR+(Lballbar+1.5)·sin(φ)(93)Hfeedin=HCTR+(Lballbar+1.5)·cos(φ)·cos(θdata_start-θovershoot)(94)Vfeedin=VCTR+(Lballbar+1.5)·cos(φ)·sin(θdata_start-θovershoot)(95)Hfeedout=HCTR+(Lballbar+1.5)·cos(φ)·cos(θdata_start+θdata_length+θovershoot)(96)




V


feedout


=V


CTR
+(Lballbar+1.5)·cos(φ)·sin(θdatastartdatalengthovershoot)  (97)



[0414] If one of these coordinates is outside of the associated axis' range limit, then the validity check can issue a warning to inform the user of the situation.


[0415] A check for sufficient overshoot arc length can be used to ensure that: 1) the acceleration overshoot arc is large enough to allow the path speed to attain the programmed feedrate during the acceleration from the speed at the end of the initial feed in; and 2) the deceleration overshoot arc is long enough such that deceleration to the speed prior to the final feed-out move begins some time during the deceleration arc—not during the data arc. The test for the overshoot arc length can consider the programmed feedrate, the circle radius, the data arc start and end angles, the control's velocity algorithms, and the machine configuration parameters for the axes and path rates. An exemplary embodiment of the present invention can also include the ability to predict a distance consumed to change speed from the feedrate at the end of the feed-in to the programmed feedrate and a distance to change speed from the programmed feedrate to the feedrate just before the final feed-out move.


[0416] In one embodiment, such checks can be performed through off-line emulation of the part program (or parts thereof). For example, the execution of the entire part program (e.g., feed-in, acceleration overshoot arc, data arc, deceleration overshoot arc, and feed-out) could be emulated and analyzed to determine if the aforementioned conditions are met. In one such embodiment, for example, a velocity versus cumulative distance traveled profile generated by the emulation could be analyzed to ensure such conditions are met (velocity versus time and cumulative distance traveled versus time profiles could also be used). For example, the velocity at the cumulative distances that represent the beginning and ending of the data arc could be analyzed to determine if they are at the full programmed feedrate. Moreover, such profiles (e.g., a cumulative distance traveled versus time profile) could also be analyzed to estimate the total test time (e.g., by tagging data points corresponding to expected cumulative distances for the feed-in and feed-out triggers) and data arc time (e.g., tagging data points corresponding to cumulative distances representing the beginning and end of the data arc).


[0417] Alternatively, as most of the calculations in such an emulation will be during the data arc (a full feedrate portion), and are therefore unnecessary, such checks could be performed by emulating the execution of selected portions of the part program. For example, execution of the part program could be emulated from just prior to the feed-in move until the target feedrate is achieved. The corresponding cumulative distance traveled could be analyzed to determine if it is less than the cumulative distance that represents the beginning of the data arc (indicating that the acceleration overshoot arc should be sufficient). Moreover, a data point corresponding to such a distance could be tagged and the emulated execution continued until the end of the acceleration overshoot arc is reached, wherein that data point is also tagged and can be used to determine the total time to perform the acceleration overshoot arc (which could be used with respect to extraction of the data arc).


[0418] Through symmetry, the time for the deceleration overshoot arc can be assumed to be reasonably similar to the time for the acceleration overshoot arc. A separate check can, however, also be performed on the sufficiency of and time to perform the deceleration overshoot arc. For example, emulation (with the initial condition of full feedrate) can be started at some distance before the start of the deceleration arc (e.g., at a distance early enough before the start of the deceleration arc to reasonably assume that motion is at the full feedrate). The aforementioned assumption based on symmetry can be used to determine such a distance. The feedrate can be monitored during the emulation and a data point tagged when the feed rate first reduces. A data point corresponding to the cumulative distance associated with the beginning of the deceleration overshoot arc can also be tagged. If the feedrate started to reduce after the beginning of the deceleration overshoot arc, then the deceleration overshoot arc is sufficient.


[0419] Further according to one such embodiment, the emulation can continue running until the end of the program (the feed-out move). Accordingly, the amount of time of the deceleration overshoot arc can also be determined (e.g., from the data point indicating the beginning of the deceleration overshoot arc and a data point corresponding to feed-out move). Total test time can also be determined by, for example, adding the time for the acceleration overshoot arc, the time for the deceleration overshoot arc, and the time for the data arc (which can be determined, for example, by dividing the data arc length by the feedrate). Although separate software could be developed to perform the aforementioned emulation, in one embodiment of the present invention, a utility program can be created that calls the real time velocity manager software from the non-real time process to perform the emulation.


[0420] Data from a ballbar measurement can be stored, for example, in a disk file. Facilities for loading historic files and performing analysis on these historic files can be provided. Files can be of a format that could be defined by a ballbar manufacturer, or by the CNC manufacturer. This enables analysis of measurements taken using software from the ballbar manufacturer.


[0421] Referring by example to the Renishaw QC10 ballbar, it is a device that plugs into a serial port of a computer. An abstract interface object is used to access and control the ballbar device. This software interface provides methods for initializing the corn port, powering on the ballbar, setting the ballbar's measurement coefficients, and starting data collection. The data collection is performed in an execution thread that is a member of the process that initializes the ballbar software object. The ballbar deflection is sampled at a constant frequency (e.g., 250 Hertz). The data is copied from the serial port to a data pipe. The data is stored as floating point values that represents the signed deflection of the ballbar nominal deflection in units of mm. The pipe can retain some maximum number of measurements. The ballbar device object generates an event whenever the pipe contains new data. The ballbar device has publicly visible attributes that describe the status of the ballbar and reports any error conditions. An event is generated when the ballbar object detects an error condition.


[0422] The methods and techniques employed by an associated exemplary embodiment of the present invention to realize the execution of the ballbar measurement test as previously described with respect to, for example, run test page 30 are now further described. The steps for performing the physical setup and the performance of the actual measurement test can be handled by, for example, a Run-Test-Coordinator finite state machine (RTC FSM). One of the states of the RTC FSM can be the TestInProgress state, which itself can involve execution of a nested FSM called the TestInProgress (TIP) FSM. In an exemplary embodiment, the FSMs and the program execution on the CNC real time process interact in a timely manner, allowing for a smooth and responsive interface as seen by the user (not clunky and jerky).


[0423] Safeguards to ensure proper sequencing of events can be provided to account for the possibility of highly variable processor loads. These goals can be achieved by polling, for example, the CNC real-time data, invoking the RTC FSM, and letting the FSM run until it reaches its exit point. The process can be accomplished by recurrently invoking the FSM activities method from an autonomous thread within a non-real time environment. A parallel thread buffers the measurement data by moving data from the ballbar pipe into a dynamically allocated data buffer whose size is based on the estimated maximum test duration. In this way, the ballbar pipe can be kept as empty as possible in order to avoid pipe overflow and data loss. If a pipe overflow condition is detected, then the FSM transitions to an error state and generates the appropriate alert.


[0424] The RTC FSM may be invoked by, for example, an external requirement originating from the human operator or by a recurrent invocation generated as a background task associated with an exemplary embodiment of the present invention. An invocation originating from a human operator may be a user interface (UI) control callback event caused by, for example, pushing a button on the screen, an acknowledgement of an alert dialog, or by a reset event that occurs when the user changes the test-plane, changes the test-setup data, or enters a Run-Test screen for the first time. Any invocation of any FSM method requires that the client obtain a mutex to the FSM.


[0425] The execution of the state machines can be driven by, for example, data from the real time process, events from the ballbar device, and user inputs via the user interface controls (Uicontrols) from a screen. If these data sources are developed from within multiple threads or processes, the RTC FSM can be designed to run within a multi-threaded environment. Threads/processes involved in an exemplary test realization are described by FIG. 20, which indicates that five threads/processes can be involved in test realization, including:


[0426] 1. Ballbar Device Thread—an autonomous thread running under the OS (e.g., Windows) that involves collecting data from the ballbar via the serial port, processing the data, and copying the measurement to, for example, a pipe object. For example, the ballbar device software object provided by Renishaw furnishes the interface for establishing this thread and reporting the ballbar status.


[0427] 2. Empty Pipe Thread—a high priority thread running under the OS that copies data from the pipe into a data buffer of dynamically allocated memory whose length can be based on the anticipated test duration. This thread empties the pipe when it receives an event signal from the ballbar device that new data is present in the pipe. The data can be stored in, for example, a buffer object: “resamp_pipe_buffer.” This data can be accessed by the RTC FSM when evaluating state transition stimulus conditions. This thread may also invoke the RTC FSM when certain triggering conditions are detected. These triggering conditions are the ballbar entering the measurement range from the fully extended position, entering the fully extended position from the measurement range, and entering the fully contracted position. The full measurement data-set can be accessed when performing data analysis (e.g., curve fitting).


[0428] 3. FSM Ping Thread—the recurrent invocation of the state activities method of the RTC FSM. The invocations originate from the user interface display. The interval between attempted recurrent invocation of the FSM can be small to keep the test moving along and the priority of this thread can be lower than that of the other threads discussed.


[0429] 4. Uicontrol Thread—the thread that responds to the operator's inputs via on-screen user interface controls. Certain Uicontrol callback functions cause an invocation of the RTC FSM's respond-to-stimulus method. Access to the RTC FSM methods can be mutexed such that a request for services from the Ping Thread waits until the Uicontrol thread's request is completed and vice-versa. In an exemplary embodiment uicontrol requests are not queued; a new request replaces any existing request that is pending.


[0430] 5. CNC Program Execution Process—the program execution process can be the real time autonomous process that runs under the CNC's real time OS. The run test FSM makes decisions about when and whether to perform a state transition based on data from the real time process. A semaphore (referred to as “waitinloop”) communicates with a mechanism that allows the RTC FSM to exercise a limited degree of control over the part program execution. These topics are later discussed in greater detail.


[0431] In an exemplary embodiment, all of the tasks that are not associated with the user interface's run test tab can be executed under the Uicontrol Thread.


[0432] According to one embodiment of the present invention, a nested states pattern is used. In one such embodiment, the state machine performs the state activity of the parent state and then traverses the nested states. If the need for a transition out of the parent state is detected during its state activity, no further activities of the nested states are performed.


[0433] The data from the ballbar pipe can be permanently stored in a buffer (resamp_pipe_buffer) that contains the measurements over an entire test arc. The resamp_pipe_buffer may contain lower density data than the ballbar pipe. This can be the case when ballbar pipe data is re-sampled for the purpose of controlling the size of the dynamic test data file.


[0434] The lower density data can be created by performing a windowed-average over sets of Nresamp raw data items, as illustrated in FIG. 21. The data container area of the resamp_pipe_buffer can be dynamically allocated to be capable of containing as many resampled data points as are expected to occur between the feedin and feedout events of the continuous motion test plus some amount of headroom.


[0435] Prior to each resampling operation, the number of items remaining in the ballbar data-pipe can be compared to the resampling ratio Nresamp. If the number of items remaining is less than Nresamp the number remaining can be stored as prev_num_rem, the average of the remaining items can be computed and stored as prev_avg_rem, the ballbar pipe can be emptied of its remaining contents, and an empty_ballbar_pipe( ) method returns. The next time the empty_ballbar_pipe( ) method is invoked, and the ballbar pipe contains data, the newest item in the resamp_pipe13 buffer can be computed as described by the following equation.
40next_sample_value=prev_avg_rem*prev_num_rem+i=1(Nresamp-prev_num_rem)pipedata[i]Nresamp


[0436] Once the initial resampled value is computed, the resampling process continues as usual. In the special case where the pipe contains fewer than Nresamp-prev_num_rem data points, the values for prev_num_rem and prev_num_avg can be updated, the data pipe emptied and the function returns. This can be accomplished by limiting the upper range of the summation to the number of points in the pipe and the result of the computation is stored in prev_avg_rem, while the variable prev_num_rem is updated by adding the number of points in the data pipe to the existing value.


[0437] Upcoming discussions will describe how the data collection process in an exemplary embodiment begins some time in advance of the feedin move that triggers collection of data to be retained. In the time prior to this triggering event, the resamp_buffer can be populated via the resampling process as described above. If the time between the beginning of the data collection and the triggering event is exceedingly long, it can cause the resamp_buffer to fill up. If this occurs, then room for the newest data can be created by discarding the necessary amount of the oldest data.


[0438] The resamp_buffer can be implemented as a ring-buffer linked-list. As the resamp_buffer is populated, a list-head-pointer can be updated to point to the sample associated with the oldest measurement in the ring-buffer and a list-tail-pointer points to the data item in the buffer corresponding to the most recent measurements from the ballbar pipe. During the time in advance of the feedin trigger, the TIP FSM can scan the data from the most recent ballbar data pipe and check for the occurrence of the triggering event. In one embodiment the “Empty Pipe Thread” checks for trigger conditions each time it runs in response to a new data event. Once the TIP FSM detects a valid triggering event, it can retain a pointer to the buffer location associated with the event, two points are maintained—one for the most recent feedin trigger and one for the most recent feedout trigger.


[0439] Exemplary embodiments of RTC and TIP finite state machines are further described later herein. Some of the elements found in the FSM diagrams will now be described. As discussed herein, state machines are described by diagrams that employ the symbols depicted in FIG. 22.


[0440] Each state is represented by a rounded corner box. The box can be partitioned vertically into four sections. The top section contains the name of the state. The second section contains the state-entry actions (actions to be executed once when the state is entered via a transition).


[0441] The third section contains the state activity or in-state actions. These are the tasks associated with the current state that can be performed for each invocation of the FSM. The state activity can be performed prior to any state-transitions. For the case of nested states, the activity can be performed for both the parent and nested states, where the parent state's activity occurs first.


[0442] The bottom section of the state box contains the state-exit actions (actions to be executed once when the state is exited via a transition). Transitions from one state to another can be initiated by some stimulus condition and are represented by a line with an arrowhead that points to the state into which the system transitions. The transition line is labeled with an explanation of the stimulus followed (optionally) by a slash “/”, which is followed by the transition-action (an action to perform during the transition).


[0443] Facilities for distinguishing transition-actions from state-exit-actions and state-entry-actions are included to avoid the need to duplicate state-exit-actions on each transition out of a particular state, and to avoid the need to duplicate state-entry-actions for each transition into a particular state. A diamond is used to indicate a conditional transition. A hollow circle represents the FSM's default-state (the state of the FSM just after initialization or an FSM reset event). A solid black circle with a number is used as a reference node. A solid gray circle with a number is a cross-reference to the reference node with the same number. Cross-references are used in the diagrams to avoid having too many arrows crossing.


[0444] In an exemplary embodiment, certain states are made to be relocatable to satisfy employing several states, each with identical state-entry-actions, in-state-actions, state-exit-actions, and transition stimuli. Rather than create a separate unique state for each case in which it is required, a relocatable state can be employed where the states to transition into in response to a stimulus are set up when the relocatable state is initially entered. A relocatable state is indicated in the diagram by a rounded-corner box with dashed lines rather than solid lines.


[0445] In an exemplary embodiment involving the ATB software, an ATB Run-Test page (such as run-test page 30) includes a status-bar for the display of a message that serves the dual purpose of: 1) providing prompts to the user that describe what to do next to proceed; and 2) displaying the status while the FSM is in the process of completing some task. Many of the states in the FSM execute a function setstatus( ) at state entry time. This function displays the particular message associated with the state in the status bar. The particular message is not shown in the FSM diagrams because of limited space, but the messages are provided in the text descriptions of each state.


[0446] Machine motion might be involved while preparing for and executing a ballbar test. Much of this machine motion can be accomplished by populating the control's part program MDI buffer with part program blocks. The function setmdi( ) can often be employed as a state-entry action where a character string containing the specific part program associated with the particular state is auto-generated (based on setup data) and loaded into the MDI buffer. Explanations of the state specific MDI programs created by setmdi( ) are provided with the discussions of the individual states.


[0447] The setmdi( ) action might fail to populate the MDI buffer with a new program if the buffer is locked, which can occur, for example, when: 1) the program path control-state is such that the existing program cannot be overwritten; or 2) the system is in the process of unlocking the buffer in response to a change in control state. A number of states in the RTC FSM involve an at-entry action of populating the MDI buffer with a new program. If the MDI buffer is locked at that point, then the attempt might fail.


[0448] In order to avoid this, transitions into a state with such an at-entry action can be conditional upon a Boolean condition referred to as ateop (at end of program). In the context of discussions about the ATB FSMs, ateop is “true” when an attempt to clear the MDI buffer by invoking setmdi( ) with a blank string is successful. The setmdi( ) action also resets the value of a waitinloop semaphore (process control data table item) for reasons discussed below.


[0449] State transitions are often the result of stimuli that indicate that the MDI program has thus-far executed beyond a certain block. The generation of these stimuli can be facilitated by including a block sequence number for each block in the auto-generated part program. The MDI program auto-generation method for a particular state provides the FSM with a collection of sequence numbers to represent specific locations in the program that have significance to the FSM. They may be used by the FSM to create a state transition stimulus when the sequence number of the block currently undergoing execution (NSEQ) equals or exceeds one of these values. NSEQ is the notation used herein to represent the system name for the sequence number of the part program block currently undergoing execution.


[0450] Within the context of the RTC FSM, the state transitions typically follow a pattern from a waiting-to-execute-mdi state to an executing-mdi state, to an instance of a WaitCycCompl state (described later herein), to a new waiting-to-execute state, etc. The condition NSEQ≧NSTART can be used to generate a transition out of a waiting-to-execute state to an executing state. The transition out of the executing state typically occurs when NSEQ≧NSTOP.


[0451] The transition out of the executing state typically enters a WaitCycCompl state, which waits for the control-state to be ateop and for the MDI buffer to become unlocked so that it may be populated with program blocks upon entry of the next waiting-to-execute state. Within the context of the TIP FSM, a list of sequence numbers can be generated during part program action where the significance of each sequence number is understood by the FSM since the program is created by the FSM. The execution of the part program block that follows a given sequence number can be used to stimulate transitions within the TIP FSM as the circular motion part program progresses.


[0452] Synchronization of the state of the FSM in response to the state of the part program can be accomplished using sequence numbers NSEQ as described above. In certain instances, the realization of the ballbar test involves synchronizing the part program execution to the FSM state. One such example is now described.


[0453] In an exemplary embodiment, when the state of the FSM transitions due to a condition NSEQ≧NSTART, the part program, at some point, suspends and allows the FSM to complete its transition. Otherwise, the program execution could proceed to completion, reset NSEQ to zero and cause the FSM to be stuck waiting for a NSEQ≧NSTOP stimulus condition that has already occurred and vanished. This situation can be avoided by causing the part program execution to wait for the FSM to catch up by employing, for example, a waitinloop mechanism.


[0454] The waitinloop can be accomplished by including blocks in the auto-generated MDI programs that can cause the part program to suspend at certain points. The suspended part program may be released by the FSM (running in a separate process) by incrementing the value of a variable shared by both processes (a semaphore). In the case of the A2100 control, such variables are provided for interprocess communication and are referred to as process control variables. During program generation, infinite loops that are conditional on the value of a process control variable can be inserted at the locations within the part program where re-synchronization of the part program to the FSM is desired.


[0455] Once the state transition of the FSM is completed, it can release the “suspend” on the part program, as it is now ready to detect the stimulus conditions. An example of a sequence of part-program blocks to accomplish a suspend-loop is shown below. Code that auto generates these blocks can be employed during program auto-generation.


[0456] The release condition in the part program can be that the value of the process control data semaphore exceeds its previous value, and the release action of the FSM can be to increment the value of the semaphore. The previous value of the semaphore can be maintained in the part program context by copying the value of the process control variable to a local program variable in the block immediately following the suspend-loop, and making the condition to exit the suspend-loop that the process control data item have a value greater than that of the local variable. The value for the process control parameter can be set to zero at state machine initialization and reset if the FSM writes new blocks to the MDI buffer.


[0457] The first suspend-loop encountered in a program should function correctly because the local variable is initialized to zero when it is referenced for the first time. Referring to the code snippet below, the interrogations of CURPOSPGM(X) can be included to create a wait-for-steady state condition to help prevent the suspend-loop from being prematurely released during part-program lookahead.
3Code Snippet 1. Example Of an NC Program Blocks Suspend-loopN100 [#FOO]=[$CURPOS_PGM(X)]N100 (DO WHILE [$PROCESS_DATA(99)J]<=[#RELEASE])N100 G4F 1N100 [#FOO]=[$CURPOS_PGM(X)]N100 (LOOP)N100 [#RELEASE]=[$PROCESS_DATA(99)J]


[0458] The waitinloop(‘susp_cond’) method can be invoked during part program generation to generate the conditional statement for the particular process control data table entry selected. The release method of waitinloop, indicated by waitinloop(‘release’), can be employed by the FSM to increase the value of the appropriate entry of the process control data. The release is usually applied from within a state where it is known from the sequence number that the program is currently in or about to enter a suspend-loop.


[0459] An additional method, waitinloop(‘init’), searches the process control data table for an entry whose value is zero and stores the index of the selected table entry (e.g., as an FSM property). The waitinloop(‘init’) method can be invoked when, for example, a run-test page is entered. The value of the selected process control data table entry can be returned to zero by invoking waitinloop(‘restore’) when the run-test page is exited. Although the previous discussion used A2100 specifics for the case of an example, the same concept with different implementation details can be employed on other CNC's with the same results.


[0460] The control state of the real time part program path is an item that can be made available to the ATB that executes on a separate non-real time process. The control state variables can be read prior to each recurrent invocation of the FSM method for in-state actions. The control state can be represented by a variable, e.g., S1NCCONTROL, that serves to enumerate the state of the program execution process.


[0461] In the current context, the control state can be used in a test to determine whether the part program is undergoing execution as a requirement for a transition stimulus. In the context of the RTC FSM, the control state can be represented as a Boolean termed incycle. In an exemplary embodiment, the incycle Boolean is “true” only if the first part program path is actively executing, is in a feedhold condition, or is stopped at end of block as in a single-block situation. The terminology poll(ctlstate) is used in the FSM diagrams as shorthand to indicate an in-state action of testing whether or not the program is in cycle as defined above.


[0462] Several states in the exemplary FSMs have transitions that can be stimulated by an event where the current state has persisted for a period of time greater than a maximum time period defined for the state. This is referred to in the FSM diagrams as a timeout condition. Transitions associated with a timeout condition typically involve generation of an alert. Timeout conditions can be detected by capturing the system clock time as one of the state's at-entry actions and subsequently, during the state activity, calculating the elapsed time since state entry and comparing it to the state's timeout_time attribute. States that have a timeout transition can also have an at-entry action of timeoutset where the time at state entry is captured and the timeout_time is specified.


[0463] A purpose of a Run Test Coordinator (RTC) FSM according to one exemplary embodiment is to automate the physical set up of, for example, a ballbar test, execute the test, collect data, save the data to a file, and perform an initial data analysis. For example, a complete test execution can involve the completion of five steps.


[0464] Once again referring to an exemplary embodiment involving the ATB software, each step can be represented by a button on the ATB Run-Test Page. Each button has an associated checkbox to indicate whether the particular step has been completed. When a button is enabled, the user may press it to perform the associated task. In certain circumstances, a button is disabled where button presses are inhibited and the button is “grayed-out” to inform the user that the task associated with the button may not be performed at that point in time.


[0465] The five buttons can appear vertically on the run-test page, such as in an order specified from top to bottom with self-descriptive labels specified. The buttons are identified in the FSM diagram by the specified integer number.


[0466] 1. “Move To Center”


[0467] 2. “Secure Center”


[0468] 3. “Move To Start”


[0469] 4. “Start Test”


[0470] 5. “Save Data”


[0471] The FSM diagram uses a shorthand terminology for certain state-entry actions that pertain to the enabled/disabled status of the buttons and the checked/unchecked status of the checkboxes. The terminology enable(n1:n2) is used to indicate that the buttons whose identifying integer are within the range of n1 up to and including n2 should be enabled. Similarly, disable(n3:n4) can be used to indicate an action where buttons n3 through n4 should be disabled.


[0472] In one embodiment, buttons are enabled in such a way as to indicate that, if the user chooses, a previous step may be re-performed, but steps may not be skipped. As has been described in the previous discussion regarding run test page 30, in an exemplary embodiment, button presses are not required to move forward through the test sequence (e.g., they are used to repeat a step that has already been completed). A test can be indicated as having been successfully completed by causing the associated checkbox to be checked and vice-versa. This action is indicated in the FSM diagram by the notations set_compl(n1:n2) and set_incmpl(n3:n4), which sets the checkboxes associated with indices n1 through n2 as checked and sets the checkboxes whose indices are n3 through n4 as unchecked.


[0473] The exemplary RTC FSM enables and disables certain uicontrols found on the run-test page as a function of the state. The following exemplary list identifies which uicontrols have their enable/disable attribute assigned by the RTC state FSM, and describes how and why they might be modified.


[0474] 1. feedrate edit field—a feedrate edit field can be made available on the run-test page to allow the user to run multiple tests at multiple feedrates without having to return to a setup page each time. The feedrate edit field can be uniformly enabled as an at-entry task for RTC states except for the TestInProgress state where it is disabled. These actions are not indicated in the FSM diagram of FIG. 23 in order to save space. When the state is AtStart, the test part program has already been generated and is resident in the MDI buffer. User changes to the feedrate when the state is AtStart are accommodated by employing a process control variable in the program to represent a variable feedrate. When the state transitions into TestInProgress, the value from the feedrate edit field can be copied to the appropriate entry of the process control data table and further edits to the feedrate edit field can be disabled.


[0475] 2. perform-backlash-test checkbox—the RTC FSM can determine whether or not a backlash test should be performed based on the state of the perform-backlash-test checkbox. In an exemplary embodiment, the ability for the user to change the checkbox state is disabled upon entry of the AtStart state and the TestInProgress state and is enabled upon entry of all other states. These at-entry actions are not indicated in the FSM diagram of FIG. 23 in order to conserve space. The disabling of checkbox modification at entry of AtStart and TestInProgress ensures that the state of the checkbox accurately reflects whether or not a backlash test is being performed. The test-part program can be loaded into MDI during entry into the AtStart state. In an exemplary embodiment, the part program blocks to perform the motion for the backlash test are generated only if the backlash check box is checked. Thus, in one embodiment, the user should not be allowed to change the state of the checkbox at any time while the MDI buffer contains the test part program.


[0476] 3. aggregation of ballbar calibration controls—in an exemplary embodiment, ballbar length calibration may be performed or cancelled from a limited number of RTC states. The ballbar calibration process suspends execution of the RTC FSM, so it cannot be allowed to take place while the part program is in cycle or has an opportunity to go into cycle. These actions can be strictly enforced by a mechanism to be described later. The uicontrols associated with ballbar length calibration can be disabled at entry of certain states to help prevent the user from trying to perform a length calibration when it is known for certain that the machine is in-cycle. The ballbar calibration controls can be disabled upon entry of the states MovingToCenter, MovingToStart, TestInProgress, TestAbort, and WaitForCycComplete. In an exemplary embodiment, the accessibility of the ballbar calibration controls is not modified at entry of an AlertMessage state and is set to enabled at entry of the remaining states in the RTC.


[0477] An exemplary RTC FSM diagram is depicted in FIG. 23. The purpose of a reusable AlertMessage state can be to generate a window with an alert message for the user, and to wait for the user to acknowledge the alert message. In the RTC FSM diagram of FIG. 23, instances of the reusable AlertMessage state are represented by an “A” surrounded by a dashed box.


[0478] A diagram showing the actions and transitions for an A state is provided in FIG. 24. In FIG. 24, the state labeled “GenericRTCState” represents the state from which a transition to a particular instance of AlertMessage had originated. The text to display in the alert window can be specified during the transition from GenericRTCState to AlertMessage.


[0479] Also during this transition, the AlertExitState can be specified. The AlertExitState is the state to which the FSM transitions when AlertMessage receives an acknowledge (ack) stimulus. The ack stimulus occurs when, for example, a user presses an “OK” button in the alert window. In an exemplary embodiment, the alert window is destroyed as the AlertMessage state is exited.


[0480] The RTC FSM can also employ the reusable state W, which serves the purpose of delaying a transition between two states until part program execution has completed and the MDI buffer is write accessible. The W signifies WaitCycComplete. The W states in the exemplary RTC FSM diagram actually represents a two-state subsystem with a WaitCycComplete and an A state, as shown in FIG. 25.


[0481] In FIG. 25, the “Generic RTC State” indicates that WaitCycComplete is reusable and unique instances of WaitCycComplete have their own unique entry transitions. Transitions into WaitCycComplete involve specifying a CycComplExitState. The CycComplExitState dictates the state into which the system transitions when the W state is exited. The A state can be contained within the W subsystem to facilitate the generation of alerts that, for example, suggest the user Feedhold and Data Reset when the program execution does not complete in the expected time frame.


[0482] The following at-entry actions can be associated with the WaitCycComplete state:


[0483] 1) timeoutset(1): the timeout_time is set to 1 second as a default. This can be sufficient because entries into WaitCycComplete are typically stimulated by a program sequence number that indicates that the program execution has reached its final suspend-loop. For instances of WaitCycComplete where a case-specific timeout_time is involved, the default may be overridden by explicitly programming a timeoutset( ) during the transition.


[0484] 2) waitinloop(release): allow program execution to continue in case it is currently in a suspend-loop.


[0485] The following in-state actions can be associated with WaitCycComplete:


[0486] 1) poll(ateop): check for the program not incycle and for write access to the MDI buffer.


[0487] 2) poll(time): check whether the time since state entry exceeds the specified timeout_time.


[0488] There are no at-exit actions associated with the WaitCycComplete state. Meanwhile, the following can be transitions out of the WaitCycComplete state:


[0489] 1) ateop: the MDI buffer is writeable and the waiting state may be exited. The state into which is transitioned is specified by the variable CycComplExitState that was defined when WaitCycComplete was initially entered.


[0490] 2) timeout: if the WaitCycComplete state has persisted for a period of time considered unacceptable, the state transitions into A (AlertMessage) with an alert asking the user to manually complete program execution and unlock the MDI (such as with the message “Hit Feed-Hold and Data-Reset to Continue”). The state transitions back into WaitingForCycComplete when the alert is acknowledged. If the user had not data-reset, then after the timeout_time has elapsed the alert can be generated again. This can continue until the user does what is asked.


[0491] The Idle state is the default state of the exemplary RTC FSM following invocation of the ATB software. It is also the state to which the FSM is set in response to a reset event. The reset event can occur when, for example, the test-plane selection or setup data is changed. The Idle state can provide a starting point from which the user can initiate execution of the sequence of tasks involved in performing a test, such as by pressing the button labeled “Move To Center”. The following at-entry actions can be associated with the Idle state:


[0492] 1) enable(1), disable(2:5), set_incmpl(1:5): reset buttons and checkboxes to initial state


[0493] 2) statusmsg( ): “Press ‘Move To Center’ to begin the test”


[0494] There are no explicit state activities or at-exit actions associated with the RTC Idle state. With respect to transitions associated with the RTC Idle state and, more particularly, a press(1)/check_setup( ) transition, a user press of, for example, a “Move To Center” button causes a transition into a conditional test. During the transition, the action check_setup( ) performs test setup validity tests, such as those previously described herein. If the setup is valid, the transition proceeds to the state PreMoveToCenter. If the setup is found to be invalid, the state transitions to an instance of the reusable state AlertMessage (the reusable state labeled A). A alert message text can be displayed, such as one derived from the list of error codes returned by check_setup( ), and used to instruct the user to switch to, for example, a setup-test page to compose a valid setup (e.g., for the given circle-plane).


[0495] PreMoveToCenter is a state in which the FSM waits for an indication (e.g., for the user to hit the cycle-start button on the machine's pendant or panel) to cause the machine axes to move to the circle center position specified in the setup data (e.g., by running a MDI program). The following at-entry actions can be associated with the PreMoveToCenter state:


[0496] 1) enable(1), disable(2:5), set incmpl(1:5): still working on completing “Move To Center” task.


[0497] 2) statusmsg( ): “Ensure Safe Path To Center, Loosen Center Thumbscrew—Then Cycle Start”


[0498] 3) setmdi( ): generates a sequence of machine coordinates motions to move the axes to the setup data's circle center coordinates. The feedrate employed can be the test setup data item: traverse-feedrate. The center coordinates can be approached by first programming a block to move to the horizontal-axis and vertical-axis coordinates of the circle center. This can be followed by a block to move to the perpendicular axis coordinates of the circle center. Each block in the MDI program contains a sequence number that is incremented by one relative to the sequence number of the previous block. The motion blocks can be followed by a suspend-loop. The suspend-loop can be included to prevent a situation where the real time execution of the program races ahead of the non-real time execution of the FSM and finishes the program before the FSM's in-state action that queries the sequence numbers has had a chance to execute and detect the state-transition stimulus. The code snippet shown below presents an example of a MDI program created by PreMoveToCenter's setmdi( ) method for the case of an X-Y plane circle.
4Code Snippet 2. Example of MDI Program to Move to Circle CenterN1 G71 G60 G90 G45 F4000N2 G98 1 X300 Y150N3 G98.1 Z200N4 [#FOO]=[$CURPOS_PGM(X)]N4 (DO WHILE [$PROCESS_DATA(99)J]<=[#RELEASE])N4 G4F.1N4 [#FOO]=[$CURPOS_PGM(X)]N4 (LOOP)N4[#RELEASE]=[$PROCESS_DATA(99)J]


[0499] 4) set(NSTART,NSTOP): NSTART is set to the sequence number of the first motion block of the MDI program (NSTART=2 for the example above). NSTOP is set to be the sequence number of the suspend loop (NSTOP=4 for the example above).


[0500] 5) est_prg_time( ): computes a rough estimate of the time to complete a move to center (e.g., at 100% feedrate override). This time estimate can be used to determine an order-of-magnitude value for the timeout condition for the MovingToCenter state.


[0501] Poll(ctlstate) and poll(NSEQ) state activities can be associated with the PreMoveToCenter state. Accordingly, the control state and sequence number can both be determining factors for the generation of the stimulus condition for a transition out of PreMoveToCenter. Meanwhile, there are no at-exit actions associated with the PreMoveToCenter state. Furthermore, with respect to transitions from PreMoveToCenter, and more particularly NSEQ≧NSTART & incycle, the state can transition to MovingToCenter when the user hits cycle start and the program execution reaches the triggering sequence number.


[0502] The exemplary RTC FSM is in the state MovingToCenter when the MDI program (generated by the at-entry action of the PreMoveToCenter state) is incycle. The following at-entry actions can be associated with the MovingToCenter state:


[0503] 1) enable(1), disable(2:5), set_incmpl(1:5): still working on completion of the “Move To Center” task.


[0504] 2) statusmsg( ): “Moving To Center”


[0505] 3) timeoutset: The timeout_time can be set to be five times the estimated time for the move plus, for example, thirty seconds.


[0506] Meanwhile, the following state activities can be associated with the MovingToCenter state:


[0507] 1) poll(NSEQ): detect stimulus for transitions toward next state


[0508] 2) poll(ateop): detect stimulus for error condition where program execution terminates prematurely


[0509] 3) poll(time): test for timeout condition


[0510] With respect to an exemplary waitinloop(‘release’) at-exit action associated with the MovingToCenter state, execution of the MDI program is allowed to complete since an event to stimulate transition out of MovingToCenter has occurred. The following can be transitions from MovingToCenter state:


[0511] 1) NSEQ≧NSTOP: when the sequence number exceeds NSTOP, the motion toward the center has completed and the state transitions to the state “W” in the direction towards SecureCenter. The W state acts as an intermediary to ensure that the MDI buffer is unlocked (i.e., eop==“true”) before attempting a setmdi( ) upon entry of the SecureCenter state.


[0512] 2) ateop: This condition might occur if the user hits feedhold followed by data reset. This condition stimulates a transition to the reusable AlertMessage state in the direction of PreMoveToCenter. The text for this particular transition can be “Motion Toward Center Ended Prematurely: Press ‘OK’ To Continue.” When the user hits the OK button in the alert window, an acknowledge or ack stimulus can be created, and the state transitions to PreMoveToCenter (where the user has a new opportunity to complete the task of moving to the center).


[0513] 3) timeout: if the timeout_time is exceeded, a timeout stimulus can cause a transition toward an A state in the direction of PreMoveToCenter. The alert message created during this transition can contain the following text: “The move to circle center did not complete in a reasonable period of time: hit feed-hold and data reset to continue.’ An acknowledge of this alert can cause a transition toward a W state before arriving at PreMoveToCenter.


[0514] A purpose of a Secure Center state can be to provide the user with an opportunity to adjust the coordinates of the circle center relative to the coordinates specified in setup data. For example, the user can be instructed to adjust the axes positions by power feeding or handwheeling and/or to adjust the location of the ballbar center fixture on the table until the magnetic cup picks up the center ball. If the user wishes for the machine to return to the coordinates of the circle center as defined in setup data, the “Move To Center” button may be pressed. Once the final center is correctly established, the user can tighten the setscrew of the center fixture and hit cycle start to cause the FSM to capture the current machine coordinates of the axes and transition to the next state.


[0515] Actions of an exemplary FSM in this case could include correctly updating the displays, detecting and responding to the cycle start, or detecting and responding to a press of the “Move To Center” button, which might be the only button enabled. The cycle-start can be detected in circumstances where the MDI buffer contains a program that consists of just a suspend-loop. When the FSM detects that the program is incycle and has reached the sequence number of the suspend-loop, the state can transition to a W state while simultaneously issuing a waitinloop(release). Additional description is found in the following discussions of exemplary actions and transitions.


[0516] The following can be state activity associated with the SecureCenter state:


[0517] 1) enable(1:2), disable(3:5), set_compl(1), set_incmpl(2:5): the move to center task is now complete. In an exemplary embodiment, only the “Move To Center” button is enabled to allow the user to return to the current active values for circle center coordinates.


[0518] 2) statusmsg( ): “Use Handwheel To Locate Ball In Magnetic Cup n Tighten Screw, Then Cycle Start”


[0519] 3) setmdi( ): The program loaded into the MDI buffer can simply be a suspend-loop, such as the one in Code Snippet 1 where each block in the program has the same sequence number.


[0520] 4) set NSTART Since each block in the MDI program has the same sequence number, NSTART can be set to this value.


[0521] Meanwhile, the following in-state actions can be associated with the SecureCenter state:


[0522] 1) poll(NSEQ): test for partial condition for transition stimulus


[0523] 2) poll(ctlstate): test for partial condition for transition stimulus


[0524] At-exit actions associated with the SecureCenter state include waitinloop(release) where the waitinloop semaphore can be set to release regardless of which exit transition is taken. Meanwhile, transitions From SecureCenter can include the following:


[0525] 1) NSEQ≧NSTART & incycle: When execution of the MDI program has begun, the state transitions to a conditional transition node during which the current axis positions (in machine coordinates) can be captured and assigned to the active circle center coordinates for use in the upcoming test. In an exemplary embodiment, the permanently stored circle center coordinates are not modified by this process. The conditional transition node performs a check_setup( ) validity test, as previously described with respect to the discussion regarding the maximum axis range for a circle within machine limits, to assure that, given the modified center coordinates, the machine envelope is still able to accommodate the circle test. If the test fails, then the state can transition to an AlertMessage state on its way back towards SecureCenter. The alert specified during such a transition can indicate that the user's modification of the center resulted in a set of test conditions that cannot be accommodated by the machine and specify an acceptable range of circle center coordinates. The AlertExitState in this case is an instance of the WaitCycComplete state to ensure that the MDI buffer is writeable upon re-entry of the SecureCenter state. If the validity test is successful, then the state transitions into an instance of WaitCycCompl where the WaitCycComplExitState is set to AtFinalCenter.


[0526] 2) press(1): If the user presses the “Move To Center” button, then the state transitions back towards PreMoveToCenter, but first enters a WaitCycCompl state. In FIG. 23, the transition enters reference node 1. This is depicted for the sake of being able to cross reference all transitions into PreMoveToCenter resulting from a press of button 1, and the actual FSM implementation does not make use of a node 1 state.


[0527] The AtFinalCenter state can create an opportunity for a user to, for example, handwheel or power feed the axes to bring the magnetic cup off of the center ball to a safe position (e.g., prior to a move to the start position). A clearance move is not included as part of the exemplary program to move to start position as the FSM in this embodiment does not know the orientation vector of the magnetic cup. Depending on the setup, the magnetic cup orientation vector may, for example, be parallel to the tool vector, may be perpendicular to the circle plane, or may be at some arbitrary angle. The exemplary AtFinalCenter state transitions to PreMoveToStart when the FSM detects that the user has fed the axes a safe distance from the circle center.


[0528] The at-entry actions associated with the AtFinalCenter state can include:


[0529] 1) enable(1:3), disable(4:5), set_compl(1:2), set_incmpl(3:5): At this point, the tasks of “Move To Center” and “Secure Center” are complete, but all others are considered incomplete. The corresponding buttons can be enabled to allow the user to choose a new center.


[0530] 2) statusmsg( ): “Use power feed or handwheel to move the magnetic cup a safe distance at least five millimeters away from the center ball”


[0531] 3) setmdi( ): The MDI buffer can be loaded with an empty string to assure no consequences in case the user hits cycle-start.


[0532] Meanwhile, the state activity associated with the AtFinalCenter state include poll(dfcc). With respect to this action, the distance from circle center (dfcc) can be computed from the instantaneous axis positions and the active value for machine coordinates of the circle center. The instantaneous axis position commands and following errors can be sampled from the real time process prior to each recurrent invocation of the current state's activities method.


[0533] The derived values for machine position can also be used to update the displays on a run-test page prior to each recurrent FSM invocation. The value for dfcc can be computed for each invocation of the in-state action method by evaluating the square root of the sum of the squares of the individual axis distances from the active circle center.




dfcc
={square root}{square root over ((X(t)−Xcircctr)2+(Y(t)−Ycircctr)2+(Y(t)−Ycircctr)2)}  (98)



[0534] In an exemplary embodiment, there are no at-exit actions associated with the AtFinalCenter state. The following can be transitions from the AtFinalCenter state:


[0535] 1) dfcc>5 mm: When the axes have moved, for example, at least about five millimeters away from the circle center, the state transitions to PreMoveToStart. If necessary, the user may continue to feed the axes further from the center ball even after the state transition without affecting the FSM.


[0536] 2) press(1): When the user presses the “Move To Center” button, the state transitions to the instance of WaitCycComplete at reference node 1.


[0537] 3) press(2): When the user presses the “Secure Center” button, the state transitions to the instance of WaitCycCompl at reference node 2.


[0538] The PreMoveToStart state serves as a place to wait for the operator to hit cycle start to begin execution of the MDI blocks to move the axes to the test start position. The pattern employed for the transitions out of PreMoveToStart can be identical to the pattern employed by PreMoveToCenter. The test start position is the location prior to the (e.g., 1.5 mm) feedin along the ballbar orientation vector.


[0539] At-Entry Actions associated with the PreMoveToStart state can include:


[0540] 1) enable(1:3), disable(4:5), set_compl(1:2), set_incmpl(3:5): The “Move To Start” button is enabled but the check box is not checked to indicate that the move to start task is currently in process. The Move To Start button may be pressed from this state, but it results in no action.


[0541] 2) statusmsg( ): “Ensure a safe path to the start position, then hit Cycle Start”


[0542] 3) set(NSTART), set(NSTOP): NSTART is assigned the value of the sequence number for the motion span and NSTOP is assigned the value of the sequence number of the suspend-loop blocks.


[0543] 4) setmdi( ): The MDI program contains, for example, a linear interpolation block to move to the machine coordinates of the start position at the traverse_feedrate from setup data. The motion span can be followed by a suspend-loop, such as the one in Code Snippet 1. The start position can be computed from the setup data and the active value for circle center. The start position can be computed by first determining the unit-vector that describes the ballbar orientation (direction cosines), multiplying the unit vector components by the quantity ballbar length plus 1.5 millimeters and then adding the circle center components. The involved computations can utilize equations (92) through (95).


[0544] 5) est_prg_time( ): compute and store a rough estimate of the time to complete a move to start for a feedrate override of 100% when starting from the current position of the axes.


[0545] With respect to state activities associated with the PreMoveToStart state, there can be poll(ctlstate, NSEQ), involving a check for a transition stimulus condition. Meanwhile, there are no at-exit actions associated with the PreMoveToStart state. Transitions from the PreMoveToStart state can include:


[0546] 1) NSEQ≧NSTART & incycle: Transition to the state MovingToStart.


[0547] 2) press(1): Return to the PreMoveToCenter state via the W state at node


[0548] 3) press(2): Return to the SecureCenter state via the W state at node 2.


[0549] The state MovingToStart serves the purpose of waiting for the machine motion to complete. The pattern employed for state transitions out of MovingToStart can be identical to the pattern employed for MovingToCenter. At-entry actions associated with the MovingToStart state can include:


[0550] 1) statusmsg( ): ‘Axes moving to start position’


[0551] 2) timeoutset( ): The timeout condition can be set to be five times the estimated time plus, for example, 30 seconds.


[0552] State activity associated with the MovingToStart state can include:


[0553] 1) poll(NSEQ): test for transition stimulus condition


[0554] 2) poll(time): compute time elapsed since state entry


[0555] At-exit actions associated with the MovingToStart state can include waitinloop(release), uniformly allowing program execution to complete regardless of the particular transition taken to exit the state. Meanwhile, transitions from the MovingToStart state can include:


[0556] 1) NSEQ≧NSTOP: This condition indicates that the part program execution has reached the suspend-loop and a normal exit transition toward the state AtStart is initiated. The transition goes toward AtStart but first enters an instance of the W state to ensure that the MDI buffer is unlocked to enable AtStart's setmdi( ) at-entry method to execute properly.


[0557] 2) !incycle & ateop: If this condition occurs before the normal exit condition (NSEQ≧NSTOP), then an event such as a manual data reset or a servo fail might have occurred. In response to this stimulus, the state transitions to an instance of AlertMessage where the following text can be displayed: “Move To Start Position Terminated Unexpectedly.” When the alert message is acknowledged, the state transitions to PreMoveToStart to give the process a second try.


[0558] 3) timeout: If the MovingToStart state has persisted for a period of time much longer than expected, the state transitions to an instance of AlertMessage where the following text can be displayed: “The move to start position is taking much longer than expected: hit feedhold data reset.” Acknowledgement of this alert by the user causes the state to transition to an instance of W. If the user had not data reset, the W state can display an alert message asking the user to do so. Once the ateop condition is met, the state transitions to PreMoveToStart to allow the user to try again. A timeout condition might occur if the feedrate override is set to zero or if the user presses feedhold.


[0559] 4) press(1): Return to the PreMoveToCenter state via the W state at node 1.


[0560] 5) press(2): Return to the SecureCenter state via the W state at node 2.


[0561] AtStart serves to provide a state where an exemplary RTC FSM waits for the user to hit cycle start to initiate the test execution. At entry of this state, the user can be instructed to place the ballbar in the machine. The state also checks the current axes positions to ensure that the machine is at the correct start position. If the axes positions deviate from the start position, then the state transitions to PreMoveToStart. This mechanism simplifies the state machine by allowing transitions from states where the axes are expected to be at the start position to be into AtStart. At entry of AtStart, the MDI part program that causes the motion for the test measurements can be created. A detailed description of a MDI part program created at entry of AtStart will also be provided later herein.


[0562] The following at-entry actions can be associated with the AtStart state:


[0563] 1) enable(1:4), disable(5), set_compl(1:3), set_incmpl(4:5): At entry of AtStart, the tasks of “Move To Center”, “Secure Center”, and “Move To Start” will have been completed. Any of these steps may be repeated by pressing the associated button. The Perform Test task has not been completed, but its button can be enabled to indicate that it is the next task.


[0564] 2) statusmsg( ): ‘At Start Position—Place ballbar in machine, then hit cycle-start’


[0565] 3) setmdi( ): The MDI program to generate the motion for the continuous motion test and the backlash test can be generated from the setup data. Explanations of such programs and methods used to generate them are further provided herein. The first part of the MDI program can be a suspend-loop to allow the state machine to turn on and initialize the ballbar.


[0566] 4) set(NSTART): The first sequence number of the MDI part program is assigned to NSTART.


[0567] The following state activity can be associated with the AtStart state:


[0568] 1) poll(NSEQ): check for the event to stimulate a transition.


[0569] 2) poll(dfsp): The dfsp is the distance from start position. It can be computed using the instantaneous machine coordinates of the axis positions obtained from the real time process. The start position can be the position of the axes just prior to the feedin move, as defined in the PreMoveToStart state. The dfsp can be computed as follows.




dfsp
={square root}{square root over ((X(t)−Xstartpos)2+(Y(t)−Ystartpos)2+(Y(t)−Ystartpos)2)}  (99)



[0570] There are no at-exit actions associated with the AtStart state. The following can be transitions from the AtStart state:


[0571] 1) NSEQ≧NSTART/capture_test_conds, check_fdrate( ): When the user hits cycle start, the program can execute a suspend loop until the FSM executes a transition into a destination state with a waitinloop(release) at entry condition. Detection of the suspend loop's sequence number triggers a transition toward the state TestInProgress. Before entering TestInProgress, certain actions and tests can be performed, as indicated by the conditional transitions in the FSM diagram. During the initial transition, all the test conditions and a comprehensive description of the control's configuration at that instant can be captured. The information captured can include the test-setup parameters, axis rates parameters, axis gains, path rates parameters, axis compensation data, feedforward parameters, etc. In addition, the test feedrate from, for example, an edit box on a run test page can be captured and further edits to the edit box can be disabled. The appropriateness of the feedrate with respect to the setup data's overshoot arc can be checked using the methods as previously described. Also at this time, the estimate of trigger to trigger time test can be computed as previously described and its value stored for later use. If the checks indicate that the overshoot arcs are not large enough, then the state can transition into an instance of AlertMessage to indicate the problem to the user and to supply an estimate for the maximum allowable feedrate for the current setup data. When the alert is acknowledged, the state transitions to an instance of W, from which the state transitions to AtStart when an ateop condition is satisfied. Once the state has reached AtStart, the user may reduce the feedrate or return to, for example, a test-setup page to lengthen the overshoot arcs. If the feedrate checks out, then the FSM attempts to turn on and initialize the ballbar, such as previously described with respect to a software interface to the ballbar. If ballbar initialization is unsuccessful, then the state transitions to an instance of AlertMessage, then to the instance of W, then to AtStart where the user can try again to perform the test. If ballbar initialization is successful, then the state transitions into TestInProgress where the nested state machine can be run.


[0572] 2) dfsp>0.05 mm: If the ballbar is not at the correct position, then the state transitions to PreMoveToStart without any alerts. This allows transitions where the FSM believes the axes might be at start to be directed to AtStart. This potentially avoids an extra cycle start by the user. It also protects against situations where the axes are handwheeled or power-fed away from the start position.


[0573] 3) press(1): If the user wishes to return to the center position, the MoveToCenter button can be pressed to transition the FSM to reference node 1.


[0574] 4) press(2): If the user wishes to re-secure the circle center, the SecureCenter button can be pressed to transition the FSM to reference node 2.


[0575] 5) press(3): If the user presses the MoveToStart button, the state transitions to an instance of W prior to entry into PreMoveToStart, as indicated by reference node 3 in the diagram. This button can be made available to allow the user to move to the start position in case the user believes the axes may have been accidentally fed a very small amount (e.g., less than 0.05 mm) since arriving at the start position.


[0576] An exemplary TestInProgress state contains its own nested FSM. The details of an exemplary TIP FSM are later provided herein. The current discussion is limited to at-entry and at-exit actions of such a TestInProgress state. The current discussion also describes state activity for the TestInProgress state that occur uniformly regardless of the nested state. For each recurrent invocation of the RTC FSM where the state is TestInProgress, the uniform state activity of the TestInProgress state can be performed prior to the execution of the state activity of the nested state. In an exemplary embodiment, the at-entry and at-exit actions of the TestInProgress state are executed only once at the appropriate time as for any other RTC state.


[0577] The at-entry actions associated with the TestInProgress state can include:


[0578] 1) set_compl(1:3), set_incmpl(4:5): At this point in the procedure, the tasks “Move To Center”, “Secure Center”, and “Move To Start” will have been completed successfully. In an exemplary embodiment, the enable status of the buttons is not modified directly because uicontrols are uniformly disabled during test execution.


[0579] 2) statusmsg( ): The status message can vary depending on the nested state. For example, the status message just prior to entry of TestInProgress can be set during the transition and indicates that ballbar initialization had been successful.


[0580] 3) disable(enabled): uicontrols on the run-test page whose accessibility property is “enabled” can be identified and stored in a list. The accessibility property of each of these controls can be set to disabled. Additionally the buttons to switch, for example, the page can also be disabled. The list of previously enabled controls can be retained so that the FSM knows which controls to re-enable when the test completes.


[0581] 4) create(cancelbutton): The cancelbutton is a new uicontrol that can be created at entry of TestInProgress. In an exemplary embodiment, this button is the only enabled control and serves to provide the user with the ability to manually cancel the measurement test. The callback method of the cancel button can be to invoke the FSM with a “cancel test” stimulus.


[0582] 5) create objects: This action can create the resamp_pipe_buffer object and initializes its attributes. This action selects a resampling rate, computes the estimated measurements from feedin to feedout, and allocates memory for the resamp_pipe_buffer and the various run objects (e.g., clockwise run, counter-clockwise run, backlash run). The size of the resamp_pipe_buffer can be determined from the estimate of the trigger-to trigger time test (as previously discussed), the ballbar sample rate fs, and the resampling period Nresamp. The resampling period is an integer number of samples and can be selected at state entry by computing the maximum sample rate that results in a data buffer whose size is less than or equal to a maximum size of BuffsizeMAX. The parameter BuffsizeMAX can be selected based on the speed with which, for example, the ATB process is able to perform the data analysis and display tasks of the analyze-data page. A value for BuffsizeMAX for a Pentium II system, for example, where the performance remains reasonably smooth is BuffsizeMAX=5000. The total amount of memory allocated for the resamp_pipe_buffer is the max_num_samps. The computation of max_num_samps takes into account the tolerance on the accuracy of the estimated trigger to trigger time tTOL and the size of the ballbar data pipe NPIPE (which can be specified by a ballbar interface definition).
41NRESAMP=round(0.5+fsamp·testBuffsizeMAX)(100)max_num_samps=round(fsamp·(test+2tTOL)NRESAMP+NPIPE)(101)


[0583] The data container areas for each test arc (clockwise and counterclockwise) can be dynamically allocated at this time to be large enough to contain the samples associated with the data arcs.


[0584] State activity associated with the TestInProgress state can include:


[0585] 1) check for ballbar errors: The ballbar status can be interrogated for error conditions at each invocation of the in-state-actions with the RTC state being TestInProgress. At this point, the ballbar status is expected to be powered up and collecting data; any other state for the ballbar interface object is considered incorrect. Additionally, the minimum ballbar deflection from the resamp_pipe_buffer can be tested to ensure that the ballbar is not compressed at or below its minimum range. In an exemplary embodiment, a similar test for maximum range is not performed because the ballbar is expected to be extended beyond its maximum range at various times during the test. If the number of measurements in the most recent ballbar data pipe is equal to the maximum pipe length, then a pipe overflow can be assumed to have occurred over the interval and a discontiguous data error stimulus generated. In one embodiment, monitoring of ballbar status may not be necessary because the ballbar thread provides an error event that initiates a call to the FSM with a ballbar stimulus. Likewise, the empty pipe thread checks the ballbar range and invokes the FSM with appropriate stimulus when the ballbar deflection falls below the minimum or exceeds the maximum valid range limit.


[0586] 2) update displays: During the period where the state is TestInProgress, a run-test page can contain a display of the instantaneous ballbar measurement. This display can be updated by copying the most recent value from the data pipe to the display object.


[0587] 3) run nested FSM: In an exemplary embodiment, following state activities that are executed uniformly regardless of the nested state, the state activities specific to the nested state can be performed by running the exemplary TIP FSM.


[0588] Once the nested state's activities are completed, the nested FSM ceases execution. If the nested state activities result in a transition of the nested state, then the steps to complete this transition can be executed before the nested FSM ceases execution. In the case of a transition of the nested state, the following sequence can occur: 1) performance of at-exit actions of the original nested state, 2) performance of any transition actions and 3) performance of the at-entry actions for the new nested state. The states and transitions of the TIP FSM are further discussed later herein. If execution of the TIP FSM indicates that the RTC state should transition out of TestInProgress, then the transition is executed in the context of the RTC FSM.


[0589] The following at-exit actions are associated with the TestInProgress state:


[0590] 1) turn off ballbar: When the TestInProgress state is exited for any reason, the ballbar can be turned off and uninitialized.


[0591] 2) re_enable(disabled): The uicontrols that were enabled prior to state entry and were disabled during state entry can be re-enabled at state exit.


[0592] 3) delete(cancel): The “cancel” button that was created at state entry can be destroyed upon state exit.


[0593] 4) delete objects: Delete any objects created for the purpose of temporarily storing measurement data.


[0594] Transitions from the TestInProgress state can include:


[0595] 1) test succeeded: This transition can originate from within the nested TIP FSM when the entire sequence of tests has completed without any error conditions detected.


[0596] 2) test failed: This transition can originate from within the nested TIP FSM. When an error condition is encountered during execution of the TIP FSM, the TIP FSM can generate a nested-state-specific alert message and transition to an AlertMessage state in the context of the RTC FSM.


[0597] 3) press(cancel): The callback method for the cancel button can be to execute the RTC FSM's transition method with the press(cancel) stimulus. The press(cancel) stimulus can cause a transition to an AlertMessage state that displays, for example, the message: “Test Cancelled By User—Hit feedhold and Data-Reset to continue.” When the user acknowledges the alert message, the state transitions to an instance of W. If the user had not data-reset, then W can create an alert indicating that the user should do so. Once the ateop condition is achieved, the state transitions to AtStart.


[0598] 4) ballbar error: A ballbar error detected by the TestInProgress state's uniform in-state actions can result in generation of an alert message to describe the particular error condition. The RTC state transitions to an instance of AlertMessage. Acknowledgement of the alert causes a state transition to AtStart via a W state.


[0599] TestComplete is a state entered after successful execution of a ballbar measurement test. This state persists until, for example, a user presses a task button or generates a reset event by changing the circle plane or by modifying the setup data on the setup page. At-entry actions associated with the TestComplete state can include:


[0600] 1) enable(1:5), set_compl(1:4), set_incmpl(5): All tasks except saving data have been completed. All buttons can be enabled.


[0601] 2) analyze_data( ): At entry into TestComplete, the clockwise and counter-clockwise data-arcs that have been extracted from the trigger-to-trigger measurement by the TIP FSM can be copied to a temporary data file. The captured test conditions, and control configuration can be copied to the data file's header. The data file can be automatically loaded to, for example, an analyze data page with the associated data processing taking place.


[0602] There are no state activities or at-exit actions associated with the TestComplete state. Transitions from the TestComplete state can include:


[0603] 1) press(1:4) transition to the associated reference node in the FSM diagram.)


[0604] 2) press(5): transition to the SavingData state


[0605] The SavingData state can be entered from the TestComplete state when the user presses a Save Data button, for example. At entry of SavingData, a modal dialog window can be created. This window can allow a user to specify a data file name and to provide specific information about the machine, the test particulars, etc. The dialog can preload values into the fields for the date, time, control serial number, and file name. In one embodiment, the user may modify any of these. The dialog box can also contain fields where the user may enter machine information and miscellaneous notes. When the user presses save, for example, a data file can be created that contains the recent data-arc data, a test-conditions header, and additional header information containing the information pertaining to the dialog box fields. Once the file save operation has completed, the Save Data checkbox can be checked. The SavingData state persists until the user presses one of the buttons or causes a reset of the RTC FSM.


[0606] An exemplary continuous motion program consists of the sequence of blocks shown below. Each block in the described program contains a unique sequence number greater than the sequence number of the previous block. One exception to this can include that each block in a suspend-loop can have the same sequence number, but that sequence number is greater than the sequence number of the block before the first block of the suspend-loop.


[0607] 1) suspend-loop to wait for completion of ballbar initialization and power-up


[0608] 2) set modal states and feedrate


[0609] 3) feed-in move along the ballbar orientation vector


[0610] 4) counter clockwise acceleration arc


[0611] 5) counter-clockwise data-arc first half


[0612] 6) counter-clockwise data-arc second half


[0613] 7) counter clockwise deceleration arc


[0614] 8) feed-out move along the ballbar orientation vector


[0615] 9) suspend-loop to wait for preparation for the clockwise move


[0616] 10) feed-in move


[0617] 11) clockwise acceleration arc


[0618] 12) clockwise data-arc first half


[0619] 13) clockwise data-arc second half


[0620] 14) clockwise deceleration arc


[0621] 15) feed out move


[0622] 16) a suspend-loop to ensure an opportunity to detect NSTOP before program execution terminates (or continues on to a backlash test).


[0623] Motion blocks can be programmed in machine coordinates to avoid situations where the circle center is affected by offsets and/or machine position-set. Referring to the syntax of the programming language used on the A2100 as an example, the circle can be programmed in machine coordinates by, for example, moving the axes to the circle start point in G98.1 mode with linear interpolation, and then programming a circle by using incremental coordinates for the circle end point (G91) and incremental coordinates for the circle center (G2.02 or G3.02). The data arc can be divided into two halves such that the two separate blocks accommodate the possibility that the data arc is 360 degrees.


[0624] In an exemplary embodiment, auto program generation accounts for circle-plane, circle-direction and the ratio of ballbar-radius to circle radius. For the XY and YZ plane, a clockwise move can be generated by programming a clockwise arc (e.g., G2.02) and a counter-clockwise move can be generated by programming a counter-clockwise arc (e.g., G3.02). For the XZ plane, the coordinates are left-handed (the clockwise move can be generated by programming a counter-clockwise arc (e.g., G3.02) and the counter-clockwise move can be generated by programming a clockwise arc (e.g., G2.02)).


[0625] Circular arc blocks can be generated by copying the horizontal and vertical (incremental) coordinates for end-point and circle center to the command position of the associated logical axis for the particular circle-plane. The program generation algorithm can be summarized below for the case of both the clockwise and counter-clockwise moves.


[0626] In an exemplary embodiment, steps 1 through 4 (see below) are executed only once. Steps 5 through 10 (see below) can be executed in sequence twice; once for the counter-clockwise move angles θccw and once for the clockwise move angles θclw. In the following discussion, the pseudo-code uses the syntax <variable> to indicate a string representing the value of the variable between the “<” and “>” symbols, and double quotes are used to indicate that the string is copied exactly.


[0627] 1. Compute the ballbar orientation relative to the circle plane while accommodating the possibility of a circle-radius that is smaller than the ballbar length. This is represented by the in-plane component of the orientation-vector cos φ and the out-of-plane component of the orientation vector sin φ.
42cosφ=RCircleLBallbar;sinφ=1-(cosφ)2(102)


[0628] 2. Compute the circle angles for each of the circular motion spans in the program for the counter-clockwise move.


start of acceleration span: θ1ccwDataStart−θOvershoot  (103)


start of first half data arc: θ2ccwDataStart  (104)

43






start





of





second


-


half





data





arc


:







θ
3
ccw


=


θ
DataStart

+


1
2



θ
DataRange







(
105
)








 start of deceleration arc: θ4ccwDataStartDataRange  (106)


end of deceleration arc: θ5ccwDataStartDataRangeOvershoot  (107)


[0629] 3. Compute the circle angles for the blocks in the clockwise move.


start of acceleration span: θ1clw5ccw  (108)


start of first half data arc: θ2clw4ccw  (109)


start of second-half data arc: θ3clw3ccw  (110)


start of deceleration arc: θ4clw2ccw  (111)


end of deceleration arc: θ2clw1ccw  (112)


[0630] 4. Generate strings for the modal interpolation type, circle plane, logical axes and circle center names that correspond to the horizontal, vertical, and perpendicular axes of the circle plane.
44{XY:Gplane=''G17'',Hax=''X'',Hctr=''I'',Vax=''Y'',Vctr=''J'',Pax=''Z'',Gintp={ccw:''G3.02''clw:''G2.02''..................................................................................................................................XZ:Gplane=''G18'',Hax=''X'',Hctr=''I'',Vax=''Z'',Vctr=''K'',Pax=''Y'',Gintp={ccw:''G2.02''clw:''G3.02''..................................................................................................................................YZ:Gplane=''G19'',Hax=''Y'',Hctr=''J'',Vax=''Z'',Vctr=''K'',Pax=''Z'',Gintp={ccw:''G3.02''clw:''G2.02''(113)


[0631] 5. Generate the feedin block to move the axes linearly along the orientation of the ballbar toward the circle-center.


[0632] incremental axis motion in hvp system




h=−
1.5·cosφ·cos(θ1); v=−1.5·cos φ·sin(θ1); p=−1.5·sin φ  (114)



[0633] block string


[0634] str=“G91G1”<Hax><h><Vax><v><Pax><p>


[0635] 6. Generate the acceleration arc block.


[0636] incremental coordinates of arc end-point in h-v-p system




h


end


=R


Circle
·cos(θ2−θ1); vend=RCircle·sin(θ2−θ1); pctr=0  (115)



[0637] incremental coordinates of circle-center in h-v-p system




h


cfr


=R


Circle
·cos(θ1); vctr=−RCircle·sin(θ1); pctr=0  (116)



[0638] block string


[0639] str=“G91” <Gplane> <Gintp> <Hax><hend> <Hctr><hctr> <Vax><vend> <Vctr><vctr>


[0640] 7. Generate the first half data-arc block


[0641] incremental coordinates of arc end-point in h-v-p system




h


end


=R


Circle
·cos(θ3−θ2); vend=RCircle·sin(θ3−θ2); pend=0 (117)



[0642] incremental coordinates of circle-center in h-v-p system




h


ctr


=−R


Circle
·cos(θ2); vctr=−RCircle·sin(θ2); pctr=0  (118)



[0643] block string


[0644] str=“G91” <Gplane> <Gintp> <Hax><hend> <Hctr><hctr> <Vax><vend> <Vctr><vctr>


[0645] 8. Generate the second half data-arc block


[0646] incremental coordinates of arc end-point in h-v-p system




h


end


=R


Circle
·cos(θ4−θ3); vend=RCircle·sin(θ4−θ3); pend=0  (119)



[0647] incremental coordinates of circle-center in h-v-p system




h


ctr


=−R


Circle
·cos(θ3); vctr=−RCircle·sin(θ3); pctr=0  (120)



[0648] block string


[0649] str=“G91” <Gplane> <Gintp> <Hax><hend> <Hctr><hctr> <Vax><vend> <Vctr><vctr>


[0650] 9. Generate the deceleration-arc block


[0651] incremental coordinates of arc end-point in h-v-p system




h


end


·R


Circle
·cos(θ5−θ4); vend=RCircle·sin(θ5−θ4); pend=0  (121)



[0652] incremental coordinates of circle-center in h-v-p system




h


ctr


=−R


Circle
·cos(θ4); vctr=−RCircle·sin(θ4); pctr=0  (122)



[0653] block string


[0654] str=“G91” <Gplane> <Gintp> <Hax><hend> <Hctr><hctr> <Vax><vend> <Vctr><vctr>


[0655] 10. Generate the feedout block to move the axes linearly along the orientation of the ballbar away from the circle-center.


[0656] incremental axis motion in hvp system.




h=
1.5·cos φ·cos(θ5); v=1.5·cos φ·sin(θ5); p=1.5·sin φ  (123)



[0657] block string


[0658] str=“G91G1” <Hax><h> <Vax><v> <Pax><p>


[0659] An exemplary backlash test part program causes the axes to move to a number of locations at circle quadrant boundaries and, at these locations, effects the axis motion associated with a backlash measurement. The measurements take place at each quadrant boundary encountered along the data arc when traversed in a counter-clockwise direction. The counter-clockwise motion begins and ends at the same locations as the continuous-motion counter-clockwise test.


[0660] A suspend-loop can be inserted in the program after the final block that is part of the ccw arc. This can be followed by a clockwise arc to move the ballbar back to its start position (and to unwind a ballbar cord, if necessary). The final block that is part of the clockwise arc can be followed by a suspend-loop.


[0661] The circle quadrant boundaries can be defined as the locations on the circle whose counter-clockwise angle relative to the positive horizontal axis is 0°, 90°, 180°, and 270°. A test_point can be established for each of these quadrant boundaries that is within the range of the data arc identified in test setup data. For each test_point, a series of moves along the circle radial can be made to accommodate, for example, three ballbar measurements.


[0662] Prior to performing the first measurement, the axes move to a position to ensure that the first measurement position is approached from the correct direction. The approach_loc coordinates can be along the circle radial that intersects the test_point a distance from the center that is greater the Rcircle. The first measurement, meas1, for a particular test point can be made when the axes are at rest a distance Rcircle from the circle center, where the location was approached with a single axis move originating at approach_loc.


[0663] The second measurement, meas2, for a particular point can be made at a location along the quadrant boundary radial a distance somewhat less than Rcircle from the circle center and can be approached directly from the location of meas1. The third measurement, meas3, for a particular point can be made at the same location as meas1, but is approached from the opposite direction as meas1; the location for meas3 can be approached directly from the location of meas2.


[0664] Dwell blocks can be inserted after each block that approaches a measurement location to provide an opportunity for ballbar data to be collected while the axis is at rest. The blocks associated with the measurements at a given test_point can be followed by a circular move block to the next quadrant boundary test point where blocks for measurements at that point can be inserted. This exemplary motion is illustrated schematically in FIG. 26 for a case where the data-arc spans three of the four quadrants. In the figure, the apparent spacing along the arc between the measurements at a single test_point is not intended to represent any real relative displacement, but is included only to make the figure readable.


[0665] Each block in the part program has a unique sequence number greater than the sequence number of the preceding block. The sequence numbers can, for example, be used by the TIP FSM as transition stimuli to ensure that the proper ballbar data is collected and that it is attributed to the proper measurement. In order to accommodate this mechanism, the function that generates the backlash part program can populate and return a data structure that contains program specific information for use by the TIP FSM. The structure identifies a hierarchy of information described by the diagram shown in FIG. 27. The notation of FIG. 27 is UML (Unified Modeling Language) and is used extensively in the field of object-oriented design.


[0666] The highest level in the hierarchy, bck_test, contains information pertaining to the backlash test. Bck_test has an aggregation of the two run-arc structures; one for a counter-clockwise directed arc and one for a clockwise directed arc. In an exemplary embodiment, measurements are performed only during the counter-clockwise arc, and the bck_test contains a clockwise run_arc to return the axes to their start position (e.g., while unwinding the ballbar cord).


[0667] The run_arc data pertains to information for a particular arc. An exemplary run_arc has an aggregation of zero to four test_point structures. The test point contains information related to one of the quadrant-crossing test points. In an exemplary embodiment, the run_arc contains one or more test_point objects. The number of test_point objects owned by each run_arc can be equal and depend on the data arc start angle and the data arc length.


[0668] According to one embodiment, if the run_arc contains only one test point, then a backlash estimate for only one of the horizontal or vertical axes is developed. If the run arc contains two or more test points, then a backlash estimate for both horizontal and vertical axes can be developed. The test_points contain data to identify the axis to which the backlash measurement applies. The test points owned by the counter-clockwise run_arc each contain an aggregation of three measurement objects. The test-points owned by the clockwise run_arcs do not own any measurements because they serve merely to form a path through which to move to unwind the ballbar cord.


[0669] In an exemplary embodiment, there is one measurement structure for each of the locations meas1, meas2, meas3, at each test_point, as indicated in FIG. 26. The data contained in each of these four objects can be utilized by, for example, a TIP FSM. Some of the data can be initialized during the generation of the program blocks for the backlash test. Explanations of the individual data items are given below.


[0670] bck_test


[0671] 1) backlash[2]: The estimated backlash for the horizontal=1 and vertical=2 axis. The values can be computed by averaging the backlash estimates for each test point that contains a measurement of backlash for the particular axis. *


[0672] 2) validest[2]: An indicator of whether the corresponding value in the backlash array is valid.**


[0673] run_arc


[0674] 1) direction: The direction of the run_arc +1=ccw, −1=clw in terms of the machine coordinates (not necessarily the direction in the circle plane coordinates: e.g. for YZ ccw direction=−1)


[0675] 2) program_string: A character string containing the motion blocks for the run arc.


[0676] 3) first_seqnum: The sequence number of the first block in the run arc.


[0677] 4) last_seqnum: The sequence number of the last block in the run arc.


[0678] test_point


[0679] 1) nominal_loc[3]: The logical axis machine coordinates (X Y Z) of the test_point.


[0680] 2) log_axis_ndx: The logical axis (X, Y, or Z) whose backlash is measured at this test_point.


[0681] 3) plane_axis_ndx: The circle plane axis (Horizontal or Vertical) whose backlash is measured at this test_point.


[0682] 4) backlash: The axis backlash measurement for this test point.**


[0683] 5) valid: An indicator whether the value stored under this test_point's backlash is valid.***


[0684] 6) first_seqnum: The sequence number of the block that arcs to the current test point.


[0685] 7) last_seqnum: The sequence number of the block that arcs from the current test point.


[0686] measurement


[0687] 1) start_seqnum: The sequence number where ballbar measurements begin.†


[0688] 2) stop_seqnum: The sequence number where ballbar measurements cease.


[0689] 3) measnum: An indicator of which measurement the current structure pertains to (e.g., 1,2, or 3)


[0690] 4) data[250]: A container for the sequence of ballbar measurement samples.**


[0691] 5) datasize: The number of entries in data[ ] that represent a valid ballbar sample.**


[0692] 6) mean: The average of the valid samples contained in data[ ].**


[0693] 7) stdev: The standard deviation of the valid samples contained in data[ ].**


[0694] notes: * set after completion of the backlash test


[0695] ** set during execution of the TIP FSM


[0696] *** updated during execution of the TIP FSM


[0697] † set during generation of the part program


[0698] An exemplary procedure for generating the program blocks and initializing the values in the structures is described by the flow chart in FIG. 28. The flowchart shows how the program blocks to effect the motion depicted by FIG. 26 can be created. It is implied in the flowchart that each block has a sequence number that is equal to the value of NSEQ at the time the block is created. The flowchart shows how the sequence numbers of blocks where measurements take place can be stored in the data structure. Motion blocks can be incremental and the calculations for circular interpolation parameters and direction can be very similar to those presented in the previous discussion regarding a continuous motion program.


[0699] A measurement block is a dwell (a pause for a specified period of time) that is immediately preceded by a dwell and immediately followed by the dwell. In an exemplary embodiment, each of these dwells consumes the minimum amount of time possible. The dwell time for the measurement block can be determined based on the desired number of contiguous data samples to be taken and the expected latency between successive invocations of the FMS's state activities method.
45Tdwellmeasure=Nresampfsample·Nsample_desired+TLatency(124)


[0700] The dwell immediately preceding the data-collection dwell can serve to allow the axis enough time to unwind (i.e., reach a steady-state location). This amount of time may vary from machine to machine and can be configurable. In an exemplary embodiment, the dwell immediately following the data collection dwell provides a margin of safety in case the interval latency is longer than expected.


[0701] An alternative solution involves one that does not require up-front knowledge of the unwind time and the interval between invocation of in-state-actions. The alternative embodiment might be more likely to minimize the total dwell time for each measurement. This embodiment is not depicted in FIG. 26 or the TIP FSM diagram in FIG. 29 (see below), but could be implemented using a very similar underlying structure.


[0702] For example, dwell blocks can be replaced by a suspend-loop. When a TIP detects that the program execution has entered the suspend-loop (e.g., by polling * sequence number), it transitions to a state that polls the ballbar data. When statistical analysis of the ballbar data indicates that the axes have attained a steady-state condition, the TIP state transitions to one where the ballbar data is collected. After collecting the necessary samples, a FSM can issue a waitinloop(release) to allow the program execution to proceed to the next measurement location. The FSM state transitions to one waiting for the sequence number of the next suspend-loop. Such an embodiment is expected to be particularly advantageous for extended applications where many steady-state measurements at a variety of locations are involved and where minimization of time for each measurement can be potentially important.


[0703] A TestInProgress finite state machine can run for each invocation of the FSM's state activity method when the state of a parent RunTestCoordinator finite state machine is TestInProgress. An exemplary FSM diagram for a TestInProgress (TIP) is provided in FIG. 29. The at-entry actions, state activity, and at-exit actions for a TestInProgress parent state have been previously discussed. The discussion will now focus on nested states, nested transitions, and actions that occur at-entry of a nested state, nested state activity, at-exit actions of a nested state, and transitions between nested states.


[0704] The exemplary TIP FSM can be divided into two sections: one for the performance of a continuous motion test and one for performance of a backlash test. For example, a continuous motion test can be performed first and a backlash test can be performed second (if, for example, its execution was specified by the user). Individual nested states are now described.


[0705] The default state for an exemplary TIP FSM can be PreTest (e.g., the state of the TIP FSM is reset to PreTest whenever the RTC state transitions into TestInProgress). A purpose of PreTest can be to initialize data for a continuous motion test and to check that the ballbar is fully extended as expected. In an exemplary embodiment, when PreTest is entered, the part program is suspended or will be suspended at a location just before the feed-in move at the start of the (ccw or clw) continuous motion test. An exemplary PreTest state persists until it is certain that the program is executing the suspend-loop.


[0706] The following at-entry actions can be associated with a PreTest state:


[0707] 1) select dyn_run(Nrun), set NSTART and NSTOP: The instance of the bbardata structure that pertains to the test about to be run as indicated by Nrun is selected. The dyn_run structure contains the value for the upcoming run's start sequence number NSTART that is the sequence number of the suspend-loop that immediately precedes the feed-in block. The dyn_run structure also contains the upcoming run's stop sequence number NSTOP that is the sequence number of the suspend-loop that follows the feedout block. The instance of dyn_run also contains memory for storing the entire ballbar measurement and fields that facilitate the data collection process.


[0708] 2) statusmsg( ): “Waiting For Ballbar To Detect Feed-In Move”


[0709] In-state actions associated with the PreTest state can include:


[0710] 1) poll(NSEQ): The sequence number is the factor that stimulates a transition out of PreTest.


[0711] 2) min{D}: Maintain the minimum value for ballbar Deflection (D) that has occurred since the PreTest state has been entered. This can be done to ensure that the ballbar does not unexpectedly enter its active range while the machine is at rest.


[0712] No at-exit actions are associated with the PreTest state. Transitions from the PreTest state include NSEQ≧NSTART. When NSEQ≧NSTART, then the program has reached execution of the suspend-loop and the state transitions to WaitingForTrigger. In an exemplary embodiment, the suspend-loop is not released until the transition into WaitingForTrigger is complete.


[0713] A purpose of the WaitingForTrigger state is to wait for the feed-in move to be detected by the ballbar. As the state is entered, the part program can be suspended in a suspend-loop that precedes, for example, a short dwell block followed by the block that effects the feed-in move. At entry of the WaitingForTrigger state, the waitinloop semaphore can be incremented to release the part program from its suspended condition and the part program execution proceeds to a short dwell block. The state activities test for the trigger event or a timeout event.


[0714] The following at-entry actions can be associated with the WaitingForTrigger state:


[0715] 1) timeoutset( ): capture the time at state entry and select a timeout time that is somewhat greater than the sum of 1) the dwell time that follows the suspend-loop and 2) the estimated time for the feed-in move to bring the ballbar within its active range. According to one embodiment, the time estimate of the second term will have been computed during program generation during estimation of trigger-to-trigger time.


[0716] 2) statusmsg( ): “Waiting For Ballbar To Detect Feed-In Move”


[0717] 3) waitinloop(release): The part program is released from its suspended state as the final at-entry task.


[0718] State Activity associated with the WaitingForTrigger state can include:


[0719] 1) check for timeout: Check whether the total time since the WaitingForTrigger state has been entered exceeds the timeout time.


[0720] 2) check{D}: wait for ballbar deflection to enter valid measurement range. As previously mentioned, the FSM need not explicitly check for the triggering condition because the empty pipe thread monitors for ballbar deflection transitions into and out of range, and any deflection transitions result in invocation of the FSM with the appropriate ballbar triggered stimulus specified.


[0721] There are no at-exit actions associated with the WaitingForTrigger state. The following can be transitions from the WaitingForTrigger state:


[0722] 1) timeout: If the state persists for a period of time longer than expected, there is likely a problem with the test. The timeout could occur when, for example, the ballbar never triggers because it is incorrectly fixtured, the user hits feed hold, the control is in single block mode, etc. The timeout condition causes a transition to the TestProblem state with alert text “The start trigger for ballbar data collection did not occur within the expected period of time—the test is being aborted—hit feed hold and data reset”


[0723] 2) any{D}<Dmax−ε: Dmax is the value output by the ballbar when it is at maximum deflection. When at least one of the resampled ballbar deflection measurements from the most recent data-pipe falls below Dmax by at least some small amount (ε), the ballbar has entered its active range and a trigger event is considered to have taken place. The state transitions to a conditional state where the integrity of the trigger can be tested. During this transition, the data_start_ptr can be set to point to the sample in the resamp_buffer that corresponds to the first sample that met the triggering condition. The conditional state can be exited via one of the two transitions listed below.


[0724] a) false trigger: The existence of a false trigger can be tested by examining the section of the resampled buffer between the data_start_ptr and the list tail_ptr. If any of the measurements in this section of the resamp_buffer have a value greater than or equal to Dmax, then a false trigger can be assumed to have occurred. The sensitivity of the condition for a false trigger may be adjusted by varying E (the trigger_hysteresis attribute of the pipe_resamp_buffer object). A starting value for ε can be 0.05 mm. If a false trigger is detected, the state transitions to TestProblem and the following alert can be generated: “A false trigger has been detected—this can be due to a problem with the ballbar fixturing or machine vibration. Hit feed hold and data reset and try again. If the problem persists, try increasing the value for the parameter: ballbar trigger hysteresis.”


[0725] b) else/initialize num_meas If data in the pipe following the initial measurement that stimulated the transition are in range, then the state transitions to CollectingData. The number of resamp_buffer samples between the data_start_ptr and the list_tail_ptr (inclusive) establishes the initial value for num_meas attribute of the resamp_pipe_buffer object.


[0726] A purpose of the CollectingData state involves keeping track of the elapsed time since the feedin move and to test for the occurrence of the feedout move. At entry actions associated with the CollectingData state can include statusmsg( ) (“Continuos Motion Test In Progress: Run <Nrun> of 2—To Abort: Press ‘Cancel’”). Meanwhile, state activity associated with the CollectingData state can include the following:


[0727] 1) check {D}: Check the values for ballbar deflection that correspond to measurement from the most recent data pipe for a deflection that exceeds the maximum in-range deflection Dmax. Alternatively, this task is performed by the empty pipe thread and detection of a feed out event results in invocation of the FSM with the TRIGOUT stimulus.


[0728] 2) update num_meas: Add the number of samples added to the resamp_buffer during the current interval to the existing value for num_meas.


[0729] 3) check (tmeas): Use the updated value for num_meas to derive the total time since the start trigger: tmeas and compare this value to the estimated value for trigger to trigger time.


[0730] There are no at-exit actions associated with the CollectingData state. The following can be transitions from the CollectingData state:


[0731] 1) any {D}≧Dmax: When any sample derived from the most recent ballbar data pipe exceeds Dmax, the state transitions to a conditional node to test whether the deflection is likely to have been caused by the feedout move. The conditional node computes tmeas, the time since the feed-in trigger, by, for example, multiplying num_meas by Nresamp/fs, and compares this value to the estimated value for trigger to trigger time test. If tmeas is less than test by more than the tolerance tTOL, then the state transitions to TestProblem, otherwise the state transitions to WaitForTestCompl.


[0732] 2) tmeas>test+tTOL: If this condition occurs before the detection of the feedout move, then the state transitions to TestProblem. The existence of this condition, tmeas>test+ttol, indicates that a period of time greater than the estimated test time has elapsed since the feed-in trigger without the occurrence of the feedout trigger. This could be caused by, for example, a problem with the ballbar fixture, a feedhold press by the user, or a very large circle center offset.


[0733] 3) NSEQ≧NSTOP: If this condition occurs before the detection of the feedout move, then the state transitions to TestProblem. According to an exemplary embodiment, if the sequence number is greater or equal to NSTOP, the sequence number of the blocks comprising the suspend-loop following the feedout move, then the feedout move will have occurred, but the ballbar will have not been extended. This could be caused by, for example, a ballbar fixturing problem or a very large center offset.


[0734] The WaitForTestCompl state can be entered upon completion of a successful continuous motion measurement. A purpose of this state involves waiting for the feedout block to complete and for the control to enter the suspend-loop that follows the blocks associated with a continuous motion test. The transitions out of this state can be to:


[0735] 1) PreTest: for the case where the first continuous motion test (circle-plane-ccw) has just completed and the second test (circle-plane-clw) is pending.


[0736] 2) PreBacklash: for the case where the second continuous motion test (circle-plane-clw) has just completed and a backlash test is to be performed.


[0737] 3) WaitForAtEOP: for the case where the second continuous motion test has just completed and a backlash test is not to be performed.


[0738] 4) TestProblem: for the case where the state has persisted in WaitForTestCompl for a period of time longer than expected.


[0739] Additional discussions regarding this state have to do with the actions taken during a successful transition out of the state due to the condition NSEQ≧NSTOP. One of the actions of this transition can be to extract data-arc data from trigger-to-trigger data contained in the resamp_pipe_buffer. The raw data can then be manipulated to obtain a representation of circle radius. Discussions of these topics are provided later herein.


[0740] The PreBacklash state provides a state between the end of a continuous motion test and the beginning of a backlash test. It can also provide a mechanism to enable the system to perform backlash measurements along both the counter-clockwise and clockwise arcs. In an exemplary embodiment, however, measurements are only taken along the counter-clockwise-arc. The state transitions out of PreBacklash when the sequence number of the active block is greater than or equal to the sequence number of the first block of the pending backlash arc (e.g., run_arc[Nrun].first_seqnum≧NSEQ). In response to this condition, the state transitions to BacklashIdle.


[0741] At entry of BacklashIdle, the current or upcoming test point and measurement objects can be identified, and the start and stop sequence numbers to identify the program bracket where these objects are applicable can be extracted. The state activity compares the most recent sequence number of the currently executing block to the start and stop sequence numbers for the measurement and test point, and initiates a state transition when appropriate. At-entry actions associated with the BacklashIdle state can include:


[0742] 1) identify context: The run number Nrun is known when the state is BacklashIdle. The test_point index Ntestpoint can be determined by checking Nfirstseqnum and Nlastseqnum for the current test_point structure and comparing this to the most recent value for the program active block sequence number NSEQ. If NSEQ is greater than or equal to Nlastseqnum, then the test point index Ntestpoint can be incremented by one, the current test point structure can be re-assigned, the test point's Nfirstseqnum and Nlastseqnum can be extracted from the new test point structure, and the measurement index Nmeas can be set to one. If the test point had not changed, then the measurement index Nmeas can be incremented by one. The measurement start and stop sequence numbers NSTOP and NSTART can be extracted from the measurement structure identified by Ntestpoint and Nmeas.


[0743] 2) compute_backlash(testpt): If the test point index had been incremented during the identify context at-entry action, then the backlash parameter for the previous test point can be computed and stored in that test-point's data structure. The backlash can simply be measurement[3].mean−measurement[1] mean. State activity associated with the BacklashIdle state can include poll NSEQ. The sequence number of the active part program block can be tested to determine whether it is within the expected range for the current test point and measurement. It can also be tested to determine whether the active block is the block in which the measurement should take place. There are no at-exit actions associated with BacklashIdle


[0744] Transitions from BacklashIdle can include:


[0745] 1) invalid NSEQ: The sequence number of the actively executing part program block can be considered invalid if it is not within the range from the current test point's first sequence number to the current measurement's stop sequence number (inclusive). That is, the current sequence number is invalid if the following inequality is false: test_point[Ntestpoint].first_seqnum≧NSEQ≧test_point[Ntestpoint].meas[Nmeas].stop_seqnum. This situation is most likely to occur for the case where NSEQ is too large, which could occur if the FSM is “starved” for resources and falls behind the part program execution. The invalid NSEQ stimulus would likely be superseded by the data discontiguous error initiated from the parent-state's activity of testing for ballbar errors. The case of NSEQ being too small should never occur, but can be included for the sake of robustness (e.g., to help identify a design or implementation error). In any case, if the inequality evaluates to false, the state transitions to TestProblem where the following alert message can be displayed: “There has been a problem with the synchronization between the part program and the backlash measurements: please try the test again. If the problem persists contact your service representative.” This stimulus is not expected to occur if the waitinloop approach described with respect to the autogeneration of a backlash test program is employed.


[0746] 2) NSEQ==NSTART: If the sequence number is within the expected range identified above, then it can be tested to determine whether the part program block associated with the measurement is currently the active block. If it is the active block (NSEQ==NSTART), then the state transitions to BacklashMeasuring.


[0747] 3) NSEQ>NSEQLAST: When the part program sequence number is greater than or equal the current run's sequence number, run[Nrun].last_seqnum, then the state transitions to WaitForAtEOP where the FSM waits for the test part program to perform the clockwise move (to unwind the cord) and for write access to be gained to the MDI buffer. The transition in the FSM shows how this can be accomplished by incrementing Nrun and then testing it for greater than 1. This can be included in the FSM to enable additional measurements for multiple run's to accommodate extended application of the FSM beyond the scope of the design discussed by example herein.


[0748] A purpose of a BacklashMeasuring state can be to copy data from the ballbar pipe to the data buffer area in the measurement structure while the part program is executing the dwell associated with the measurement. There are no at-entry actions associated with the BacklashMeasuring state. The following can be state activities associated with the BacklashMeasuring state:


[0749] 1) buffer data: Data from the FSM's copy of the ballbar pipe is appended to the end of the backlash measurement's data area. When the measurement's data array is filled to maximum capacity, this action ceases but the state remains BacklashMeasuring.


[0750] 2) poll NSEQ: Check for the sequence number of the active part program block to increase thereby indicating that the measurement should end.


[0751] Meanwhile, the at-exit actions associated with the BacklashMeasuring state can include check data. In an exemplary embodiment, the backlash measurement contains at least a specified minimum number of samples representing a steady-state constant axis position. The standard deviation of the measurement data can be computed and compared to a minimum acceptable value. If the standard deviation exceeds the minimum acceptable value, then the measurement can be considered invalid. In an exemplary embodiment, the minimum acceptable value considers the effects of axis vibrations and measurement noise (e.g., a good starting value might be 0.10 microns). If the machine axis has large vibration levels, then this value may need to be increased. A purpose of the test can be to discard measurements that take place when the axis has not yet reached steady-state. For axes with high levels of servo-induced vibration, the value for the standard deviation threshold may involve adjustment.


[0752] Transitions from the BacklashMeasuring state can include NSEQ≧NSTOP. When the sequence number of the active part program block increases to beyond the stop sequence number for the current measurement (e.g., the sequence number of the dwell following the measurement dwell) then the state attempts to transition back to BacklashIdle in preparation for the next measurement. If the data collected during the recent measurement is found to be invalid as described above, then the state transitions to TestProblem


[0753] The WaitForAtEOP state waits for the part program execution to complete after the final backlash measurement has been successful. According to an exemplary embodiment, when the ateop condition is encountered, the MDI part program will have completed execution and write access will have been obtained to the MDI buffer. This condition stimulates a transition of the parent RTC FSM state from the TestInProgress to TestComplete.


[0754] When the ateop condition is encountered, prior to exiting the in-state action, the backlash for the horizontal and vertical axes can be computed. The backlash value for the horizontal axis can be obtained by averaging together the valid backlash measurements for the test points associated with the horizontal axis and copying the result to the first element of the array in the bck_test structure's backlash field. If there are no valid measurements, then the first array element of the valid field in the bck_test structure can be set false; otherwise, it is set true. Similarly the second elements of the valid and backlash arrays in the bek structure can be populated with vertical axis testpoints.


[0755] The TestProblem state serves as a location where the TIP FSM waits for the user to acknowledge an alert generated by some error condition from within the TIP FSM. The text of the alert can be specified during the transition into the TestProblem state. The callback method for this instance of the reusable AlertMessage can be a call of the RTC FSM method to transition to the instance of W indicated in the FSM diagram.


[0756] Data processing that can take place for each transition out of the TIP FSM's WaitForTestCompl state is described below. For example, a description will be given on how a segment within a continuous motion test's data buffer that corresponds to a data arc can be identified.


[0757] Each continuous motion test result (ccw and clw) contains the contiguous ballbar data from the feed-in trigger to the feedout trigger. Since the feedrate for the data arc is constant, the segment of the buffer that corresponds to the data arc has a length (in samples) that is equal to the effective sampling frequency multiplied by the arc-length in mm divided by the programmed feedrate.
46Ldata_arc=Rcircle·π180·θdata_arc_length160F·fsNresamp(125)


[0758] The start point for the segment of data to extract can be determined by considering the phase distortion effect of the position controller and the difference between the estimated trigger to trigger time and the actual trigger to trigger time.


[0759] The conversion of raw data measurement to a circle radius adjusts the measurement based on ballbar length and takes into account the possibility that the ballbar length may be greater than the circle radius. When the ballbar is powered on, the calibration offset and the ballbar scale factor can be specified such that the measurement data placed in the pipe by the ballbar driver contains adjustments for these factors. If the data indicates that the ballbar is not length calibrated, then zero can be passed as the calibration offset. The absolute ballbar length measurement can be obtained by adding the nominal ballbar length to the data from the pipe.


[0760] If the ballbar is length calibrated, the resultant sum represents the true ballbar length for the measurement. Otherwise, it represents an approximate length. This value (true or approximate length) can then be adjusted to account for the possibility of a non-zero cone angle by, for example, multiplying the raw measurement of ballbar Displacement D, by the cosine of the cone angle—the ratio of programmed circle radius to nominal ballbar length.
47r(t)=RcircleLballbar·D(t)(126)


[0761] Yet another capability of, for example, a run-test page such as run-test page 30 could be ballbar length calibration. Ballbar length calibration is implemented within the scope of the exemplary RTC FSM described herein, but may take place in an exemplary embodiment regardless of the RTC state as long as there is no actively executing part program and as long as the ballbar is turned off (i.e. the ballbar state is uninitialized).


[0762] An exemplary mechanism for accomplishing ballbar length calibration is shown in the FSM diagram in FIG. 30. The “H” surrounded by a circle represents the historic state of the RTC FSM (i.e., the state that was active when the FSM was interrupted to perform a calibration). Transitions into the historic state result in the performance of the at-entry actions for the specific state.


[0763] A calibrate button can, for example, be disabled at entry of various states within the RTC FSM and the press(calibrate) stimulus cannot occur. In cases where the calibrate button is enabled, a user press of the calibrate button can cause the evaluation of a test to see whether the MDI part program is in an ateop state and whether the ballbar is off. If the MDI part program is not in an ateop state or if the ballbar is not off, then the press(calibrate) action can be ignored (as indicated by returning to the historic state of the RTC FSM).


[0764] If the state of the MDI program is ateop and the ballbar is turned off, then the RTC state can transition to calibrating state. The historic state of the RTC FSM can be retained during the transition. Upon entry of the calibrating state, the ballbar can be initialized, powered on, and configured with the correct scale factor and a calibration offset of 0. The ballbar can then be commanded to begin collecting data to its data pipe.


[0765] Also upon entry of calibrating state, the timeout time can be set to some value that corresponds to somewhat more than the amount of time to collect, for example, 1000 ballbar measurement samples at the full sampling rate fs. The state activity of the calibrating state can be invoked for each subsequent recurrent invocation of the RTC FSM from the run-test thread. The state transitions out of calibrating state and into an alert state if a timeout condition or ballbar error occurs. The timeout condition occurs when the state has persisted as calibrating for a time period that exceeds the expected maximum.


[0766] The possibility of a ballbar error condition can be tested prior to each interrogation of the ballbar pipe. The alert state can transition to the historic RTC FSM state when the alert acknowledge is received. The state transition out of calibrating that represents a successful calibration measurement takes place after, for example, 1000 ballbar measurements have been collected. During this transition, the ballbar offset can be computed and a data integrity check performed.


[0767] If the data is found to be okay, then a length-calibrated status can be set to true and the state transitions to the historic state of the RTC FSM. If the data integrity test fails, then the state transitions to an AlertMessage state and the length-calibrated status can be set to false. Acknowledgement of the alert causes a transition into the historic state of the RTC FSM.


[0768] A data validity test can involve computation of the standard deviation of the 1000 measurement samples. If the standard deviation is less than, for example, 0.01 microns, the data can be considered valid; otherwise, it can be considered invalid. The length calibration offset is the value that can be added to the raw data measurements to obtain an absolute ballbar length measurement. The calibration offset can be computed by subtracting the average of the thousand points from the user-entered value for the calibration fixture length.
48Lcalib_offset=Lcalib_fixture-(11000i=11000Di)-Lnominal(127)


[0769] Software, such as ATB software capable of running on, for example, Acramatic Release 4 and/or Release 5 software, can be written using, for example, the Matlab programming language and employing capabilities of the Matlab math and graphics libraries. Standalone versions that do not require an installation of Matlab software can also be created, such as by using a Matlab Compiler to convert the M-code to C-code. Workstation services layer capabilities can be accessed through Matlab Mex Files that act as an interface between the Matlab source code and the C-code calling conventions of the services functions. Other software implementations could use other languages and graphics libraries. In an exemplary embodiment, mathematical analysis, thread handling, machine configuration data management, and/or finite state machines can, for example, be written in C or C++ and employ, for example, Win32 API. Meanwhile, and also in an exemplary embodiment, graphical user interfaces can be written in Visual Basic and re-use, where possible, objects from existing set of controls (e.g., A2100 ActiveX controls).


[0770] One advantage associated with certain ones of the described exemplary embodiments of the present invention involves providing a quick and easy to use method of determining machine compensation values. This capability is expected to be useful to, among others, machine tool OEM's, control retrofitters, and machine tool end users. For example, and with respect to ballbar testing, a technician at an OEM runoff line might utilize an embodiment of the present invention to use a series of standard test setups that are present at initial invocation (e.g., of an applet) or are loaded in (e.g., from files from the disk of a control). Accuracy statistics derived from the measurement data could be recorded to a file that may be permanently stored in the OEM's database. The technician could indicate that the control should update its compensation parameters to correct for any errors present.


[0771] Meanwhile, a higher level technician or engineer might utilize such an embodiment to design standard setups to use during runoff. The higher level technician could also design and perform non-standard tests to assess overall machine performance or to diagnose manufacturing problems. In both cases, it can be desirable if a test is easy to perform with minimal expertise and take a minimal amount of time to complete.


[0772] In one embodiment, the total time to perform tasks for a major plane calibration using a ballbar should be less than three minutes. These tasks include fixturing setups, test execution, update of compensation, and second test execution to verify the compensation. Auto tuning of compensation may be also very useful to OEM's of lower cost machines who do not perform a full laser calibration on their machines because of the additional cost due to the length of time involved.


[0773] A control retrofitter might similarly benefit from the ease of use and quick test times. For example, a retrofitter could benefit from auto-tuning aspects of certain embodiment of the present invention in that a machine can be compensated with a minimal amount of effort. For the sake of comparison with an embodiment of the present invention involving a ballbar test, it is noted that using a laser interferometer to develop data tables for bidirectional axis compensation and cross axis compensation could take as long as several days of effort.


[0774] Still further, an end user might benefit from embodiments of the present invention involving ballbar testing in several ways. For example, the ease with which a ballbar measurement can be obtained might encourage maintenance teams to perform tests at regular intervals in order to develop a record of the machine performance. This record could be used, for example, as part of a predictive maintenance program. Moreover, a machine tool operator could perform a ballbar test prior to the machining process. In this scenario, the machine could be compensated for its existing errors due to the thermal conditions at that point in time. Additionally, the range of test could be limited to the machining envelope of the job about to be performed such that the compensation is optimized for a limited-range machining envelope. This could enable an end-user to produce parts with accuracy that surpasses the accuracy specifications of the machine.


[0775] The foregoing descriptions of exemplary embodiments of the invention have been presented for purposes of illustration and description only. They are not intended to be exhaustive or to limit the invention to the precise forms disclosed, and modifications and variations are possible and contemplated in light of the above teachings. While a number of exemplary and alternate embodiments, methods, systems, configurations, and potential applications have been described, it should be understood that many variations and alternatives could be utilized without departing from the scope of the invention. Moreover, although a variety of potential configurations and components have been described, it should be understood that a number of other configurations and components could be utilized without departing from the scope of the invention.


[0776] For example, several aspects of exemplary embodiments discussed herein are based on a constraint that the data from a particular ballbar cannot be directly synchronized to internal control data. If direct synchronization is possible then this data could, for example, be employed directly to allow for a potentially more powerful and robust analysis of data. For example, the axis feedback positions could be used to compute an exact angle for each ballbar measurement (as opposed to, e.g., a technique of estimating the angle based on elapsed time and an emulation of the interpolator). The axis feedback measurement could also be used to obtain parameters for a more precise lost motion model that accounts for the exact nature of a windup/backlash transient. Such capabilities might also simplify the exemplary RTC and TIP Finite State Machines embodiments previously discussed by example herein.


[0777] Moreover, although certain ones of the exemplary embodiments previously discussed herein were based around an existing Renishaw ballbar product, other embodiments of the present invention can be adapted with respect to, for example, other types of sensors, including other displacement sensors and other communication interfaces. For example, ballbars that output data such as A quad B encoder signals could potentially provide exact synchronization between the ballbar and internal control data to provide advantages such as those described above.


[0778] In addition, capabilities such as automatic derivation of proposals for adjustments of friction feedforward parameters can be included. Such a capability might address performance problems that arise due to the difference between a friction transient and an ideal Coulomb friction model assumed (e.g., by feedforward auto tuning). An iterative approach for friction compensation adjustments has been outlined in this application that identifies a basis for an algorithm that could be employed to address such issues. Still further, the techniques and approaches laid out in this application are expected to be largely adaptable to other product lines of controllers, such as the Siemens 840 and Sinumeric CNC controller product lines, for example.


[0779] One potential limitation of exemplary embodiments as described herein can be that the compensation parameters derived from a ballbar measurement are only reliably applicable to regions of the machining envelope that are contained within the envelope of the ballbar tests used to derive the parameters. Typically, the results from three measurements (one for each of the XY, XZ, YZ plane) are used to develop machine compensation parameters. The range of motion associated with these tests identifies a volume within the machine envelope where the parametric compensation is known to be applicable.


[0780] The entire machine envelope could be accurately represented by the compensation parameters if the parameters could be derived based on multiple measurements in each plane, where the combined area for each measurement spans the entire machine envelope for the plane. For example, this could be done by simultaneously analyzing multiple measurements or by computing a weighted average of results from individual measurements. Such a capability might also involve modification to the overall exemplary test environment previously described herein that is designed around the idea that a single (bidirectional) ballbar test is used to derive the compensation parameters for the test plane.


[0781] Axis angular errors (roll pitch yaw) may cause linear motion that may be interpreted as squareness and straightness errors by the curve fitting used in certain exemplary embodiments disclosed herein. In an alternative embodiment, for example, the affect of each angular error type on the ballbar measurement could be quantified, and an expanded set of tests and analyses determined, to enable angular errors to be distinguished from displacement errors and extract parameters for both error types. For example, compensation software that compensates the displacement error effects of angular errors could be included. Compensation of this type would likely involve compensating an axis position based on the position of the multiple linear axes (e.g., all three).


[0782] The tasks performed by a user with respect to certain embodiment disclosed herein may also be further automated by, for example, locating the physical ballbar test setup on a pallet that can be automatically loaded into the machine. A public interface (such as that of the A2100) could be used to generate any required “cycle start” presses. The tool holder containing the magnetic cup could be placed in the machine's tool magazine.


[0783] A ballbar fixture on the pallet can contain the ballbar already attached to the center ball at a pre-determined location on the pallet. The test setup data can contain the parameters for this predetermined test location. The ballbar can be resting on a support post from which it can be picked up by the tool. A hook can be used to drop the ballbar off back onto its support post once the testing is complete. One associated advantage of such an embodiment could involve facilitating the automatic scheduling of machine recalibration in a fully automated environment.


[0784] A ballbar also has potential for use as a sensor to enable automated estimation of a machine's structural dynamics parameters. Such a capability might be required with, for example, auto-tuning parameters of a feedforward controller taking into account the deflection and oscillation of machine tool members whose positions are not directly measured by the position feedback sensor. For example, a ballbar could be used to estimate the stiffness and damping parameters of a machine's structural modes by employing it to measure the relative motion between the machine tool's spindle nose and the workholding table. These measurements can be synchronized to measurements of the axis positions and torques.


[0785] Modal parameters can be obtained by correlating the ballbar measurements to the axis measurements taken under conditions of applied excitation signals that contain energy of a wide frequency range. The excitation signals can be generated by, for example, developing a part program that outputs a position command “chirp” that specifies interpolation of a small diameter circle with successively increasing feedrate. The diameter of the circle can be set to be somewhat smaller than the range of the ballbar. This situation can be summarized by FIG. 31. Matrix equations for estimating the axis parameters for an axis with a single dominant mode of vibration are also shown in FIG. 31.


[0786] Accordingly, in an exemplary embodiment, ballbar measurements are synchronized to axis position and torque measurements. Synchronization can be accomplished by, for example, using a ballbar device whose output can be synchronized directly. For cases such as a serial ballbar interface, synchronization might be accomplished during data analysis by matching axis feedback and ballbar measurement data for the chirp time slice that contains only low frequency energy.


[0787] The overall method employed by the exemplary embodiments disclosed herein to generate motion, collect data, and analyze data is also applicable to other auto-tuning applications. For example, referring now to FIG. 32, one embodiment of the present invention involves providing a graphical user interface (GUI) that enables a user to specify test parameters, manually change configuration data, view and analyze measurement/analysis results, and initiate a test sequence. One exemplary approach to accomplishing this involves an interface that can contain test-specific objects such as those listed below:


[0788] 1) GUI for providing the user access to the capabilities specific to the test type


[0789] 2) Program Generation Object to construct part program commands to effect a desired machine motion


[0790] 3) Setup Data Container for storing test parameters and checking their validity.


[0791] 4) Sensor Interface to manage any auxiliary sensors—such as a ballbar device


[0792] 5) Data Integration Object to merge and synchronize data from multiple sources such as NC kernel data acquisition data, data from axis drives, and data from auxiliary sensors.


[0793] 6) Parameter Estimation Curve Fitting Object to provide case-specific requirements for data analysis and parameter extraction.


[0794] 7) Test Execution Coordinator FSM to manage and respond to inputs originating from a user, a RealTime kernel, and sensor objects.


[0795] These objects can be arranged in one embodiment with the relationships roughly defined by FIG. 32.


[0796] Thus, it should be understood that the embodiments and examples have been chosen and described in order to best illustrate the principals of the invention and its practical applications to thereby enable one of ordinary skill in the art to best utilize the invention in various embodiments and with various modifications as are suited for particular uses contemplated. Accordingly, it is intended that the scope of the invention be defined by the claims appended hereto.


Claims
  • 1. A method of determining calibration options in a motion control system using the motion control system comprising the acts of: a) measuring error in a commanded motion; b) modeling the error; c) identifying sources of the error; and d) predicting a degree to which applying compensation for one of the sources of the error might affect the error.
  • 2. The method of claim 1, further comprising the act of applying compensation for one of the sources of error.
  • 3. The method of claim 1, further comprising the act of providing a diagnostics interface displaying the sources of error and an indication of the degree to which applying compensation for a respective one of the sources of error might affect the error.
  • 4. The method of claim 3, wherein the act of providing a diagnostics interface further comprises the act of allowing a user of the motion control system to determine an order in which the sources of error are displayed.
  • 5. The method of claim 3, wherein the act of providing a diagnostics interface further comprises the act of allowing a user of the motion control system to determine whether the sources of error are displayed in an order according to one of a ranking based on relative contribution to the error and a categorical-based grouping.
  • 6. The method of claim 1, further comprising the act of determining an estimate of the compensation that might be applied for one of the sources of the error.
  • 7. A computer readable medium comprising instructions capable of implementing a method of determining calibration options in a motion control system using the motion control system, the method comprising: a) measuring error in a commanded motion; b) modeling the error; c) identifying sources of the error; and d) predicting a degree to which applying compensation for one of the sources of the error might affect the error.
  • 8. A machine tool, comprising: a) an actuator having an attached mechanical member; b) a motion command generator adapted to produce motion commands capable of controlling the actuator; c) a compensator adapted to compensate the motion commands based upon at least one compensation parameter; and d) a controller in communication with the actuator, the motion command generator, and the compensator, and adapted to: i) measure error in a commanded motion; ii) model the error; iii) identify sources of the error; and iv) predict a degree to which applying compensation for one of the sources of the error might affect the error.
Provisional Applications (1)
Number Date Country
60286834 Apr 2001 US