The development that postposition of cut of line of UG 3B format handles

  • Time:
  • Click:117
  • source:WINNERS CNC Machining
One, introductive line cut can be machined all sorts of narrow groove, small sunken round part, the not sensitive to hardness, treatment after suiting to quench particularly, and cost low, operation is convenient, reason is a kind of indispensable technology measure in treatment industry. In recent years line cut machine tool develops quickly also, control system also conforms with the world gradually, the control system of G code gradually predominate, but in a few low end product, especially in vintage machine tool, the control system of 3B format however almost unify the whole country, our factory is manufacturer of car mould major, have much station at present vintage take machine tool of silk thread cut quickly. Although my factory also has machine tool of advanced silk of don't go yet, but because take finished cost of filar machine tool quickly low, low also to environmental requirement, it is the brunt of line cut workshop section all the time so. Original, we write line cut program is a 2 development to program is used in Autocad, later on the unit UG, but the postposition processing with commonly used UG does not have 3B code format, we change the line of UG in Auto CAD, often join because of two kinds of software bad and adjust repeatedly, take time is arduous, our denounce is gigantic endowment the powerful function that bought UG software cannot develop his to make line cut. Understand as the development to UG later, discovery also can treat 3B form, introduce below, hope to be able to be edified somewhat to everybody. 2, the process designing of 3B code is regular 1. The format of 3B code is: B X B Y B J G Z, b is break up a symbol, x, y, j is numerical value, it is an unit with micron. J is computation length, g is computation direction, z is treatment instruction. 2. Treatment instruction shares 12 kinds. A. When treatment is linear, it is coordinate origin with start, terminus is on reference axis when, value of X, Y is 0, computation length J is line segment length, press X+ , x- , y+ , y- , direction of four axes computation and treatment instruction are respectively, GX L1, GY L2, GX L3, GY L4. B. When treatment is linear, it is coordinate origin with start, terminus is inside each quadrant when, x, y is value of coordinate of terminal and opposite starting point, can be the same as scale to magnify or narrow, computation length J is in for line segment the umbriferous length of computation direction, be in by terminus 1, 2, 3, 4 quadrant, treatment instruction is L1, L2, L3, L4 respectively. After each quadrant is broken up with 45 degrees of lines, axis of X of terminal press close to, criterion computation direction is GX, it is GY conversely. C. When machining circular arc, machine the X when circular arc, y is start photograph to be worth to the coordinate of the centre of a circle, circular arc start is in relative to the centre of a circle 1, 2, 3, when 4 quadrant, clockwise arc is SR1, SR2, SR3, SR4 respectively, anticlockwise circular arc is NR1, NR2, NR3, NR4 respectively. After each quadrant is broken up with 45 degrees of lines, axis of X of terminal press close to, criterion computation direction is GY, it is GX conversely. Exemple: Graph 1 3, analytic UG is G code program in postposition processing from time to tome linear (G01) , clockwise arc (G02) , anticlockwise circular arc (G03) a few kinds of formats, if can write a paragraph of code to will reach circular arc to classify computation by 3B format point-blank, so it is easy that processing becomes 3B form. Introduce to go to the lavatory, it is the terminal coordinate of each pace X, Y, start go up namely one pace terminus is X0, Y0, the centre of a circle nods Xc, yc. Graph 2 area differentiate: 1. When sharp movement, terminal photograph is in the condition of X+ axle shaft to start: X>X0, y=Y0, computation length is: | X-X0 | , the instruction is: GX L1; loses axle shaft with manage X: Conditional X<X0, y=Y0, computation length | X-X0 | , GX L3; Y axle shaft: Conditional X=X0, y>Y0, computation length | Y-Y0 | , GY L2; Y loses axle shaft: Conditional X=X0, y<Y0, computation length | Y-Y0 | , GY L4; 2. When moving to not be on reference axis point-blank, if the graph shows 2 times,press differentiate for 8 area: 1/8 area: Conditional X>X0, y>Y0, | X-X0 | > = | Y-Y0 | , computation length | X-X0 | , area of instruction GX L1; 2/8: Conditional X>X0, y>Y0, | X-X0 | < | Y-Y0 | , computation length | Y-Y0 | , area of instruction GY L1; 3/8: Conditional X<X0, y>Y0, | X-X0 | < | Y-Y0 | , computation length | Y-Y0 | , area of instruction GY L2; 4/8: Conditional X<X0, y>Y0, | X-X0 | > = | Y-Y0 | , computation length | X-X0 | , area of instruction GX L2; 5/8: Conditional X<X0, y<Y0, | X-X0 | > = | Y-Y0 | , computation length | X-X0 | , area of instruction GX L3; 6/8: Conditional X<X0, y<Y0, | X-X0 | < | Y-Y0 | , computation length | Y-Y0 | , area of instruction GY L3; 7/8: Conditional X>X0, y<Y0, | X-X0 | < | Y-Y0 | , computation length | Y-Y0 | , area of instruction GY L4; 8/8: Conditional X>X0, y<Y0, | X-X0 | > = | Y-Y0 | , computation length | X-X0 | , instruction GX L4; 3. Circular arc differentiates relatively troublesome: Press direction, cent is suitable hour hand, anticlockwise; By start quadrant cent is 1, 2, 3, 4 quadrant, divide the 8 extent that the graph shows 2 times by terminus. Below only with anticlockwise, start tries to analyse in the circular arc of 1 quadrant: 1/8 area: (Major arc) conditional Y>Y0, computation length | Y-Y0 | , instruction GY NR1; (bad arc) conditional Y<=Y0, computation length 4R- | Y-Y0 | , area of instruction GY NR1; 2/8: (Major arc) conditional X<X0, computation length | X-X0 | , arc of bad of instruction GX NR1; () conditional X>=X0, computation length 4R- | X-X0 | , area of instruction GX NR1; 3/8: Computation length | X-X0 | , area of instruction GX NR1; 4/8: Computation length 2R- | Y0-Yc | - | Y-Yc | , area of instruction GY NR1; 5/8: Computation length 2R- | Y0-Yc | + | Y-Yc | , area of instruction GY NR1; 6/8: Computation length 2R+ | X0-Xc | - | X-Xc | , area of instruction GX NR1; 7/8: Computation length 4R- | X0-Xc | - | X-Xc | , area of instruction GX NR1; 8/8: Computation length 4R- | Y0-Yc | - | Y-Yc | , start of instruction GY NR1; is in 2, 3, the circular arc of 4 quadrant and clockwise arc manage together. 4, carry out what see UG aftertreatment first to form, UG aftertreatment basically is comprised by two files, * .

