Polar coordinate interpolation extremal region smoothing processing method for digital control system
Technical field
The present invention relates to control XZ linear axes and digital control system and the control method of rotation C axle, specifically polar coordinate interpolation extremal region smoothing processing method for a kind of digital control system in a kind of fields of numeric control technique.
Background technology
In the time that turning center carries out face milling processing (without Y coordinate axis) to parts, need to be in the X of lathe, Z, C coordinate system, by X, C two-axle interlocking, form virtual orthogonal Descartes X, Y, Z coordinate system, complete the establishment of general Milling Process numerical control program, guarantee that programming mode is consistent with Milling Process programming mode, bring convenience to user program, improve working (machining) efficiency, enrich the function of turning center simultaneously.In orthogonal cartesian trajectories plane, there is particular point a: X=0, Y=0 point, namely the intersection point of X feed shaft and turning center is called " limit ".Near limit, track axle X, the less variation of Y position can cause the larger variation of revolving shaft C position conventionally.Therefore do not advise the annex processing work in limit, because in some cases, require feed rate to change rapidly in case non-return rotating shaft overload avoids X0/Y0 limit and the displacement of center cutter point to intersect.
For near the problem of C axle overload limit, mainly contain two kinds of disposal routes.Method one is by setting prohibited area based on speed of feed F and C axle maximal rate, in the situation that speed of feed F is constant by forbidding that center cutter point enters this region and prevent the overload of C axle.There is processing blind area in the defect that this method exists, may cause processing to pause exactly.Method two is to set on extremal region basis based on speed of feed F and C axle maximal rate, by reduction of speed processing is carried out in the path entering in poles region, carrying out speed of feed constraint based on C axle maximal rate.This method can be passed through extremal region, but directly reduction of speed causes center cutter locus of points flatness poor, and the extremal region completing based on speed of feed F is divided and cannot be met real-time route variation simultaneously, and zone location is inaccurate.
Summary of the invention
Determine that for the extremal region of prior art in inaccurate and extremal region, rough problem is processed in center cutter point path, the invention provides the digital control system polar coordinate interpolation extremal region smoothing processing method of a kind of combination C axle constraint factor α and transfer coefficient β, realize path smooth interpolation in polar coordinate interpolation region.
The technical scheme that the present invention adopted is for achieving the above object: polar coordinate interpolation extremal region smoothing processing method for a kind of digital control system, comprises the following steps:
Step 1: the concrete lathe configuring condition of controlling according to digital control system, obtains the transformational relation of programming instruction Xw in workpiece coordinate system, Yx information and lathe coordinate system lower shaft XM, CM positional information, and resolved and determined workpiece coordinate system parameter by instruction;
Step 2: based on feed rate F, complete speed and path planning to cutter central point path, obtain the interpolation position information of Xw, the Yw in each cycle;
Step 3: by the interpolation position information of Xw, Yw, calculate the interpolation path Li of each interpolation cycle and the distance r of each route segment and limit;
Step 4: according to C axle constraint of velocity condition, speed of feed F is adjusted in real time, then calculate target interpolated point;
Step 5: by the track queue (Xw, Yw) obtaining after adjusting in real time based on speed of feed F, be converted to machine spindle movable information (XM, CM), through the level and smooth rear drive machine tool motion of batten.
Described workpiece coordinate system parameter comprises routing information and the programming speed of feed of workpiece coordinate system bottom tool central point, starting point and final position information, C axle maximal rate Vcmax, constraint factor α and transfer coefficient β.
Described transformational relation is as follows:
Wherein, (XM, CM) is XM under lathe coordinate system, CM shaft position information, and (Xw, Yw) is the trajectory coordinates under workpiece coordinate system.
The interpolation path Li of described each interpolation cycle is:
Wherein, (X
wi, Y
wi), (X
wi+1, Y
wi+1) be respectively the coordinate of center cutter point path i and i+1 interpolated point.
Each route segment of described each interpolation cycle and the distance r of limit are:
Wherein, (X
wi_m, Y
wi_m) be the coordinate of center cutter point path i and i+1 interpolated point intermediate point.
Describedly speed of feed F carried out to real-time set-up procedure comprise:
If in handled i section path
Speed of feed is not just trimmed record object interpolated point Xwi+1, Ywi+1;
If in handled i section path
The programming speed of feed F of this section is adjusted into
The present invention has following beneficial effect and advantage:
1. the present invention, in the time of polar coordinate interpolation, locates accurately extremal region in real-time interpolation, completes the real-time adjustment to track feed rate in conjunction with C axle constraint factor α and transfer coefficient β;
2. the application polar coordinate interpolation extremal region smoothing processing method of carrying, without processing blind area, can not cause processing to pause;
3. the application polar coordinate interpolation extremal region smoothing processing method of carrying, center cutter locus of points flatness is high, can meet real-time route and change;
Accompanying drawing explanation
Fig. 1 is the applied lathe schematic diagram of the present invention;
Fig. 2 is digital control system structural drawing of the present invention;
Fig. 3 is method flow diagram of the present invention.
Embodiment
Below in conjunction with drawings and Examples, the present invention is described in further detail.
Be illustrated in figure 1 the applied lathe schematic diagram of the present invention.Turning center that digital control system is controlled must be mutually vertical by two linear axes (X, Z).Revolving shaft (C) necessary parallel with linear axes Z (around Z rotation).Linear axes X and revolving shaft C intersect.The programming of F speed of feed is carried out in XwYw path for end face processing work coordinate system plane, and digital control system is converted to XM axle and CM axle carries out moving interpolation.Polar coordinate interpolation extremal region smoothing processing method for digital control system of the present invention, the digital control system of using for there is the turning center of two linear axes (X, Z), revolving shaft (C) by control.
Comprise by man-machine interface (HMI) 21 inputs the job sequence that uses CAD/CAM system or profiling data directly to carry out multiaxis processing from data input device 31.If the each axle of the turning center that digital control system 10 is controlled is linear axes X-axis, Z axis and turning axle C axle.
Fig. 2 is digital control system structural drawing of the present invention.Based on component model, by bus, digital control system structure is comprised to human interface components 21, task controller assembly 22, PLC assembly 24, motion controller assembly 23 and control bus 25 assemblies and be connected in digital control system 10.
Wherein human interface components 21: be responsible for user management, data acquisition, transmission new data and provide consistent user interface to controller and for various device, also need to show the needed various information of user, as job sequence, at present conditions of machine tool, the data processed etc. simultaneously.
Task controller assembly 22: take charge of the explanation and carry out job sequence, add process sequence control in man-hour and for wrong detection diagnosis and processing capacity.According to part program, task controller controlled motion controller and I/O controller complete processing tasks.
PLC assembly 24: the I/O that is responsible for sensor and actuator controls, and mainly comprises lathe power-on and power-off, emergency stop switch, cold switch etc.
Motion controller assembly 23: be responsible for detecting each kinematic axis current location, calculate next movement position and result of calculation is sent to control bus assembly to control execution etc. with command forms.
Control bus assembly 25: be responsible for receiving order from motion controller assembly and PLC assembly, and order is sent in bus driver card to drive digital servo 26, servo condition is fed back to motion controller assembly 23 and PLC assembly 24 simultaneously.
In the present embodiment, control gang tool by digital control system 10, there is X-axis, Z axis, C axle and the main shaft of linear axes.The axle control structure of each axle, from the axle movement instruction of control bus 25, outputs to servo 26 by each axle instruction.Servo 26 receive instruction, drive the servo motor 34 of each axle.Servo motor 34 is built-in with speed/positional detecting device simultaneously, and the speed/positional feedback signal from this speed/positional detecting device is fed back in servo 26, carries out the FEEDBACK CONTROL of speed/positional.
Be illustrated in figure 3 method flow diagram of the present invention.Concrete steps are as follows:
1. the concrete lathe configuring condition of first controlling according to digital control system, can obtain in workpiece coordinate system the transformational relation (1) of XM, CM shaft position information under trajectory coordinates Xw, Yw and lathe coordinate system has
Resolve the center cutter point routing information of determining under workpiece coordinate system by system directive, programming speed of feed, C axle maximal rate Vcmax, constraint factor α and transfer coefficient β;
2. path interpolation pre-service: according to the routing information under workpiece coordinate system and programming speed of feed F, path (straight line, circular arc) planning is carried out in cutter central point path, obtain a series of interpolated point Xwi, Ywi.
3. based on C axle constraint of velocity: a series of interpolated point Xwi that obtain according to path interpolation pre-service, Ywi.Through type (2) calculates the intermediate point (Xwi_m, Ywi_m) that every i point is ordered to i+1:
(Xwi_m,Ywi_m)=((Xwi+Xwi+1)/2,(Ywi+Ywi+1)/2) (2)
By interim point information, calculate distance r and the path Li of each route segment i apart from limit.
Wherein, path is:
Distance is:
4. feed rate override processing:
If in handled i section path
Speed of feed F is not trimmed record object interpolated point Xwi+1, Ywi+1;
If in handled i section path
The programming speed of feed F of this section is adjusted into
Then carry out recalculating target interpolated point Xwi+1, Ywi+1 based on trimming rear F;
After Xw in workpiece coordinate, Yw path planning, through type (1) is calculated to the XMi+1 of each interpolation cycle and the movement position information of CMi+1 deposits motion queue in, then tried to achieve each axle reference mark information is carried out issuing servo 26 after smoothed cubic spline.