Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: kharrisonkevin on April 02, 2016, 05:45:38 AM

Title: Gcode mishaps
Post by: kharrisonkevin on April 02, 2016, 05:45:38 AM
Hi everyone. I am having trouble with either getting false e stops or running out of data on my ether net smooth step. The gcode that I am running is short it is face milling my cnc bed. I had bobcad support look at the file to see if everything is good and it is. Soon times when I first go to run the code the z axis goes from zero away up in the + and it is supposed to go up 2 then go to -.001 and start cutting . I cannot for the life of figure out what is going on need help
Title: Re: Gcode mishaps
Post by: Tweakie.CNC on April 02, 2016, 06:24:03 AM
Zip and post (attach) your Gcode file.

Tweakie.
Title: Re: Gcode mishaps
Post by: Jarhead on April 02, 2016, 08:53:03 AM
If you jog the z in the positive (Z+) direction, which way does the machine move, up or down?
Title: Re: Gcode mishaps
Post by: kharrisonkevin on April 02, 2016, 04:04:37 PM
I was making the top for the bed drilling holes in it and without running a gcode it still was spontaneously throughing a estop. The more I did the more often it began kicking off even without moving and with or without the spindle on. What do you think is the cause
Title: Re: Gcode mishaps
Post by: kharrisonkevin on April 02, 2016, 04:06:54 PM
When I jog in the +it moves up as it should all other axis are good too.
Title: Re: Gcode mishaps
Post by: iMisspell on April 02, 2016, 04:24:04 PM
Is there a physical/mechanical e-stop button wired to your machine ?
If so, is it also wired to your computer so Mach "see's" it ?
Title: Re: Gcode mishaps
Post by: kharrisonkevin on April 02, 2016, 04:29:54 PM
There is a mechanical estop button wired to the brakeout board wire to 5 volts and pin 10
Title: Re: Gcode mishaps
Post by: kharrisonkevin on April 02, 2016, 04:34:57 PM
I had to disable the limit switches 1 wire on a switch broke and haven't had a chance to fix it yet .
Title: Re: Gcode mishaps
Post by: kharrisonkevin on April 03, 2016, 08:54:25 AM
I mite have found 1 problem it was with my ether net smooth stepper. I had to go into it and set the filter for rf noise from zero to 1.43. I mite have to increase it by .10 but you can't go over 10.00. I found this out on the net posted by Hood.
Title: Re: Gcode mishaps
Post by: kharrisonkevin on April 04, 2016, 05:03:00 PM
Here is my nc file for you to have a look at. The file works good but I have to run it from line 6 or six.
Title: Re: Gcode mishaps
Post by: kharrisonkevin on April 04, 2016, 07:58:00 PM
i have noticed at the end of the file run the cnc wants to go in the minus direction where it should be going to zero and stopping
Title: Re: Gcode mishaps
Post by: Tweakie.CNC on April 05, 2016, 02:19:15 AM
Your Gcode is shambolic (to say the least) but it does work.

I am assuming…

1) Your Mach3 settings are such that a +Z command moves the tool away from the work and a –Z command moves the tool towards the work.

2) You are setting Z0.0000 as being the top surface of the work.

Is this the case ?

Tweakie.
Title: Re: Gcode mishaps
Post by: kharrisonkevin on April 05, 2016, 05:20:18 AM
Yes
Title: Re: Gcode mishaps
Post by: iMisspell on April 05, 2016, 08:00:42 PM
kharrisonkevin, have you successfully run any other programs (before or after the program you posted) ?
With you saying you have to start at line 6 and you also said the program "misbehaves" at the end, its kind of pointing to the g54 and g53 (work shifts and home).

What happens if you change the beginning to:
Code: [Select]
N01 G20 G40 G49 G91.1
N02 G0
N70 G28 G91 Z0.
N71 G90
(Machine Setup - 1  Facing)
(FACING)
N03 T1 M6
N04 S32 M03
N05 G54
N76 X0. Y0.
N06 G43 H1 Z1.

And change the end to:
Code: [Select]
N63 G28 G91 Z0.
N64 G28 X0. Y0.

Try stepping/running through the program in single block mode and post what happens and at what line number when the machine misbehaves.

_


Title: Re: Gcode mishaps
Post by: kharrisonkevin on April 06, 2016, 08:44:05 PM
How do I set mach3 to run 1 line at a time. I started to run with your changes and at the first few lines it wanted to go down to.-1657 then up but with not being able to just run 1 line at a time it goes through the code lines so fast I can't document it for you to be precise.
Title: Re: Gcode mishaps
Post by: kharrisonkevin on April 07, 2016, 05:59:39 AM
When I push the single blk the machine does not move on any line of the gcode
Title: Re: Gcode mishaps
Post by: iMisspell on April 07, 2016, 09:08:09 AM
When I push the single blk the machine does not move on any line of the gcode
Keep the single block button active like you are.

