[Home]XmplPaths

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org


As each motion is completed, an inverse of that motion is placed on a 'reverse path stack'.
break out your quadrule paper and pencil and ture it...
the original program's N numbers are used for reference
 Original Pgm                      Retract Pgm (abort was in N190)   Return Pgm ( all clear in N120 )  Continued Pgm
 N010 G90                          N999 G90                          N998 G90                          N010 G90
 N020 G00 X 0.000 Y 0.000 Z 0.000  N180 G01 X 0.020 Y 0.000 Z-0.020  N130 G01 X-0.010 Y-0.020 Z-0.020  N190 G01 X 0.020 Y 0.010 Z-0.020
 N030 G01 X 0.010 Y 0.010 Z-0.010  N170 G01 X 0.020 Y-0.010 Z-0.020  N140 G01 X 0.000 Y-0.020 Z-0.020  N200 G01 X 0.020 Y 0.020 Z-0.020
 N040 G01 X 0.020 Y 0.020 Z-0.020  N160 G01 X 0.020 Y-0.020 Z-0.020  N150 G01 X 0.010 Y-0.020 Z-0.020  N210 G01 X 0.010 Y 0.010 Z-0.010
 N050 G01 X 0.010 Y 0.020 Z-0.020  N150 G01 X 0.010 Y-0.020 Z-0.020  N160 G01 X 0.020 Y-0.020 Z-0.020  N220 G01 X 0.000 Y 0.000 Z 0.000
 N060 G01 X 0.000 Y 0.020 Z-0.020  N140 G01 X 0.000 Y-0.020 Z-0.020  N170 G01 X 0.020 Y-0.010 Z-0.020  N230 M02
 N070 G01 X-0.010 Y 0.020 Z-0.020  N130 G01 X-0.010 Y-0.020 Z-0.020  N180 G01 X 0.020 Y 0.000 Z-0.020
 N080 G01 X-0.020 Y 0.020 Z-0.020  N120 G01 X-0.020 Y-0.020 Z-0.020  N190 M02
                                   process becomes ok in N120
 N090 G01 X-0.020 Y 0.010 Z-0.020  N110 G01 X-0.020 Y-0.010 Z-0.020  we're back at N190, 
 N100 G01 X-0.020 Y 0.000 Z-0.020  N100 G01 X-0.020 Y 0.000 Z-0.020  The 'run mark is set to N190
 N110 G01 X-0.020 Y-0.010 Z-0.020  N090 G01 X-0.020 Y 0.010 Z-0.020  in original program and 
 N120 G01 X-0.020 Y-0.020 Z-0.020  N080 G01 X-0.020 Y 0.020 Z-0.020  we run the original next.
 N130 G01 X-0.010 Y-0.020 Z-0.020  N070 G01 X-0.010 Y 0.020 Z-0.020
 N140 G01 X 0.000 Y-0.020 Z-0.020  N060 G01 X 0.000 Y 0.020 Z-0.020
 N150 G01 X 0.010 Y-0.020 Z-0.020  N050 G01 X 0.010 Y 0.020 Z-0.020
 N160 G01 X 0.020 Y-0.020 Z-0.020  N040 G01 X 0.020 Y 0.020 Z-0.020
 N170 G01 X 0.020 Y-0.010 Z-0.020  N030 G01 X 0.010 Y 0.010 Z-0.010
 N180 G01 X 0.020 Y 0.000 Z-0.020  N020 G01 X 0.000 Y 0.000 Z 0.000
 N190 G01 X 0.020 Y 0.010 Z-0.020  N010 M02
 a bad process causes ABORT in N190
 N200 G01 X 0.020 Y 0.020 Z-0.020  
 N210 G01 X 0.010 Y 0.010 Z-0.010
 N220 G01 X 0.000 Y 0.000 Z 0.000
 N230 M02

</pre>
upload:emcedm01s.jpg upload:emcedm02s.jpg upload:emcedm03s.jpg upload:emcedm04s.jpg
_Original__Pgm__Retract____Pgm__Return____Pgm__Continue__Orig_

 so, if the program was aborted in the midst of line 190,
 the 'trick' is to run the reverse program that was auto built.

 the example shows an 'all clear ( ok to proceed ) occur in N120
 this cause the return program to end, 
 and we'll want to continue, with the original program, but beginning at N190
 (need to automate seeting the 'run mark' and knowing where to set it )

 the above idea retraces the path, and is suitable for wire edm
 in wire edm even arcs could be automaticly translated to lots of linear moves (as seg q would)
</pre>
 they 'run-way' to a safe place.
 It may be on the path, but it's a static position.
 It's like sky-blue in hopscotch.
 No matter where you are in the program, its where you run away to.


      Original Pgm                Reverse Pgm (abort was in any line)  Return Pgm ( all clear in N120 )
 N010 G90                         N999 G90                             N998 G90
 N020 G00 X0.000 Y0.000 Z0.000    N180 G00 X0.000 Y0.000 Z0.000        N130 goto line WhereverTheAbortOccured
 N030 G01 X0.010 Y0.010 Z-0.010   N010 M02
 N040 G01 X0.020 Y0.020 Z-0.020   just run away to top of pyramid      just return to the line that was aborted
                                  or wherever 'sky blue' is            at the postion of abort
 N050 G01 X0.010 Y0.020 Z-0.020   (sky blue is a safe place)           use the probe routines to capture the position
 N060 G01 X0.000 Y0.020 Z-0.020   also record the point where          expand this for jump flushing
 N070 G01 X-0.010 Y0.020 Z-0.020  the abort occurred
 ...as before...
 N230 M02
 we might use a code to mark a pose as a safe place ( a waypoint )
 allow differnt safe places during different parts of the program
 N010 G90
 N012 G00                 Z 2.000       ; get high over clamps
 N014 G00 X 0.000 Y 0.000               ; get over the start position
 N016 G00                 Z 0.04  M101  ; get close and mark this as a safe place to retract to
 N018                             M36   ; turn on EDM power and change to new feedrate mode
 N020 G00                 Z-0.990 M101  ; mark this as the 1st position to run towards when things get bad, old 1st is 2nd
 N030 G01 X 0.010 Y 0.010 Z-1.000
 N040 G01 X 0.020 Y 0.020
 N050 G01 X 0.010
 N060 G01 X 0.000                       ; if things get bad here, run to posN020, 
 N070 G01 X-0.010                       ;   if we arrive at posN020 and it's still bad, go towards posN016
                                        ;     if posN016 is arrived and things are still bad, give up! no place to run to!
 ...as before...
 N230 M02

LinuxCNCKnowledgeBase | RecentChanges | PageIndex | Preferences | LinuxCNC.org
This page is read-only. Follow the BasicSteps to edit pages. | View other revisions
Last edited March 9, 2006 11:11 pm by Tomp-Tag (diff)
Search:
Published under a Creative Commons License