Summary of the invention
The objective of the invention is to have overcome above-mentioned shortcoming of the prior art, providing a kind of avoids carrying and moves workpiece, can make workpiece coordinate be transformed into mechanical coordinate easily, thereby improve the production efficiency of digital control system, and application mode is easy, and range of application realizes the method that machining coordinate is changed in the digital control system comparatively widely.
In order to realize above-mentioned purpose, realize in the digital control system of the present invention that the method for machining coordinate conversion may further comprise the steps:
(1) digital control system obtains the location parameter based on the workpiece to be processed of mechanical coordinate system;
(2) digital control system generates workpiece coordinate system according to the location parameter of the workpiece to be processed that is obtained;
(3) digital control system will be converted to the machined parameters based on mechanical coordinate system based on the machined parameters of described workpiece coordinate system;
(4) digital control system is processed according to described machined parameters based on mechanical coordinate system.
Realize in this digital control system that described step (1) is specially in the method for machining coordinate conversion: digital control system is imported according to the user and is obtained workpiece to be processed based on three anchor point A, B of mechanical coordinate system, the coordinate (x of C
A, y
A), (x
B, y
B), (x
C, y
C).
Realize in this digital control system that described three anchor point A, B, C all are positioned at the marginal position of described workpiece to be processed in the method for machining coordinate conversion.
Realize in this digital control system that described anchor point A, B, C all are positioned on the non-negative semiaxis of described workpiece coordinate system in the method for machining coordinate conversion.
Realize in this digital control system that described step (2) specifically may further comprise the steps in the method for machining coordinate conversion:
(21) system determines that BC and mechanical coordinate are the angle theta between the X-axis;
(22) system determines the coordinate (x of initial point O in mechanical coordinate system of workpiece coordinate system
OM, y
OM), wherein initial point O is positioned on the straight line BC.
Realize in this digital control system that described step (21) is specially in the method for machining coordinate conversion: system sets anglec of rotation θ between mechanical coordinate system and the workpiece coordinate system according to following formula:
Realize in this digital control system that described step (22) is specially in the method for machining coordinate conversion: system sets the coordinate (x of initial point O in mechanical coordinate system of workpiece coordinate system according to following formula
OM, y
OM):
Realize in this digital control system that described step (3) is specially in the method for machining coordinate conversion: digital control system will be based on the coordinate position (x of the machined parameters of workpiece coordinate system
W, y
W) be converted to coordinate position (x based on the machined parameters of mechanical coordinate system
M, y
M), wherein, (x
W, y
W) and (x
M, y
M) between transformational relation satisfy following formula:
Adopted the method that realizes the machining coordinate conversion in the digital control system of this invention, it is behind the location parameter of system's acquisition based on the workpiece to be processed of mechanical coordinate system, location parameter according to the workpiece to be processed that is obtained generates workpiece coordinate system, and will be converted to the machined parameters that is based on mechanical coordinate based on the machined parameters of workpiece coordinate system, digital control system is processed according to described machined parameters based on mechanical coordinate system then.Utilize this method, digital control system can be converted to the machined parameters of workpiece coordinate system the machined parameters based on mechanical coordinate system, thereby under the situation of not moving the location of workpiece, finish processing, thereby saved the work of adjusting the location of workpiece, saved processing required time, manpower and material resources, increased substantially the production efficiency of utilizing digital control system, and this method application mode is easy, and range of application is comparatively extensive.
Embodiment
In order more to be expressly understood technology contents of the present invention, describe in detail especially exemplified by following examples.
See also shown in Figure 1ly, be to realize in the digital control system of the present invention the flow chart of steps of the method for machining coordinate conversion.
In one embodiment, this method may further comprise the steps:
(1) digital control system obtains the location parameter based on the workpiece to be processed of mechanical coordinate system;
(2) digital control system generates workpiece coordinate system according to the location parameter of the workpiece to be processed that is obtained;
(3) digital control system will be converted to the machined parameters based on mechanical coordinate system based on the machined parameters of described workpiece coordinate system;
(4) digital control system is processed according to described machined parameters based on mechanical coordinate system.
Wherein, described step (1) is specially: digital control system is imported according to the user and is obtained workpiece to be processed based on three anchor point A, B of mechanical coordinate system, the coordinate (x of C
A, y
A), (x
B, y
B), (x
C, y
C).Described three anchor point A, B, C all are positioned at the marginal position of described workpiece to be processed.Shown in Fig. 2 and 3, described anchor point A, B, C all are positioned on the non-negative semiaxis of described workpiece coordinate system, and then ∠ ABC and ∠ ACB are not acute angle simultaneously, promptly have one to be right angle or obtuse angle among ∠ ABC, the ∠ ACB.
In a kind of more preferably embodiment, described step (2) specifically may further comprise the steps:
(21) system determines that BC and mechanical coordinate are the angle theta between the X-axis;
(22) system determines the coordinate (x of initial point O in mechanical coordinate system of workpiece coordinate system
OM, y
OM), wherein initial point O is positioned on the straight line BC.
Wherein, described step (21) is specially: system sets anglec of rotation θ between mechanical coordinate system and the workpiece coordinate system according to following formula:
Described step (22) is specially: system sets the coordinate (x of initial point O in mechanical coordinate system of workpiece coordinate system according to following formula
OM, y
OM):
In a kind of preferred embodiment, described step (3) is specially: digital control system will be based on the coordinate position (x of the machined parameters of workpiece coordinate system
W, y
W) be converted to coordinate position (x based on the machined parameters of mechanical coordinate system
M, y
M),
Wherein, (x
W, y
W) and (x
M, y
M) between transformational relation satisfy following formula:
In actual applications, the coordinate of digital control system management formula is: mechanical coordinate=workpiece coordinate+workpiece biasing+common bias+tool offset.The method that realizes the machining coordinate conversion in the digital control system of the present invention has following job step:
1, user's input is used for determining the Three-point machine tool coordinate of workpiece coordinate system, and ABC 3 points shown in Fig. 2 and 3 are to realize patrolling the limit positioning function.Among Fig. 2 and Fig. 3, the XY coordinate is a mechanical coordinate system, X ' Y ' coordinate is a workpiece coordinate system, wherein the BC point is determined the X ' axle of workpiece coordinate system, the A point is determined the Y ' axle of workpiece coordinate system, the O point is the initial point of workpiece coordinate system, and limiting the O point can not be between BC, the non-negative semiaxis (initial point and positive axis) that ABC all at mechanical coordinate is;
2, calculate workpiece coordinate system initial point (O point) mechanical coordinate system and workpiece coordinate system anglec of rotation θ with respect to mechanical coordinate system;
3, use the result who calculates in the step 2, process data is rotated translation transformation.Process data in this step is interim, can not be saved in the file, and the user can keep original graphic file, and locate on the limit of patrolling that just reuses this method when needs are provided with the coordinate system position.Provide selection or cancellation to use the interface that patrols the location, limit in the system, the user can and patrol between the location, limit in common coordinate way to manage switches easily.
If the mechanical coordinate of the workpiece coordinate system initial point (being the O point) in this method is (x
OM, y
OM), then mechanical coordinate is converted to workpiece coordinate (x
W, y
W) formula be:
And with workpiece coordinate (x
W, y
W) be converted to mechanical coordinate (x
M, y
M) formula be:
That is:
In the described step 3, it promptly is that process data is converted to mechanical coordinate from workpiece coordinate that process data is rotated translation transformation.
In the practical application, in the man-machine interface of digital control system, add and patrol limit location session frame, comprise following function: figure and text prompt, the interface that the location, limit is patrolled in selection or cancellation, the interface of input Three-point machine tool coordinate, current mechanical coordinate shows that workpiece initial point mechanical coordinate shows, the workpiece coordinate system deflection angle shows, manually the interface that moves returns initial point, returns point of fixity, stop, determining and cancellation etc.
If selecting to use, the user patrols the limit positioning function, can import Three-point machine tool coordinate easily when setting the coordinate system position, system calculates the position and the anglec of rotation of workpiece coordinate system automatically after confirming, in view of the above process data is rotated translation transformation, Jia Gong position promptly is that the workpiece coordinate that corresponds to user's setting is fastened at last.The user can save the work of adjusting the raw material position fully, only need carry out simple data setting operation and get final product, and has saved so greatly and has moved location of workpiece time, manpower and material resources, improves working (machining) efficiency.
Digital control system is determined workpiece initial point mechanical coordinate (x
OM, y
OM) and the anglec of rotation θ of workpiece coordinate system, generally can adopt following program:
Digital control system is determined workpiece initial point mechanical coordinate (x
OM, y
OM) and the anglec of rotation θ of workpiece coordinate system after, saving result is rotated translation transformation to process data then, is about to workpiece coordinate (x
W, y
W) be converted to mechanical coordinate (x
M, y
M), formula is:
Adopted the method that realizes the machining coordinate conversion in the digital control system of this invention, it is behind the location parameter of system's acquisition based on the workpiece to be processed of mechanical coordinate system, location parameter according to the workpiece to be processed that is obtained generates workpiece coordinate system, and will be converted to the machined parameters that is based on mechanical coordinate based on the machined parameters of workpiece coordinate system, digital control system is processed according to described machined parameters based on mechanical coordinate system then.Utilize this method, digital control system can be converted to the machined parameters of workpiece coordinate system the machined parameters based on mechanical coordinate system, thereby under the situation of not moving the location of workpiece, finish processing, thereby saved the work of adjusting the location of workpiece, saved processing required time, manpower and material resources, increased substantially the production efficiency of utilizing digital control system, and this method application mode is easy, and range of application is comparatively extensive.
In this instructions, the present invention is described with reference to its certain embodiments.But, still can make various modifications and conversion obviously and not deviate from the spirit and scope of the present invention.Therefore, instructions and accompanying drawing are regarded in an illustrative, rather than a restrictive.