On Wednesday 18 June 2014 12:44:27 chris did opine
And Gene did reply:
> thanks a lot Gene! I am not sure, if i did understand you right, but i
> think that did helps.
> i did think about a capacitor to, but didn't give it a try yet, cause i
> didnt want to figure out the right value in long testing phase. So now
> i know i will start with a 100nF! thanks! :)
> But i don't know what you mean with the "global position cache in the
> #5000 region that lcnc saves on contact.." and "I think, the
> integrators manual for a description of the variables it uses,
> starting at #5000." what does the "#5000" mean? i couldn't find
> anything about it in the integrators manual yet.

I am fairly sure its in there, may also be in the users manual.
> 
> I although use the probe test to engrave black-aluminium-frontplates
> with a V-shape-typ-mill-end. So i do many times the hit-test during the
> milling with the V-shape. It works great!
> So the code look something like the this:
> G21              (Unit in mm)
>   #3 = 1        (z-high)
> #4 = -0.1     ( z- deep)
> #5 = 60       (z-feed)
> #6 = 120     (xy-feed)
> #7 = -2        (probe deep)
> #8 = -0.1     (probe set to)

In the above, its easier to remember what the var does if you name it.
Change #3 to 

#<_z_high> = 1

for instance.  The leading underscore sets the scope of the variable, with 
the _ the var is global, without it, it is limited to the current 
subroutine level.  You MUST start the var definition with a #W and names 
must be within a pair of <>.  Greatly simplifies code readability for me 
as my short term is getting poorer as I approach my 80th.

> (....)
> G38.2 Z#7 (MSG,probe-test)
> g92 z#8
> F#6
> G1 X  15.660 Y 129.540
> (...)
> (engrave a word or somthing on the platte)
> G0 Z   #3

And this then becomes
G0 Z#<_z_high>
 
> greetz
> chris

Probably the best way to tut you on this Chris, if you have that man page 
handy too so you can x-ref what I did, is to just insert tholefinder.ngc 
below some of my blather here.

This particular code was designed to make use of a spinning wire made from 
a sewing machine needle threader, shaped into a sharp cone so that when it 
is spinning, it effectively is a sharp come but one that can be ticked 
around a bit without destroying it.

Its looking for the center of a 3/32 dia brass pipe inset into a pcb 
holding pallet, at a known offset from the corner of the board when its 
inserted.
==========
(tholefinder.ngc, a hole finding routine to aid in properly registering)
(the top and bottom machining operations based on the eagle CAD program.)
(The files are issued by pcb2gcode.ulp when it converts an eagle designed)
( board to gcode commands)
( VERY IMPORTANT this code makes some assumptions)

( 1. That a small piece of brass tubing has been let into the pallet, at )
( board left front corner -0.2X and +0.1Y and is connected to the probe )
( circuit )

( a year later, working on Kip Koons first board )
( now effectively random, and we must find that offset anew )
( when this is finalized, copy to coco-baord1 directory )

