Здравствуйте! Подскажите пожалуйста.
Имеется: N100G0X-33.195Y44.037 N110M73G4K6 N120M75 N130G4K4 N140M76G4K6 N150M74 N160G4K4 N170M73G4K4 N180M75 N190G4K4 N200G1F3.6 N210Y34.037 N220G3X-23.195Y24.037R10. N230G1X-12.725 N240G2X-7.725Y19.037R5. N250G1Y11.122 N260G2X-12.725Y6.122R5. N270G1X-33.666 N280G2X-38.666Y11.122R5. N290G1Y19.037 N300G2X-33.666Y24.037R5. N310G1X-23.195 N320G3X-13.195Y34.037R10. N330G1Y44.037 N340M76G4K6 N350M74 N360G4K4 N370M73G4K4 N380M75 N390G4K4 N400M76G4K6 N410M74 N420G4K4 N430G0X-19.068Y31.012 N440M73G4K4 N450M75 N460G4K4 N470M76G4K6 N480M74 N490G4K4 N500M73G4K4 N510M75 N520G4K4 N530G1Y21.012 N540G3X-9.068Y11.012R10. N550G1X1.503 N560G2X6.503Y6.012R5. N570G1Y-8.016 N580G2X1.503Y-13.016R5. N590G1X-19.638 N600G2X-24.638Y-8.016R5. N610G1Y6.012 N620G2X-19.638Y11.012R5. N630G1X-9.068 N640G3X.932Y21.012R10. N650G1Y31.012 N660M76G4K6 N670M74 N680G4K4 N690M73G4K4 N700M75 N710G4K4 N720M76G4K4 N730M74G4K4 N740M02
Хотелось бы: N100G0X-33.195Y44.037 N110M73G4K6 N120M75 N130G4K4
N200G1F3.6 N210Y34.037 N220G3X-23.195Y24.037R10. N230G1X-12.725 N240G2X-7.725Y19.037R5. N250G1Y11.122 N260G2X-12.725Y6.122R5. N270G1X-33.666 N280G2X-38.666Y11.122R5. N290G1Y19.037 N300G2X-33.666Y24.037R5. N310G1X-23.195 N320G3X-13.195Y34.037R10. N330G1Y44.037
N400M76G4K6 N410M74 N420G4K4 N430G0X-19.068Y31.012
N500M73G4K4 N510M75 N520G4K4 N530G1Y21.012 N540G3X-9.068Y11.012R10. N550G1X1.503 N560G2X6.503Y6.012R5. N570G1Y-8.016 N580G2X1.503Y-13.016R5. N590G1X-19.638 N600G2X-24.638Y-8.016R5. N610G1Y6.012 N620G2X-19.638Y11.012R5. N630G1X-9.068 N640G3X.932Y21.012R10.
N720M76G4K4 N730M74G4K4 N740M02
Я так понимаю где то строчка что после завершения контура запускай prapidout, только не могу понять где и видимо надо из prapidout данные разбить на 2 части? кусок post: # -------------------------------------------------------------------------- # Start of File and Toolchange Setup # -------------------------------------------------------------------------- psof0$ #Start of file for tool zero psof$
psof$ #Start of file for non-zero tool number pcuttype toolchng = one if ntools$ = one, [ #skip single tool outputs, stagetool must be on stagetool = m_one !next_tool$ ] sav_absinc = absinc$ if mi1$ <= one, #Work coordinate system [ absinc$ = one absinc$ = sav_absinc ] pcom_moveb c_mmlt$ #Multiple tool subprogram call pcan if stagetool >= zero,e$ if mi1$ > one, absinc$ = zero pcan1, pbld, n$, *sgcode, pfxout, pfyout, strcantext, e$ pcan1, pbld, n$, "M73G4K6",e$ pcan1, pbld, n$, "M75",e$ pcan1, pbld, n$, "G4K4",e$ absinc$ = sav_absinc pcom_movea toolchng = zero c_msng$ #Single tool subprogram call
ptlchg0$ #Call from NCI null tool change (tool number repeats) pcuttype pcom_moveb c_mmlt$ #Multiple tool subprogram call if mi1$ > one & workofs$ <> prv_workofs$, [ sav_absinc = absinc$ absinc$ = zero pbld, n$, pfxout, pfyout, e$ pe_inc_calc ps_inc_calc absinc$ = sav_absinc ] if cuttype = zero, ppos_cax_lin if gcode$ = one, plinout else, prapidout pcom_movea c_msng$ #Single tool subprogram call
ptlchg$ #Tool change pcuttype toolchng = one if mi1$ = one, #Work coordinate system [ ] pbld, n$, "M01", e$ pcom_moveb c_mmlt$ #Multiple tool subprogram call sav_absinc = absinc$ if mi1$ > one, absinc$ = zero pcan1, pbld, n$, *sgcode, pfxout, pfyout, *speed, strcantext, e$ absinc$ = sav_absinc pcom_movea toolchng = zero c_msng$ #Single tool subprogram call
pretract #End of tool path, toolchange sav_absinc = absinc$ absinc$ = one sav_coolant = coolant$ coolant$ = zero #cc_pos is reset in the toolchange here cc_pos$ = zero gcode$ = zero pcan pcan2 absinc$ = sav_absinc coolant$ = sav_coolant
protretinc #Reset the C axis revolution counter if frc_cinit & rot_on_x, [ rev = zero sav_rev = zero cabs = zero csav = zero indx_out = zero if index, e$, pindxcalc, pindex else, *cabs prvcabs = zero !csav, !cabs ]
peof0$ #End of file for tool zero peof$
peof$ #End of file for non-zero tool pretract comment$ #Remove pound character to output first tool with staged tools #if stagetool = one, pbld, n, *first_tool, e pcan1, pbld, n$, "M76G4K4",e$ pcan1, pbld, n$, "M74G4K4",e$ n$, "M02", e$
pwcs #G54+ coordinate setting at toolchange if mi1$ > one, [ sav_frc_wcs = force_wcs if sub_level$ > 0, force_wcs = zero if workofs$ <> prv_workofs$ | (force_wcs & toolchng), [ if workofs$ < 6, [ g_wcs = workofs$ + 54 *g_wcs ] else, [ p_wcs = workofs$ - five "G54.1", *p_wcs ] ] force_wcs = sav_frc_wcs !workofs$ ]
pgear #Find spindle gear from lookup table if use_gear = one, [ gear = frange (one, speed) *gear ]
#Toolchange setup pspindchng #Spindle speed change if prv_spdir2 <> spdir2 & prv_speed <> zero, pbld, n$, *sm05, e$ if prv_speed <> speed | prv_spdir2 <> spdir2, [ if speed, pbld, n$, *speed, *spindle, pgear, e$ ] !speed, !spdir2
pspindle #Spindle speed calculations for RPM speed = abs(ss$) if maxss$ = zero | maxss$ > max_speed, maxss$ = max_speed #zero indicates spindle off (not a mistake) if speed, [ if speed > max_speed, speed = maxss$ if speed < min_speed, speed = min_speed ] spdir2 = fsg3(spdir$)
pq$ #Setup post based on switch settings if stagetool = one, bldnxtool$ = one #Rotaxtyp = 1 sets initial matrix to top #Rotaxtyp = -2 sets initial matrix to front if vmc, rotaxtyp$ = one else, rotaxtyp$ = -2 #Shut off rotary axis if, Q164. Enable Rotary Axis button? n if ucase(sq164) = strn, rot_on_x = zero if arctype$ = one | arctype$ = four, [ result = newfs(two, i$) result = newfs(two, j$) result = newfs(two, k$) ] else, [ result = newfs(three, i$) result = newfs(three, j$) result = newfs(three, k$) ]
pheader$ #Call before start of file if met_tool$ = one, #Metric constants and variable adjustments [ ltol$ = ltol_m vtol$ = vtol_m maxfeedpm = maxfeedpm_m ]
ptoolend$ #End of tool path, before reading new tool data !speed, !spdir2
ptlchg1002$ #Call at actual toolchange, end last path here if cuttype <> one, sav_rev = rev #Axis Sub does not update to rev pspindle whatline$ = four #Required for vector toolpaths if gcode$ = 1000, [ #Null toolchange ] else, [ #Toolchange and Start of file if gcode$ = 1002, [ #Actual toolchange pretract ] if stagetool = one, prv_next_tool$ = m_one prv_xia = vequ(xh$) prv_feed = c9k ]
# -------------------------------------------------------------------------- # Motion NC output # -------------------------------------------------------------------------- #The variables for absolute output are xabs, yabs, zabs. #The variables for incremental output are xinc, yinc, zinc. # -------------------------------------------------------------------------- prapidout #Output to NC of linear movement - rapid pcan1, pbld, n$, "M76G4K6",e$ pcan1, pbld, n$, "M74",e$ pcan1, pbld, n$, "G4K4",e$ pcan1, pbld, n$, `sgcode, sgabsinc, pccdia, pxout, pyout, strcantext, e$ pcan1, pbld, n$, "M73G4K4",e$ pcan1, pbld, n$, "M75",e$ pcan1, pbld, n$, "G4K4",e$
plinout #Output to NC of linear movement - feed pcan1, pbld, n$, `sgcode, sgabsinc, pccdia, pxout, pyout, feed, strcantext, e$
pcirout #Output to NC of circular interpolation pcan1, pbld, n$, `sgfeed, sgcode, sgabsinc, pccdia, pxout, pyout, parc, feed, strcantext, e$
pcom_moveb #Common motion preparation routines, before pxyzcout ps_inc_calc
pncoutput #Movement output pcom_moveb comment$ pcan if cuttype = zero, ppos_cax_lin #Toolplane rotary positioning if gcode$ = zero, prapidout if gcode$ = one, plinout if gcode$ > one & gcode$ < four, pcirout if mr_rt_actv, #Restore absolute/incremental for G51/G68 [ absinc$ = sav_absinc mr_rt_actv = zero ] pcom_movea
pcom_movea #Common motion preparation routines, after pcan2 pe_inc_calc
pdwl_spd$ #Call from NCI gcode 4 pspindle comment$ pspindchng pcan if fmtrnd(dwell$), pcan1, pbld, n$, *s |