I see linuxcnc still can't single step a subroutine, so I commented out
those 2 lines making it normal code & put an m2 after it.
Running in g21 I single stepped thru the routine, finding my speeds way
to slow but it worked, but I had a comma in the middle of the last
debug line, so it didn't print the 2nd argument at the end. Now its been
restarted & reloaded several times and while all the mouse buttons appear
to work, the machine does nothing, no code executes. Short of rebooting,
I think I've done everything I know how to do. code attached after I
restored
the o100 sub endsub stuff. Ideas? I'm fresh out. It single stepped just
fine once, hasn't moved a motor since.
Thanks all.
Cheers, Gene Heskett, CET.
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
Don't poison our oceans, interdict drugs at the src.
(patch_cutter.ngc, assume touched off so probe electrode is nominall centered
in disk hole)
(make sure probe is workin first, a list of vars, will definitely grow)
G21 (use metric)
#<_srchoset> = 17 (this used for all 4 searches as plus or minus starting
point for a g38.2)
#<_ffast> = 150 (speed for fast moves)
#<_medsp> = 75 (speed for hole motion)
#<_srch> = 3 (speed for probing)
#<_pdep> = -6 ( depth of probe position for search)
#<_stsrch> = 13 (end of search motion)
#<_prup> = 4 (probe up clearance)
#<_hole> = .50 (starting hole diameter)
#<_hinc> = .01 (size of increment)
o100 sub (find center of cutter disk precisely, based on OD, startng with
motions only 4 clearance checking)
G1 f#<_ffast> z#<_prup> (start from known position)
g1 X0Y0
G1 x-#<_srchoset> (goto first -X point)
S0 1000 (set spindle speed)
M3 (start it)
g1 z#<_pdep> (drop into position for a G38.2)
g38.2 f#<_srch> x-#<_stsrch> (look for disc)
#100 = #5061 (save -x result in #100)
G1 F#<_ffast> x-#<_srchoset> ( pull back )
M5 (stop spindle)
G4 p2 (pause 2 secs)
G1 Z#<_prup> (raise probe)
G1 x#<_srchoset> (goto other side, +X point)
M3 (restart motor)
g1 z#<_pdep> (drop to G38.2 point)
G38.2 F#<_srch> x#<_stsrch>
#101 = #5061 (save +x result in #101)
G1 F#<_ffast> X#<_srchoset> (pull back)
M5 (stop spindle)
g4 p2 (pause 2)
g1 z#<_prup> (back up to clear)
g1 x0 y0 (back to center)
g1 y-#<_srchoset> (goto -Y point)
M3 (start spindle)
g1 z#<_pdep> (drop to g38.2 start)
G38.2 F#<_srch> Y-#<_stsrch> (find -Y point)
#102 = #5062 (record -y result in #102)
g1 F#<_ffast> Y-#<_srchoset> (pull back)
M5 (stop spindle)
g4 p2 (pause 2)
g1 z#<_prup> (pull up)
g1 X0 Y0 (back to center)
g1 y#<_srchoset> (goto +Y point)
M3 (start spindle)
g1 z#<_pdep> (drop to g38.2 start)
g38.2 Y#<_stsrch> ( find disc)
#103 = #5062 (record +y result in #103)
g1 F#<_ffast> y#<_srchoset> (back away)
g4 p2 (pause 2)
g1 Z#<_prup> (lift for clearance)
M5 (stop spindle)
#104 = [#100 + #101] (add the x's, s/b about zero)
#105 = [#104/2] (divide by 2)
#106 = [#102+#103] (add the Y's, s/b about zero)
#107 = [#106/2] (divide by 2)
(debug, sub o100 Xcenter=#105)
(debug, sub o100 Ycenter=#107) ( s/b 0,0)
o100 endsub
o200 sub
G1 F#<_ffast> x0 y0 (center of hole)
M3 (start spindle)
G1 F#<-ffast> x-#<_hole) y-#<_hole> (position for start of plunge cycle)
(G3 F#<_medsp> X#<_hole> y#<_hole z#<_pdep) p30)
(g1 F#<_ffast> x-#<_hole> y-#<_hole>)
(G3 F#<_medsp> x#<_hole> y#<_hole> z0 p30)
M5 (stop spindle)
o200 endsub
o300 sub
(put hole size incrementing g-code here using in-29 in 7i76D)
o300 endsub
(main program start)
o100 call (run the center finding subroutine)
g1 f#<_ffast> X#105 Y#107 (goto where it found)
g10 L20 p1 X0 Y0 (zero to correct it)
o100 call (do it again to dbl check its correct)
(debug, Xcenter=#105 Ycenter=#107)
M2
(if this 2nd pass is correct change to EDM and do it)
(will need 3/1 transformer to detect arcing & control autofeed)
(find an output to turn on relay to switch probe to arc supply)
(find an input (28?) to check relay tally, exit if relay fails)
(find another output to enable arc supply via SSR)
(verify its on by checking another input, exit if failed)
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users