On Thursday, January 26, 2012 06:27:28 AM Mark Cason did opine:

> On 01/26/2012 12:20 AM, gene heskett wrote:
> > On Thursday, January 26, 2012 12:59:48 AM Mark Cason did opine:
> >> On 01/25/2012 04:44 AM, gene heskett wrote:
> >> Hmmm, silly Q for you and Rafael: If, after having executed the G38.2
> >> and the machine is stopped, what sort of havoc would I create if I
> >> simply wrote the known height of the gage at contact, into #5063?
> >> That might not be the correct #number but you get the idea. What ever
> >> number would cause the machine's currant Z, both as displayed and
> >> internally used to determine the next move, to be corrected to the
> >> known gage height it is actually sitting at IOW?
> 
>    I can't answer this :(
> 
> > Using bc or perl seems like a gawd-awful kludge even if it did work.
> > LinuxCNC has its own math functions that appear to my untrained eye to
> > be spot on, so why not use them directly?
> 
>    Yes, it would be a kludge, but a fairly straightforward one.  This
> would have to be written as a "Go Between" script, that could read the
> output of PCB-GCode, modify the output, and parse it so that
> EMC2/LinuxCNC could understand what you want.
> 
>     The 3 options I see are:
> 
>   1) Modify the g-code output of PCB-GCode,

by inserting a few lines of code seems the ideal method from here.

>   2) Modify PCB-GCode directly, so that it gives you what you want, or

unreal, given that the variables occur after pcb-gcode's view of the world.

>   3) figure out how to get EMC2/LinuxCNC to modify the g-code on the
> fly.

Which is why it seems more better an idea to grab what is in #5063 after 
the G38.2, and apply enough math to arrive at where you want it to think it 
is, and do a G92 Zmath-result.  To keep track of where the machine needs to 
be, back at its own referenced home position, do a G92.1 to clear the 
offset before going back to the tool change position above the gage, for 
the next tool change.  The way pcb-gcode issues those commands is 
consistent, so a search for the M06 T, than back up 2 moves and do the 
G92.1  Then after the M6 T# insert "call <z_cal.ngc>", which will do the 
G38.2, process the result and apply diff as G92 Z<result>

The .drill files have 5 such change places each.
 
>    I have a hard enough time with EMC2/LinuxCNC, as it is,  For me at
> least, the only other option would be to edit PCB-GCode, but I'm not
> well versed in ULP files.
> 
>    Due to moving my shop, and having my CNC mill sitting on the floor in
> pieces due to having worn out leadscrews, I'm not set up to test
> PCB-Gcode.

Ouch.  Bummer.  That day will come for my little toy too.  The XY nuts are 
such a kludge, I should have spares on the shelf for when I break one 
trying to take up the backlash. :(

> > An old friend and engineer back in about 1960 was fond of the phrase
> > 'simplicate' and I'd think this qualifies.  :)
> > 
> > Cheers, Gene
> 
>    For me, this would be simple...
> 
> 
>    DISCLAIMER:  I've been using Linux since '94 (Early SLS version), and
> I can write (and have written) BASH scripts in my sleep.  They might not
> be the most efficient scripts, but they work for me.  I've been doing
> this for so long, I do most things without really thinking about HOW to
> do them.

There was a time when I dreamed in 6809 assembly.  So I know well how that 
works.  :)  Like you, now I write system daemons in bash. Except for its 
lack of floating point operations, its a pretty good OS (but don't tell 
that to an emacs fan) :)

Cheers, Gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
My web page: <http://coyoteden.dyndns-free.com:85/gene>
Political history is far too criminal a subject to be a fit thing to
teach children.
                -- W.H. Auden

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to