Then hit the cycle start button. Ever time you hit the cycle start button mach should read one line of your program and stop. Then you will have to hit the cycle start button again to make Mach read the next line.

Is this the first program you have tried to run ?

.
Title: Re: Gcode mishaps
Post by: kharrisonkevin on April 07, 2016, 09:18:02 PM
I run your add in here is what happened. N70G28G91Z0 went below zero
N71G91 went to Z-2.1696
N06 G43H1Z1 went to Z+1.0001
N07 M10 Noth happens
N08 Z0.2 went to Z+.10001
All the Y movements were correct the X was short by -002
N62 Mo5 nothing happened
N63 G28 G91 Z0  z went to Z-2.1696
N64 G28X0Y0 machine stopped for no reason and no estop at
X +4.2067 Y+7.6598 Z-2.1696
Title: Re: Gcode mishaps
Post by: kharrisonkevin on April 08, 2016, 05:36:34 PM
It's runs perfect for the y axis but the x axis is not running at the correct gcode it is  0025 is out even in 2 runs of the same gcode. The z axis at the start and the end is all wrong but throughout the gcode run it is stay at -.001 so that is correct  . But what is going wrong with my program or the cutting sequence?
Title:
Post by: iMisspell on April 08, 2016, 08:33:14 PM
Well kharrisonkevin, thats about all the trouble shooting i can offer. I do not know the Mach software (have a back round using/running commercial cnc controls ),  but with the g53 and g28's working the same ("wrong") i would guess its something with how the home position is set up, which is why ive asked if you have run any other gcode programs.

Hopefully with the info you have provided, someone with a Mach background will be able to help you.

-
Title: Re: Gcode mishaps
Post by: kharrisonkevin on April 09, 2016, 07:34:49 AM
Thanks for looking and seeing the problem.  I am new to the cnc but I know how to run a milling machine.
Title: Re: Gcode mishaps
Post by: mc on April 09, 2016, 06:17:15 PM
As you're new to CNC, I'd suggest spending some time learning about the various G codes, and how they affect each other.
Here's your NC file with comments added to describe what the codes are doing.

N01 G20 G40 G49 G91.1 G20 tells machine code is in imperial, G40 and G49 cancel tool cutter and length compensation respectively, G91.1 puts the machine in Incremental mode)
N02 G53 Z0.Move to machine Z zero
(Machine Setup - 1  Facing)
(FACING)
N03 T1 M6Load Tool 1
N04S32M03Spindle on CW at 32RPM
N05G00G90G54X0.Y0. G00 sets rapid mode, G90 puts the machine back in Absolute mode, and select G54 work offsets
N06 G43H1Z1.G43H1 causes the tool offset for tool 1 in the tool table to be applied, then the Z1 causes a move to 1
N07M10Just googles and M10 would appear to be a clamp/vacuum on command?
N08Z0.2
N09Z0.1
N10G01Z-0.001F10. G01 sets Feed
N11Y63.F30.
N12X1.125
N13Y0.
N14X2.25
N15Y63.
N16X3.375
N17Y0.
N18X4.5
N19Y63.
N20X5.625
N21Y0.
N22X6.75
N23Y63.
N24X7.875
N25Y0.
N26X9.
N27Y63.
N28X10.125
N29Y0.
N30X11.25
N31Y63.
N32X12.375
N33Y0.
N34X13.5
N35Y63.
N36X14.625
N37Y0.
N38X15.75
N39Y63.
N40X16.875
N41Y0.
N42X18.
N43Y63.
N44X19.125
N45Y0.
N46X20.25
N47Y63.
N48X21.375
N49Y0.
N50X22.5
N51Y63.
N52X23.625
N53Y0.
N54X24.75
N55Y63.
N56X25.875
N57Y0.
N58X27.
N59Y63.
N60G00Z0.2 Back in Rapid mode
N61Z1.
N62M05 Stop Spindle
N63G53Z0. Move to machine Z zero
N64G53Y0. Move to machine Y zero

(END OF PROGRAM)

N65M02M02 signifies end of program
%


Going by that code, and what you're describing, it sounds like either your axis aren't homed correctly and/or your tool table offsets are wrong.
Title: Re: Gcode mishaps
Post by: kharrisonkevin on April 09, 2016, 06:29:37 PM
Thanks I will check into this