User Tools

Site Tools


mp:gen_comments

Hack to Split op comments out from header in a Generic post

scomm_sav   : ""
scomm_sav2  : ""
scomm_sav3  : ""

pcomment2       #Output Comment from manual entry
      scomm$ = ucase (scomm$)
      if gcode$ = 1005, n$, sopen_prn, scomm$, sclose_prn, e$  #Manual entry - as comment
      if gcode$ = 1006, n$, scomm$, e$                         #Manual entry - as code
      if gcode$ = 1007, n$, sopen_prn, scomm$, sclose_prn      #Manual entry - as comment with move NO e$
      if gcode$ = 1026, n$, scomm$                             #Manual entry - as code with move NO e$
      if gcode$ = 1008 & not(header), n$, sopen_prn, no_spc$, scomm$, no_spc$, sclose_prn, e$  #Operation comment
      if gcode$ = 1008 & header,
        [
        if scomm_sav = snull, scomm_sav = scomm$
        else,
          [
          if scomm_sav2 = snull, scomm_sav2 = scomm$
          else,
            [
            if scomm_sav3 = snull, scomm_sav3 = scomm$
            ]
          ]
        ]
      if gcode$ = 1008 & header & scomm_sav2 = snull, scomm_sav = scomm$
      ....
      ....
      ....
      
      
psof$            #Start of file for non-zero tool number
      ....
      ....
      ....
      comment$	
      if scomm_sav <> snull, 
        n$, sopen_prn, no_spc$, *scomm_sav, no_spc$, sclose_prn, e$  #Operation comment
      if scomm_sav2 <> snull, 
        n$, sopen_prn, no_spc$, *scomm_sav2, no_spc$, sclose_prn, e$  #Operation comment
      if scomm_sav3 <> snull, 
        n$, sopen_prn, no_spc$, *scomm_sav3, no_spc$, sclose_prn, e$  #Operation comment
      scomm_sav  = snull
      scomm_sav2 = snull
      scomm_sav3 = snull     
mp/gen_comments.txt · Last modified: 2022/12/22 22:30 by russell