( 2. This location device is not known to eagle. Since I found that the )
( whole pattern worked better if the eagle output files were moved to )
( the left by 0.1X, this program will leave at $100 in memory, a value )
(that when applied with a G43.1 X#100 command, the offset to X that will )
( do that, but _all_ tool probing is done without that offset in effect )

( 3. The mill is driven by gcode or by hand before this routine is run )
( so that the tip of a conical probe is already reasonably well centered )
( and lowered slightly into the hole and that the probes hot lead is )
( actually connected to the pipe & board!)

( The probe wire, mounted in a collet is automatically grounded)

( 4. From that point we can probe to find the exact X center of the hole )
( in just 5 probing moves, and an additional 2 probing moves will show )
( the actual XY offset.  For informational use only so far. )

( 5. My probe for this was a very small dremel burr that was cut off to )
(leave a tapered shank but it has some runout, hence the probe is turning)
( slowly at high rate in comparison to the probing moves to effectively )
( cancel out the runout, improving the accuracy by at least 2 decimal) 
(places)

( probe itself has changed, above #5 comment obsolete)

( 6. The returned value will be returned in var #100, using other 100 up )
( vars for local scratchpad as it runs &  available for bot.etch and )
( bot.drill use in setting a G43.1 offset )
( 7.  In any event this MUST be used before any other top machining )
( operations. )

( Copyright Feb 2012 by Gene Heskett, licensed the same as LinuxCNC )
( these values are custom for each board pallet made!!!! )
( change signs of fudges here in these 2 statements )

(Assume machine is lost, reset so machine & g54 match)
(G53 G0 X0.0000 Y0.0000 Z0.0000)
G92.1 (cancel any G92 offsets)
(G10 L2 P1 X0.00000 Y0.0000 Z0.0000 R0.0000) (set G54 to match machine 
actual)
G49 (turn off tool offsets)
( Xfudges move it left right in g55-56 maps )
#<_x_fudge_G55> = 0.3000 (s/b offset from center of reg pin to left edge 
of pocket)

( Now, for this board which measures 1.149" wide, the bottom offset is )
( arrived at by adding 2*0.3=0.6 to the board width, arriving at 1.749 ) 
#<_x_fudge_G56> = 01.7490 (final TBD) (and its grossly wrong! )
( the first hole, which would be at x.2,y.15 in g55, or .5,.25 in g54, 
should )
( be at .6+1.149=1.749, so this s/b the plus offset applied in G56 mode, 
placing )
( the first hole in bot.drill at x-0.2 y.15!)

#<_y_fudge>     = 0.1 (this one is reg pin center below bottom of pocket) 
( and boffset registers it on X axis, all of his AFTER the rotation if any 
is applied )
#<_bot_offset>  = 1.150 ( TBD for G56 is X width of pocket)
M05 ( make sure spindle is off )
( remove all machine offsets )
G17 G20 G40 G49 G54 G80 G90 G94
S1675 ( preset suitable spindle speed )
g0 z1.5
g0 x0.0000 y0.0000
M03 G04 P1 ( start spindle 1 sec wait )
( find tubing )
g0 z.50
G38.2 z-2 F1 ( establish initial #5061-#5069 values )
( copy #5063 to #101)
#<firstz>=#5063 ( initial contact Z )
G00 Z[#<firstz> + 0.020] ( raise it a wee bit to open probe )
( find right edge of hole )
G38.2 X[#5061 + 0.1] F0.1 ( search slowly for right side of hole )
( Copy first x found to #102 )
#<rightx>       = #5061 ( record first x value )

G0 x[#<rightx> -0.005] ( open probe )
G04 P.1 ( wait for cap to charge )
G38.2 F0.1 X[#<rightx> -0.1] ( search slowly for left side of hole )
#<leftx>        = #5061 ( record second x value )
#<centerx>=[[#<rightx> + #<leftx>] / 2.0000] ( gives center of hole in x 
dir )
G0 x#<centerx> ( put probe in center of X )
G04 p0.1 ( wait for cap to charge )
G38.2 f0.1 y[#5062 +0.1] ( now find back of hole for back y )
#<backy>        = #5062 (save it)
G0 y[#<backy> - 0.005] ( Open probe contact )
G04 P.1 ( wait for cap to charge )
G38.2 f.1 y[[#<backy>] -0.1] ( now find front of hole for front y)
#<fronty>       = #5062
#<centery>=[[#<backy> + #<fronty>] / 2.0000]
G0 y#<centery> ( put in center of hole )
(output value established, HOME XY here )
M05 (stop spindle)
G01 z[#<firstz> + 1.0] F14  (clear your tubing dummy!)
( adjust fudges in #100, #101 to hit corner of board exactly at 50 thou in 
from board corner in g55 mode )
#100    = [#<centerx> + #<_x_fudge_G55>]
( last is board X offset for top )

#102    = [#<centerx> + #<_x_fudge_G56>] (to correct bottom X offet?)
#101    = [#<centery> + #<_y_fudge>] ( center y is new gage tube error? )
(debug, corrected X offset for top X is #100)
(debug, corrected Y offset for top Y is #101)
(debug, corrected X offset for bottom X is #102)
(msg, now manually home X and Y  & repeat run if either error is more than 
0.001)
( and program G55 for top and G56 for bottom co-ordinate tables )
G10 L2 P2 x#100 y#101 R0.0000  ( G55 for top, no rotation here, might need 
- signs though )
G55 ( switch maps )
G0 X0.0000 Y0.000 ( goto 0,0 in G55 map, see where it goes, s/b x at .3 y 
at .1)
G4 P15
( now do the same convoluted setup for G56)
G54
G10 L2 P3 x[#102 + #<_bot_offset>] y#101 R0.0000
( set G56 and assume board is dead straight with table )
G56 (switch to G56 for bottom )
G0 X0.0000 y0.0000 ( Goto 0,0 in G56 map, see where it goes )
G4 P15
G54 (back to normal map)
G0  X#<centerx> Y#<centery> ( back to found center of contact pipe for 
next run )
(msg, if X or Y are more than .001 from zero, re-home and re-run)
G0 Z7 ( to change probe tool )
M02
============

Those #5061-5069 memory locations are where the G38.2 stores the detected 
contact position values of all 9 axis's when contact is made.  You can 
read them and store them in local variables for later use as I did above.

When I make a pcb pallet, I have a shallow fin on the back that exactly 
fits the T-slots in my mills table, and the rest of the pallet machining 
is done while referencing that, so the pallet is automatically within a 
few arc seconds of square to the table motion.  And it can be removed, 
then reinstalled to make another board without losing its rotational 
squareness.

Note too that I am no longer using this exact code as I've deduced a quick 
gedit to swap the signs of the x positions in the gcode, then assign the X 
offset for G56 to what I digital micrometer caliper reads across the 
board. Perfect registration is now achieved by simply offsetting the X in 
G56 so it hits the same corner of the board when it has been turned over 
on the Y axis, and the resultant -x positions then match precisely enough 
I can drill a hole halfway thru, turn the board over and drill halfway 
thru again with no detectable offset in the middle of the boards thickness 
where the mill/drill stopped.

But it serves as a tut about how to do this.  Not professionally pretty 
but I hope it helps.

I have similar routines that I use to establish the z=0.000 positions so 
that I can, if careful, remove the copper without digging a ditch in the 
glass, which is obviously harder on the bit even if it is carbide than 
just cutting the copper away.

Now, if I could figure out how to do the thru hole plating, I'd have it 
made.  But I've not found a procedure that doesn't involve some pretty 
nasty chemistry.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
US V Castleman, SCOTUS, Mar 2014 is grounds for Impeaching SCOTUS

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to