Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: John40131 on October 19, 2017, 11:39:02 AM

Title: Probe not stopping "Z" axis
Post by: John40131 on October 19, 2017, 11:39:02 AM
Hi,

I have had a few issues with my new CNC I built mostly getting to run and Limits and Homing etc.

My problem for this thread is the probe does not stop "Z" axis from going down, in Mach3 Diagnostics when the probe is touched the switch is triggering the Digitize Yellow LED but "Z" does not stop only after hitting limit switch does it stop.

My other issue is X and Y axis are going in a negative direction on the DRO and if I try and run say roadrunner from Home position it just hits limit switches.

Regards John
Title: Re: Probe not stopping "Z" axis
Post by: joeaverage on October 19, 2017, 05:27:31 PM
Hi,
not sure about the probe problem at the moment.

Try reversing the X and Y axes by checking (or unchecking as the case my be) the active low setting of the
DIR signal of both stepper drivers.

Craig
Title: Re: Probe not stopping "Z" axis
Post by: joeaverage on October 19, 2017, 11:28:44 PM
Hi John,
just double check that you have assigned the input Probe to a valid pin. What port and what pin?

It may be that the Digitize LED is confusing you, I think (I'm not near a machine) Digitise is actually an output.
Hopefully just a confusion in terms.

Craig
Title: Re: Probe not stopping "Z" axis
Post by: joeaverage on October 20, 2017, 01:49:04 AM
Hi John,
my apologies it is my confusion not yours. The LED on the diagnostics page is called Digitize but on Machs inputs page its called Probe.

Craig
Title: Re: Probe not stopping "Z" axis
Post by: John40131 on October 20, 2017, 08:31:09 AM
Hi Craig,

Thanks again for help think I am getting there slowly a lot more difficult that I imagined, sorted the +ve and -Ve directions of movement, combination of Zero axis and then find machine axis is different so turning motors off and driving to zero sorted that problem tried setting soft limits seem to get that working, but then I tried running road runner and the first Z command is G0 X0  Y0  and Z  0.2 this drives my "Z" axis to stops as setting is 0.0000 going down to about -2.24 inches, when I get past that it runs so far think it stops after so far as I think that could be I only got Demo copy till I am happy that I can handle the program. >:D >:D >:D >:D

The probe is assigned to pin 11 and when I touch the probe the Digitize LED in "Input Signal current State" lights up all the other limit switches work fine and LED's work.

Pic of BOB so you can see the connections on LH Side.

Regards John
Title: Re: Probe not stopping "Z" axis
Post by: joeaverage on October 20, 2017, 09:41:04 AM
Hi John,
this is called 'CNC', the first letter stands for 'computer', when in your experience have anything to do with computers gone smoothly?

Probing is done with a G31 code. How is that code generated? Can you post a sample of it?

Craig
Title: Re: Probe not stopping "Z" axis
Post by: John40131 on October 20, 2017, 10:45:55 AM
Hi Craig,

Sorry for terminology but its not a CNC till it works properly LOL.

Am I telling you the wrong thing, its a Probe which sets the hight of the "Z" axis prior to starting a job i.e clip on drill or router and when point touches the metal plate it stops the "Z" axis.

Also don't know what I touched but suddenly changed to metric, I set to inches, how do I change back.

Regards John
Title: Re: Probe not stopping "Z" axis
Post by: John40131 on October 20, 2017, 11:21:11 AM
Think I found out why got the change to metric, I loaded "Ball.tap" and the first line gives a G21 which quote "G21 at the start of the code will tell Mach its metric, G20 will tell Mach its Imperial"  so think thats my problem need to get a G20 code to reverse it.

Regards John
Title: Re: Probe not stopping "Z" axis
Post by: joeaverage on October 20, 2017, 01:49:26 PM
Hi John,
yes G21/G20 changes units and its modal. So if a G21 is issued the machine will interpret all motion codes as mm and stay that way UNTIL a G20 is issued.

Quote
Am I telling you the wrong thing, its a Probe which sets the hight of the "Z" axis prior to starting a job i.e clip on drill or router and when point touches the metal plate it stops the "Z" axis.
Yes this is one of the most common of the probing procedures. A G31 code is issued to cause the probing cycle. Can you post the G31 code that you are using?

Craig
Title: Re: Probe not stopping "Z" axis
Post by: John40131 on October 21, 2017, 06:19:30 AM
Hi Craig

Yeh didn't quite understand the reason of G31 code, but yes that activates the probe to work, I found another thread on this forum and tried "G31 Z-4 F40" and yes it does the job.

I think I can call it a CNC know, gonna try the spindle motor today, But, I'm gonna have to do a few mods to "X" axis and Gantry its not stable enough, got more bits on order "wife would kill me " if she knew what i spending LOL

Very grateful for all your help.

Regards John
Title: Re: Probe not stopping "Z" axis
Post by: John40131 on October 21, 2017, 10:01:16 AM
Hi,

Just got a little bit lost with this G-Code I generated using from an Eagle design using PCB-Gcode, When running the code as in attachment,Commands "R0.1000 cause an error "R Less thanY in XZ Plane" this is in line 47.

G82 X-0.8000 Y2.4000  Z-0.0320 F20    R0.1000  P1.000000

Also what is the P1.00000  ???,   "P    Serves as parameter address for various G and M codes    

    With G04, defines dwell time value.
    Also serves as a parameter in some canned cycles, representing dwell times or other variables.
    Also used in the calling and termination of subprograms. (With M98, it specifies which subprogram to call; with M99, it specifies which block number of the main program to return to.)"

 Can I delete both these command as R seems to relate to an arc.

Also stops on the "M03" command "To fast for pulley using Max" but carries on think that may related to spindle set at "S20000" which is not running on this test and is prob way faster than my spindle, so just need to edit as required..

Regards John
Title: Re: Probe not stopping "Z" axis
Post by: joeaverage on October 21, 2017, 01:56:02 PM
Hi John,
G82 is a canned drill cycle with dwell.
The P is the dwell time when the drill get to the bottom.
R is the retract height. You are expecting that the drill tip starts out at 0.1 inch, that is above the board, it drill down at 20 in/min until 0.032 inch below the top
of the board, dwell for 1 second and then retract at rapid  rate to Z-0.1 ie 0.1 inch above the board.

All of these values are set when you set-up PCB-Gcode. What thickness is your board?, I would guess it is 32 thou or 0.8mm. Your drill, if everything is perfect,
is going to get to the bottom surface of the board but not penetrate it. Is that what you want? I use 1.5mm PCB and I have the drill go to Z=-1.8mm so
it reliably penetrates the board and I'm quite OK with the drill digging into the spoil board below. Dwell only need be 0.25 sec or so.

The only real error in the code you've posted is that your machine is in XZ plane mode? You want to be in XY plane mode. Try putting a G17 to select XY plane
mode right at the very top of the Gcode job, I'm surprised that its not already active with all the preparatory codes.

If you think that you can do CNC jobs without being able to read and understand basic Gcode... you are wrong. It is a required skill that you be able to understand
little chunks of code like this example and be able to understand what your machine will do when it encounters it. On the Program Run page there are two buttons
to provide concise notes as to the meaning of G and M codes. The CNC bible is:
Quote
CNC Programming Handbook by Peter Smid
its a dry read but very good. No doubt there are other texts and probably plenty on the net, find them and
read them, we are not born being able to read Gcode, it something we have to learn. If the value of a hobby is what you have to learn in pursuit of that hobby
the CNC rates very highly...you have to learn untold things to be any good at it.

Craig
Title: Re: Probe not stopping "Z" axis
Post by: John40131 on October 21, 2017, 04:04:58 PM
Hi Craig,

I realize that I will have to learn the G-Code it'll take a bit the old grey matter is not the same as when I was younger.

I have re-done the PCB Gcode from Eagle for the Timer PCB without any changes so you can see if there is any errors, all I will have to do is put the G17 at the beginning.

My CNC settings for "Z" are on the DRO 0.0000 at the top and goes down by about 2.75 inches so -2.7500, thats just before limit to limit switches.

I have a G-Code listing from CNC Cookbook so will use it to go through and try and understand what is happening.

Regards John
Title: Re: Probe not stopping "Z" axis
Post by: joeaverage on October 21, 2017, 04:33:16 PM
Hi John,
I notice you are using a Z drill depth of 0.062 inch, ie 1/16 inch. If you are using 1/16 inch circuit board its not enuf, if you are using 1/32 PCB then
the drill will penetrate which is good. Are you happy that the drill will mark the material underneath?

Next issue is this confusion about the Z axis co-ordinates. It is very common to define the very top of Z axis travel as MACHINE co-ord 0. Your
Z axis can go 2.75 inches lower so your machine co-ord at that point would be -2.75.

When you are machining a PCB you'll be in WORK co-ords. Notice the Gcode you posted shows a Z of 0.1 inch when above the board, but that's higher than
the very top! So the Gcode you have posted is written in work co-ords. It expects the top surface of the board to be Z=0 Then Z=0.1 means a tenth of an inch
above the PCB and Z=0.005 as 5 thou below the surface, probably the cut depth of a router bit if you are mechanically etching the board.

So the procedure is to set the PCB blank in its jig and manually jog the spindle down until the tool just touches the surface of the blank and then hit <Zero Z>.
Now set the code to run, any positive Z means above the board and safe and any negative number means the tool/drill is engaged with the workpiece.

Craig
Title: Re: Probe not stopping "Z" axis
Post by: joeaverage on October 21, 2017, 04:41:13 PM
Hi John,
no disrespect for the Gcode publication you got but if you wanted to know about the Quran, for instance, would you read it in a popular magazine or would you
get a genuine copy? In like manner Peter Smid's book is the authoritative source.

Craig
Title: Re: Probe not stopping "Z" axis
Post by: joeaverage on October 21, 2017, 06:09:36 PM
Hi John,
just noticed a typo which could throw you out...

I wrote Z=0.005...it should be Z=-0.005   The negative sign is critical to understand...negative Z below the surface, positive Z above the surface.

Craig
Title: Re: Probe not stopping "Z" axis
Post by: John40131 on October 22, 2017, 10:33:23 AM
Hi Craig

Okay done a dry run on that G-Code and changed a few parameters, and it works fine Ive not run spindle motor yet will try that on Monday, like you said added the G17 then changed R and P settings as they were to long and it goes through cycle brilliant.

Got to do mods to Y gantry as its to much movement the 8mm bars just have to much bend so getting 12mm supported and fix the Y gantry to the base so X axis moves and prob change the Y axis bars to 12mm bars.

Also found that need to add Probe script to set the Z high off a work piece, got that off a YouTube Guru.

The book is a very good idea but at £56 on Amazon will have to be a present, I think I have a fair understanding of this G-Code will learn more as I use more.

Regards John
Title: Re: Probe not stopping "Z" axis
Post by: joeaverage on October 22, 2017, 12:06:54 PM
Hi John,
I got a download of the book, not as convenient as printed but OK.

Craig
Title: Re: Probe not stopping "Z" axis
Post by: John40131 on October 23, 2017, 06:51:34 AM
Hi Craig,

I would be interested in the download link.

Also been looking for program to allow me to use a Web cam mounted in place of the Spindle motor so I can program co-ordinates from a PCB Negative Photo of board ( the old method before Gerber came along) and create G-Code, have you ever come across anything, Ive been searching but cant find anything.

Thanks again for Help

Regards John
Title: Re: Probe not stopping "Z" axis
Post by: joeaverage on October 23, 2017, 07:03:46 AM
Hi John,
check out the Video Probing board of the forum.

I use Eagle software to produce PCB artwork then there is a User Language Program (PCB-Gcode) which converts the artwork into Gcode.
I personally have not seen any program that can take a visual image of a circuit board and produce Gcode. It sounds more like something
people doing artistic engraving might know something about.

Ill try and find a link for the book. I see my copy is 140Mb so it won't attach to an email comfortably.

Craig
Title: Re: Probe not stopping "Z" axis
Post by: John40131 on October 23, 2017, 07:22:06 AM
Hi Craig,

Got it second Edition plus some other PDF files

John
Title: Re: Probe not stopping "Z" axis
Post by: John40131 on October 23, 2017, 07:26:38 AM
Hi Craig,

The camera thing is what we used to do when I was in Printed circuit industry in the 1980's fit camera on Excellon machine and after marking a path up on a Negative or Positive jog round and mark hole positions then save and run, no idea what language was used as its moved on a lot today using all Gerber files for PCB manufacturing.

John
Title: Re: Probe not stopping "Z" axis
Post by: joeaverage on October 23, 2017, 07:31:31 AM
Hi,
do you actually have images of artwork that you want to turn into a PCBs or are you looking to design  boards from scratch?

Craig
Title: Re: Probe not stopping "Z" axis
Post by: John40131 on October 23, 2017, 08:25:05 AM
I enclose a photo of a typical board, I don't have G-Code for this so if I wanted to drill I would mount on base, program some fixing points and then follow a line which I would draw on photo and mark each hole in the program also use different colour pen for different drill sizes on the photo, and then generate G-Code from this to drill.
I suppose you could do manually but would take forever on a board with say 1000 holes or more.

Regards john
Title: Re: Probe not stopping "Z" axis
Post by: joeaverage on October 23, 2017, 12:17:45 PM
Hi John,
I think a video probe is your best bet, try Video Probing board.

Craig
Title: Re: Probe not stopping "Z" axis
Post by: John40131 on October 23, 2017, 12:28:34 PM
Hi Craig

Just wondering about the CopyCat Wizard that seems to generate G-Code when jogging and pressing Feed Move button, not sure how you would save the readings from window but using a Webcam you can get a picture of what is on table.

Regards John
Title: Re: Probe not stopping "Z" axis
Post by: joeaverage on October 23, 2017, 01:06:02 PM
Hi,
I haven't tried it myself but as I understand it the webcam has a cross-hair reticle, you place the cross hair on your target feature and hit a button.
How that data is used I imagine is up to you.

Craig