Specific embodiment
Fig. 1 is four layers of coordinate architecture of digital control system in prior art, as shown in the figure.In prior art, digital control system
In set up four layers of coordinate architecture:Lathe coordinate system G53, machine origin biasing coordinate system G92, workpiece coordinate system G54~G59 and
Local coordinate system G52.The initial point of lathe coordinate system G53 is the fixed coordinate system initial point when producing lathes for the manufacturer, also referred to as
Lathe zero point.It has determined when lathe assembles, debugs, and is the datum mark of machine tooling.Lathe in use
Coordinate system to be determined by reference point, after machine tool system starts, carries out referring back to an operation, lathe coordinate system is just set up
?.Coordinate system one is set up, as long as not cutting off the electricity supply, coordinate system would not change.X, Z represent two axial directions respectively.Lathe is former
The initial point O of point biasing coordinate system G92 offsets on the basis of lathe coordinate system G53 initial point and obtains.In process, workpiece coordinate
It is that in G54~G59, only one of which is in active states, currently process the workpiece coordinate system corresponding in workpiece and be in the shape that comes into force
State.In the process of processing, set up local coordinate system G52 on the basis of workpiece coordinate system currently coming into force.
Fig. 2 is the structural representation of Digit Control Machine Tool right-handed Cartesian rectangular coordinate system, as shown in the figure.(1), stretch out the right hand
Thumb, forefinger and middle finger, and 90 degree each other.Then thumb represents X-coordinate, and forefinger represents Y-coordinate, and middle finger represents Z coordinate.
(2), the positive direction being oriented to X-coordinate of thumb, the positive direction being oriented to Y-coordinate of forefinger, middle finger be oriented to Z coordinate
Positive direction.
The coordinate axess of every kind of coordinate system of Digit Control Machine Tool are divided into linear axes (feed shaft) and two kinds of rotary shaft.Fig. 3 is several
Control lathe linear axes and the structural representation of rotary shaft, as shown in the figure.X-axis, Y-axis, Z axis are respectively Digit Control Machine Tool linear axes, enclose
Rotational coordinates around X, Y, Z coordinate rotation is represented with A, B, C respectively, according to right-hand screw rule, thumb be oriented to X, Y, Z
The forward direction of any one axle in coordinate, then the forward direction of the direction of rotation of remaining four finger as rotational coordinates A, B, C.Direction of motion W, V,
The determination principle of U:Workpiece geo-stationary, and tool motion.The direction increasing cutter with workpiece distance is just being each coordinate axess
Direction.
Fig. 4 is the structural representation that machine origin biases coordinate origin biasing, as shown in the figure.Inclined using coordinate origin
Put instruction as follows to realize coordinate origin biasing, form:G92 Xx Yy Zz Aa Bb Cc.In instruction (x, y, z, a, b,
C) it is the new coordinate figure after changing the biasing of coordinate axess initial point in current location.Unspecified axle, the biasing of its coordinate axess initial point is constant.
After executing this instruction, lathe coordinate system does not change, and workpiece coordinate system initial point correspondence biases.
In the present embodiment, before being located at execution G92 instruction, machine origin biasing coordinate origin position is (400,500).
After execution G92X300Y350, machine origin biasing coordinate system G92 coordinate axess origin position automatically becomes as (300,350).Accordingly
Machine origin biasing coordinate system G92 coordinate axess initial point be biased to:Xoffset=100, Yoffset=150.
The initial point biasing of workpiece coordinate system is set by G92IP_ instruction, after execution G92IP_ instructs, point on cutter, and example
As point of a knife is just in the co-ordinate system location specified.Can be the biasing of G92 coordinate axess when work is to G54~G59 workpiece coordinate system initial point
One correction of position.G92 affects the origin position of all workpiece coordinate systems of G54~G59, and only to the coordinate specified by G92
Axle produces impact.
Fig. 5 is the having automatic temp compensating deformation of the present invention and the structural representation of the inclined coordinate system of cutter shape, such as schemes
Shown.Described coordinate system, including coordinate system administrative unit, NC program file storehouse, program code resolution unit, interpolation list
Unit, position-force control unit and driver element, also include tool changing performance element, tool-information data base, control parts of motion
Thermomechanical processing storehouse, sensing unit, cutter thermomechanical processing storehouse, computing unit, coordinate system administrative unit includes point of a knife point coordinates system and builds
Formwork erection block and point of a knife point correction establishment of coordinate system module.
Tool-information data base and tool changing performance element are set up module with point of a knife point coordinates system and are connected, sensing unit, cutter
Thermomechanical processing storehouse and control parts of motion thermomechanical processing storehouse are connected with computing unit, and computing unit is built with point of a knife point correction coordinate system
Formwork erection block connects, and point of a knife point coordinates system is set up module and is connected with point of a knife point correction establishment of coordinate system module, coordinate system administrative unit
It is connected with NC program file storehouse and program code resolution unit, program code resolution unit is connected with interpolation unit, interpolation unit
It is connected with position-force control unit, position-force control unit is connected with driver element.
The operation principle of the having automatic temp compensating deformation of the present invention and the inclined coordinate system of cutter shape is as follows:Processing workpiece
Before, all cutters needing in process to use are carried out with a pair of knife, obtain the point of a knife point offset vector of every kind of cutter,
Store in tool-information data base.Processing workpiece is installed, after selecting and installing process tool, to electricity on Digit Control Machine Tool.Pass through
Return ginseng operation or absolute-type position feedback operation obtains lathe coordinate system coordinate axess initial point.Read motion control point in machine coordinates
Coordinate figure under system, and this coordinate figure feeding point of a knife point coordinates system is set up unit.Motion control point, generally in milling system
It is appointed as spindle nose, turning system is appointed as a certain point being easy to measure of knife rest.When needing to receive tool changing instruction
When, tool changing performance element executes tool changing operation, and point of a knife point coordinates system sets up module and reads current cutter by tool changing performance element
Model, seeks in tool-information data base and takes corresponding point of a knife point offset vector, and the coordinate figure according to motion control point and
Point of a knife point offset vector calculates current point of a knife point and sends into point of a knife point correction establishment of coordinate system after the coordinate in lathe coordinate system
Module, sets up the point of a knife point coordinates system of point of a knife point coordinates system with this for initial point biasing simultaneously and sets up module, and by current point of a knife
The coordinate figure of point initial point biasing sends into point of a knife point correction establishment of coordinate system module.The current tool temperature of sensing unit real-time detection and
Current kinetic control parts temperature, and the temperature detecting is sent into computing unit.Control parts of motion thermomechanical processing is deposited in storehouse
Store up the stroke of control parts of motion at each temperature, store every kind of cutter in cutter thermomechanical processing storehouse at various temperatures
Stroke.Computing unit is transferred under Current Temperatures from cutter thermomechanical processing storehouse according to the cutter Current Temperatures that sensing unit is sent into
This cutter stroke, the temperature of the current kinetic control parts sent into according to sensing unit is from control parts of motion thermomechanical processing storehouse
In transfer the stroke of control parts of motion, and current cutter stroke and control parts of motion stroke sent into point of a knife point repair
Cartesian coordinate system sets up module.Point of a knife point correction establishment of coordinate system module sets up the current of module according to coming from point of a knife point coordinates system
Point of a knife the point stroke of this cutter and motion under the coordinate figure in lathe coordinate system with the Current Temperatures coming from computing unit
The stroke of control parts, the coordinate figure calculating after asking for point of a knife point correction in lathe coordinate system simultaneously sends into program code parsing
Unit, and point of a knife point correction coordinate system is set up for initial point with this point.Program code resolution unit to after point of a knife point correction in lathe
Coordinate figure in coordinate system is converted into interpolation unit discernible motion request instructions, sends to interpolation unit, interpolation list
Unit passes through position-force control unit and driver element controlled motor movement locus.Position-force control unit is according to interpolation unit
Result of calculation and servo position information position-force control is carried out to servo drive unit.
In order to improve digital control system machining accuracy further, the having automatic temp compensating deformation of the present invention and cutter shape are inclined
Coordinate system also includes being connected with computing unit, the tool abrasion data base of storing cutter abrasion length.Computing unit root
According to this cutter this time process time, transfer current tool abrasion from tool abrasion data base, sent into according to sensing unit
Cutter Current Temperatures, transfer this cutter and main shaft stroke under Current Temperatures from cutter thermomechanical processing storehouse, single according to sensing
The control parts of motion Current Temperatures that unit sends into, transfer motor control under Current Temperatures from control parts of motion thermomechanical processing storehouse
The stroke of part, then by current tool abrasion, current cutter and main shaft stroke, current kinetic control parts flexible
Amount sends into point of a knife point correction establishment of coordinate system module.Point of a knife point correction establishment of coordinate system module, according to coming from point of a knife point coordinates
System sets up the current point of a knife point of the module coordinate figure in lathe coordinate system, come from computing unit current tool abrasion,
The stroke of this cutter and main shaft stroke and control parts of motion under Current Temperatures under Current Temperatures, calculates and asks for point of a knife point and repair
After just, the coordinate in lathe coordinate system is put, and sets up point of a knife point correction coordinate system with this point for initial point.
In order to ensure that there is completely compatible traditional numeric-control system architecture, also include lathe in coordinate system administrative unit former
Point biasing establishment of coordinate system module, workpiece coordinate system set up module and local establishment of coordinate system module.Fig. 6 is the automatic of the present invention
Compensation temperature deformation and the structural representation of the inclined embodiment of coordinate system of cutter shape, as shown in the figure.Described coordinate system system
System, including coordinate system administrative unit, NC program file storehouse, program code resolution unit, interpolation unit, position-force control unit
And driver element, also include tool-information data base, detector unit, sensing unit, cutter thermomechanical processing storehouse, computing unit, sit
Mark system administrative unit includes point of a knife point coordinates system and sets up module, point of a knife point correction establishment of coordinate system module, machine origin biasing seat
System sets up module to mark, workpiece coordinate system sets up module and local establishment of coordinate system module.When user selects to adopt original numerical control system
When system mode is operated, point of a knife point coordinates system can not be activated and set up module and point of a knife point correction establishment of coordinate system module, this
When, the coordinate system in coordinate system administrative unit is recovered to four-layer structure of the prior art.Certainly, user can also adopt simultaneously
Six layers of coordinate architecture in coordinate system administrative unit, tighten control degree of accuracy.Now, point of a knife point correction establishment of coordinate system module
It is connected with machine origin biasing establishment of coordinate system module, machine origin biasing establishment of coordinate system module sets up mould with workpiece coordinate system
Block connects, and workpiece coordinate system is set up module and set up module with local coordinate system and is connected.
The present invention obtains point of a knife point offset vector (tool length offset vector) by aim at tool operation.Fig. 7 is in milling
To knife Computing Principle schematic diagram, as shown in the figure.User can reach a specified point with manual operation cutter, and specifies this point in knife
The coordinate after coordinate system after cusp skew, the present invention will be automatically performed the calculating of point of a knife point coordinates offset vector, and is stored in
In tool-information data base.To knife Computing Principle:Vector 1 is motion control point lathe coordinate system coordinate, and vector 2 is specified for user
Point of a knife point changing coordinates;Seek vectorial 3 tool length offset vectors.Vectorial 3=vector 2- vector 1.
Fig. 8 is to knife Computing Principle schematic diagram in turning, as shown in the figure.User can reach one with manual operation cutter
Specified point, and specify this coordinate after the coordinate system after the skew of point of a knife point, it is inclined that the present invention will be automatically performed point of a knife point coordinates
Being calculated and stored in tool-information data base of the amount of shifting to.To knife Computing Principle:Vector 4 is motion control point lathe coordinate system
Coordinate, the point of a knife point changing coordinates that vector 5 is specified for user;Seek vectorial 6 tool length offset vectors.Vectorial 6=vector 5- to
Amount 4.
In order to ensure the accuracy of aim at tool operation, user preferably with same benchmark, carry out all cutters to knife.Many
Knife, using different benchmark, position error between different benchmark is introduced tool length side-play amount, these cutters will be led to simultaneously to join
When processing with a part, the position error between the type face of different tool sharpenings.
Fig. 9 is the having automatic temp compensating deformation of the present invention and the structural representation of the inclined coordinate system embodiment of cutter shape
Figure, as shown in the figure.System includes coordinate system manager, HMI human-computer interaction interface, program code resolver, interpolator, servo bit
Put closed loop controller.Coordinate system manager is used for processing the system function requirement related about coordinate system, coordinate system manager master
The function of wanting has:1) coordinate figure under each coordinate is processed into the coordinate figure under lathe system;2) by the seat under lathe coordinate system
Scale value is processed into the coordinate figure under each coordinate system;3) manage the initial point biasing of each coordinate system;4) various coordinate systems are processed
Activation and the request lost efficacy;Program code resolver is responsible for parsing the automatic processing program that user writes;For meeting interpolator
Input needs to carry out data conversion;Macro-instruction in parsing execution user's automatic processing program, calculate including expression formula, circulate,
Turn, the read-write operation of logical judgment and systematic parameter and macro-variable.Interpolator is responsible for from program code resolver and boundary
The motion service request of face manual operation.These motion service request bags include:The routine locus such as straight line, circular arc.In numerical control
In lathe, the curvilinear motion that cutter can not strictly be processed as requested, can only approach curve to be processed with dog-leg path.
Interpolation (interpolation) is the process that machine tool numerical control system determines cutting tool path according to pattern.It may also be said that
Some data on known curve, the method calculating the intermediate point between known point according to certain algorithm, also referred to as " data point
Densification ".The master data that interpolator inputs according to " program code resolver ", by calculating, the shape description of workpiece profile
Out, calculate according to result of calculation, send position command to position-force control device, thus work pieces process is gone out institute
Need the shape of profile.HMI (Human Machine Interface) human-computer interaction interface is also named " man-machine interface ".Man-machine boundary
Face (also known as user interface or user interface) is to interact the platform exchanging with information between digital control system and operator, it
Realize the conversion between digital control system built-in command information and mankind's acceptable operation format.Servo position closed loop controller
It is the closed-loop control system with the movement position of execution unit (servo electrical machinery system) as control object, closed loop control is cybernetics
A basic conception, be the control mode that is corrected according to control object output feedback, it be measure actual with
When specifying generation deviation, carry out the control method corrected using certain control algolithm (such as pid algorithm).Servo position is closed
Ring controller, is responsible for receiving interpolator result of calculation, and enters line position according to this result and servo position information to servo-driver
Put closed loop control, thus controlled motor drives actuator to realize the motion of accurate position.
Coordinate system manager biases, from coordinate origin, the coordinate figure reading file under lathe coordinate system, by machine coordinates
Coordinate figure under system is processed into the coordinate figure under each coordinate system.Coordinate figure under each coordinate system is sent out by coordinate system manager
Deliver in HMI human-computer interaction interface and shown, that is, show current location coordinate under each coordinate system.It is man-machine that user passes through HMI
Interactive interface arranges, shows the initial point biasing of each coordinate system, and will arrange data is activation to coordinate manager;Coordinate manager
The coordinate figure that coordinate figure under each coordinate is processed under lathe system stores and biases library to coordinate origin.Coordinate system pipe
Reason device also manages the initial point biasing of each coordinate system, and processes various coordinate system activation and the request lost efficacy.Program code solution
Parser is responsible for parsing the automatic processing program that user writes;Input needs for meeting interpolator carry out data conversion;Parsing is held
Macro-instruction in row user's automatic processing program.The master data that interpolator inputs according to " program code resolver ", by meter
Calculate, the shape description of workpiece profile out, calculate according to result of calculation, to position-force control device transmission position
Instruction, thus work pieces process is gone out the shape of required profile.
The present invention can select different operating system and developing instrument according to during developing CNC system, has multiple realization sides
Formula.Realized by C Plus Plus mode in the present embodiment.Figure 10 is the control flow chart of coordinate system administrative unit, as shown in the figure.First
First define a coordinate system class (CCoordSys), for denotation coordination system, coordinate system externally provides with lower interface:
SetName arranges coordinate system name
GetName obtains coordinate system name
SetOVector arranges vector of origin
GetOVector obtains vector of origin
Serialize serializing coordinate system (for preserving and recovering)
Dissolve each coordinate system, such as workpiece coordinate system with this coordinate system class (CCoordSys) example, local coordinate system,
G92 coordinate system etc..
In order to be managed collectively these coordinate systems, define coordinate system management class (CCoordSysMng), unification is to other
Module provides coordinate system related service, provides with lower interface outside coordinate system:
FindCSbyName searches coordinate system with coordinate system title;
SetOVectByName is indexed with coordinate system title and arranges the initial point biasing of coordinate system;
GetOVectByName is indexed with coordinate system title and obtains the initial point biasing of coordinate system;
ActCSbyName is indexed with coordinate system title and comes into force certain coordinate system;
ResetCS reset coordinate system manages class, makes the effective status of coordinate system return to open state;
CalcOVectByName is indexed with coordinate system title, for making present coordinate values calculate for designated value and arrange
Coordinate origin offset vector
Coordinate figure under current coordinate system is converted to the coordinate figure of lathe coordinate system by toMachinePos;
Coordinate figure under current lathe coordinate system is converted to the coordinate figure under current coordinate system by toCoordSysPos;
Serialize serializes, for preserving and recovering coordinate system;
The coordinate figure translation function of coordinate system is actually the computing between vector, and computing is also that simple vector adds
Subtract computing, so we create the pointer chained list CoordSysPList of a coordinate system, one layer of each of chained list element representation
Coordinate system pointer, when this layer has coordinate system activation effective, pointer points to the coordinate system of this activation, when this layer of coordinate system is invalid
Will point to especially create null vector coordinate system for convenience of calculating, thus CalcOVectByName, toMachinePos and
When several transforming function transformation function such as toCoordSysPos calculates every time, it is no need for judging the state of activation of each coordinate, but direct time
Go through CoordSysPList just can complete to calculate, greatly simplified code and the efficiency that improve calculating.
Using the inclined coordinate system of the having automatic temp compensating deformation of the present invention and cutter shape, have the advantages that:
On the basis of traditional numeric-control system, increase point of a knife point coordinates system and set up module and point of a knife point correction establishment of coordinate system module.Logical
Crossing point of a knife point coordinates system and set up module and set up point of a knife point coordinates system, thus being monitored to the position of point of a knife point, replacing existing skill
Monitoring to motion control point (milling spindle end or turning head ad-hoc location) in art.Point of a knife point correction coordinate system according to plus
Tool length change and the length change of control parts of motion that during work, the change of temperature causes, and/or the abrasion of cutter
The position skew of current point of a knife point is revised in the tool length change bringing.Eliminating user adds knife position of cusp inclined by programming
Move and compensate work, and ensure that the degree of accuracy of processing.
Following G code NC program will (after symbol, word be noted for program as a example X/Y plane is processed into a square workpiece
Release).Figure 11 is the structural representation of workpiece.
Using prior art digital control system when, user need establishment processing NC program be:
When replacing cutter is processed, needs to change the processing that procedure above just can complete identical workpiece, for example, be changed to
Being processed, length compensation number is H11, then procedure above will be revised as No. 11 cutters:
And, when workpiece being processed using existing digital control system, the main shaft being caused by temperature change and cutter deformation,
The change leading to machining accuracy cannot compensate.Figure 12 is the error schematic diagram after existing digital control system processing, as shown in the figure.
1 track representing machine tool motion control point, 2 representatives cause main shaft and tool length change due to temperature change, and 3 represent programming will
Processing track, 4 represent temperature change after reality processing track.By accompanying drawing, can intuitively experience very much existing numerical control
What system existed controls inaccurate defect.
Figure 13 is the having automatic temp compensating deformation of the present invention and the structural representation of the inclined coordinate system embodiment of cutter shape
Figure, as shown in the figure.1 expression point of a knife point coordinates system initial point bias vector, 2 expression point of a knife point correction coordinate origin bias vectors, 3
Represent other level coordinate origin bias vectors and (this figure only schematically shows).Having automatic temp compensating using the present invention
After deformation and the inclined coordinate system of cutter shape, the related data due to cutter is read automatically by the system from cutter data base
Take, and update in tool nose point coordinates system, programming coordinates are directly changed and start from point of a knife point, so procedure above
N40, N50 and N150 section program avoids the need for, and program is changed into:
And need to change during process tool it is only necessary to modification N30 program is just permissible, and other avoid the need for changing
?.If using manual tool changing, N30 program just can be removed, and later work pieces process program avoids the need for have modified again.
Bring very big convenience to user.
Figure 14 be having automatic temp compensating deformation of the present invention and cutter shape inclined coordinate system processing after structural representation,
As shown in the figure.The track at 1 expression machine tool motion control point, 2 represent point of a knife point correction coordinate system compensating approach vector, and 3 represent volume
Journey track to be processed, 4 represent the machining locus after temperature change, wherein, after programming track to be processed and temperature change
Machining locus overlap.Workpiece is carried out add in the having automatic temp compensating deformation using the present invention and cutter shape inclined coordinate system
During work, the main shaft being caused by temperature change and cutter deformation, the change of temperature will be detected by temperature-detecting device, pass through
Data/address bus is linked into digital control system, and the master that digital control system is calculated temperature change and caused by certain mathematical model
Axle and cutter deformation quantity, update in point of a knife point correction coordinate system, realize the function of real-time detection real-Time Compensation, improve workpiece
Machining accuracy.