DEF and * .

TCL. Former and main defined a few formats, latter basically defined a few operation, the program code that we want to add is in latter. Open * .

TCL, find block Proc MOM_linear_move {} {... } , the operation of sharp movement is in this paragraphs inside operation, circular arc motion is in block Proc MOM_circular_move {} {... in} . A few variable were defined in UG aftertreatment, before Mom_prev_pos is a bit coordinate, namely start coordinate, mom_pos is terminal coordinate, the centre of a circle that Mom_pos_arc_center moves for circular arc nods coordinate, mom_arc_radius is value of circular arc radius, mom_arc_direction is circular arc direction of rotation, etc, can check from inside Post Builder. Because UG presses allow to need consideration when operation, have to the nearest whole number, do not use when judgement is equal equal, judge poor value to be less than allow difference however. Had these preparation, can start work program. Also can use Post Builder to do an user to define an instruction oneself of course, but core content is changeless, still need oneself to write. Length of be confined to, only the one part that give typical examples moves point-blank. Global Mom_l_code defines variable oneself its value is: 1, 2, 3, 4 Global Mom_gxy defines variable oneself its value is: X, y Global Mom_ba defines variable oneself, the value of the first B, namely the X value Global Mom_bb that the 2nd part introduces defines variable oneself, the value of the 2nd B, namely Y value Global Mom_bc defines variable oneself, computation length, namely Set Mom_ba Abs($mom_pos(0)-$mom_prev_pos(0)) Set Mom_bb Abs($mom_pos(1)-$mom_prev_pos(1)) If {abs($mom_pos(1)-$mom_prev_pos(1) of variable of start of Global Mom_prev_pos of terminal variable of J value Global Mom_pos)<0.

001} {If {[EQ_is_gt $mom_pos(0) $mom_prev_pos(0)]} {#X axle shaft Set Mom_ba 0 Set Mom_bb 0 Set Mom_bc $mom_pos(0)-$mom_prev_pos(0) Set Mom_gxy X Set Mom_l_code 1} Else {# X loses axle shaft Set Mom_ba 0 Set Mom_bb 0 Set Mom_bc $mom_pos(0)-$mom_prev_pos(0) Set Mom_gxy X Set Mom_l_code 3} } Elseif {abs($mom_pos(0)-$mom_prev_pos(0) )<0.

001} {If {[EQ_is_gt $mom_pos(1) $mom_prev_pos(1)]} {# Y axle shaft... } Else {# Y loses axle shaft... } } Elseif {[EQ_is_gt $mom_pos(1) $mom_prev_pos(1)]} {If {[EQ_is_gt $mom_pos(0) $mom_prev_pos(0)]} {If{abs($mom_pos(0)-$mom_prev_pos(0) )>Terminus of Abs($mom_pos(1)-$mom_prev_pos(1))} {# is in in terminus of Set Mom_bc Abs($mom_pos(0)-$mom_prev_pos(0)) Set Mom_gxy X Set Mom_l_code 1} Else {# of 1/8 area terminus of Set Mom_bc Abs($mom_pos(1)-$mom_prev_pos(1)) Set Mom_gxy Y Set Mom_l_code 1} } Else {If{abs($mom_pos(1)-$mom_prev_pos(1))>abs($mom_pos(0)-$mom_prev_pos(0))}{# of 2/8 area is in 3/8 area... # terminus is in other part of} Else {Set Mom_bc Abs($mom_pos(0)-$mom_prev_pos(0)) Set Mom_gxy X Set Mom_l_code 4} } } of 8/8 area slightly. 5, the order that the figure that the last word shows 2 times like the graph gives by Ug aftertreatment is shown as follows, the line cut of my factory requires manual input, read for convenient program, added coordinate cost, if be,transmit automatically, add slightly revise can. CNC Milling