Greetings all;

Using the g38.2 on a lathe for a potential auto-zero turned out to be a 
lot more painful that it was on my mill, so here is a blow by blow that 
at some point I'd like to see in the wiki in case someone else has to
re-invent this contraption.

Background:

I made a gage out of some 25mm by alu blocks.  The probe contact faces 
are double sided pcb material super glued to the gages faces.  Its 
base was milled to fit the front V-way and just lay on the rear of the 
bed for x location, with a L shaped piece where the L is rotated 90 
degrees CW so it can project to the right in a position behind the 
mounted cutting tools.  Another 25mmx25mmx75mm block of alu was super-
glued to the front face of the 'L' and its right end face serves as the 
mounting face for another piece of PCB material which will be one of the 
Z axis contacts.

Bolted to the front face of the 25mmx25mmx75mm block is a smaller alu 
piece, about 30mmx10mmx10mm with half the thickness, nominally 5mm, cut 
away for about 10mm, and suitable sized bits of pcb material lining the 
cutaway, so this, when swung down so it overhangs the right end of the 
25mmx25mmx75mm block, thereby supplying a probe contact surface for a 
smallish boring bar facing the operator.

A 12 foot headphone extension was purchased from the shack, and cut in 
two such that one end was terminated at the probe in terminals on the 
drive power box, the other end was stripped and the active wire was 
soldered to the 4 pieces of PCB material.  I did not ground the 
shielding on this gage, thinking that the lathe frame was grounded 
through its line cord, and the computer & power boxes were also grounded 
at their power cords, but it appears there is enough noise from the 40 
kilohertz 2M542 amplifiers impressed on the lathes frame by motor winding 
capacitance that I have quite a bit of noise, up to 3 or 4 volts, being 
induced back into the probe input, so when contact is solidly made, the 
LED on the C1G interface card is still about 2% of normal brightness.
I need to get one of those monster cables & figure out a way to star
ground everything without making any ground loops, which should be fun.

At that point I raised the servo-thread to 2 khz, and added a debounce 
module with a delay of 4 into the circuit, which seemed to be sufficient 
to give solid logic levels, as opposed to pocket comb teeth on the hal-
scope display without it.

[snippet of .hal to do this]
--------------------------
# Now, we need some help for probing
net     probe                           parport.0.pin-10-in-not         
debounce.0.0.in # feeds x,z
net     probe-debounce                  debounce.0.0.out                
and2.0.in1      and2.1.in1
setp    debounce.0.delay                4                                       
# for both axis's
--------------------------

I might try delay at 3 or even 2 there eventually because this delay 
enhances another problem, that of tripping off when attempting to move 
back away from contact.  The debounce holds it true too long.

I have ordered another screw for the z, but it will be mid-February 
arriving.

The Z probe is only interested in establishing a stop point while moving 
left, and because of the nominal 21 thousandths of backlash in that 
drive, I thought it best to enable probe detection only when moving left.

To that end, the .hal code to develop a direction signal from backlash-vel

[snippet of .hal file]
---------------------
# Z only here, uses comp2, and2.0, and2.1, or2
setp    comp.1.hyst                     0.000001        # for z only, makes dir 
sig from backlash move
net     probe-disable1                  axis.2.backlash-vel             
comp.1.in0
setp    comp.1.in1                      0.000000
net     probe-disable2                  comp.1.out                      
and2.0.in0      # z dir, valid left only
net     probe-disable3                  and2.0.out                      
or2.0.in0       # z for combined probe
---------------------
Because of the slight hyst value, it remembers the polarity of the backlash
move, opening the path for the probe signal when moving to the right. Works.

But since the X needs to be sensitive in both directions, I chose to enable
detection only when it was actually moving.

[snippet of .hal file]
------------------------------------
# Now, we need a similar function for x but bidirectional
net     x-probe-control0                axis.0.joint-vel-cmd            
abs.3.in        # x is moving signal
net     x-probe-control1                abs.3.out                       
comp.2.in1      # + for either direction
setp    comp.2.in0                      0.000001                                
        # threshold of movement
net     x-probe-control2                comp.2.out                      
and2.1.in0      # now we have true/false
------------------------------------

But then I couldn't back away from contact once it was made, so a disable 
during backlash was needed.  Backlash there is nominally .001", its a ball
screw.

[snippet of hal file]
------------------------------------
net     probe-x0                        and2.1.out                      
and2.3.in0      # needs 1 more sig yet
# now, kill x sense during backlash
net     probe-x1                        axis.0.backlash-vel             
abs.4.in        # vel pulse while bklsh mv
net     probe-x5                        abs.4.out                       
comp.3.in0      # now uni-directional
setp    comp.3.in1                      0.00000001
net     probe-x2                        comp.3.out                      
and2.3.in1      # false while bklsh mv
net     probe-x4                        and2.3.out                      
or2.0.in1       # x for combined probe
# and hook this rube goldberg up to the target, motion.probe-input 
net     probe-final                     or2.0.out                       
motion.probe-input      #final probe control
------------------------------------

Complex, and probably "simplicatable", but seems to work, the disable
signal is about 38 milliseconds long on the halscope.  It also does
not work at all well if I move the 1 in the setp one space left.  It is
indeed that critical, needing every millisecond I can coax out of the
vel signal which peaks at about 40 millivolts on the halscope.

Thanks for your reading patience.

Comments welcome.

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> is up!
My views <http://www.armchairpatriot.com/What%20Has%20America%20Become.shtml>
WHERE CAN THE MATTER BE
        Oh, dear, where can the matter be
        When it's converted to energy?
        There is a slight loss of parity.
        Johnny's so long at the fair.
I was taught to respect my elders, but its getting 
harder and harder to find any...

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to