Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: extrapilot on August 28, 2007, 06:52:40 PM

Title: G81 weirdness, newbie
Post by: extrapilot on August 28, 2007, 06:52:40 PM
Hi-

I was attempting to run a very simple drill process. The program was to drill 3 holes full depth, and then drill a 4th hole partial depth, followed by a tool change (smaller drill) and a full depth pass at that final hole.

When Mach3 runs this code, it properly completes the first 3 drilling operations, but then it executes the 4th (partial depth drill) on the 3rd hole. Then it requests a tool change, and executes a full depth drill on the 4th hole. As best I can tell, the process should run as: move to -1.25,0 and execute a drill operation to -.6, then retract to .1, then move to x=1.25 and repeat drill operation (sticky), and then move to .315,-1.5945 for the 3rd drill op. Then it calls a G80, which as I understand it should cancel the G81 sticky process, and then move to -.5762,-1.5873, where a G81 call is made for a hole to -.3. The G80 does not appear to be handled here- and it seems to just skip line 118.

Anyone have any clue as to if this is a bug in the interpreter, or in my code generation (it is from Mastercam X).

Regards,
Rob

N100 G20
N102 G0 G17 G40 G49 G80 G90
N104 T104 M6
N106 G0 G90 G54 X-1.25 Y0. S1069 M3
N108 G43 H104 Z2.
N110 G98 G81 Z-.6 R.1 F4.28
N112 X1.25
N114 X.315 Y-1.5945
N116 G80
N118 X-.5762 Y-1.5873
N120 G98 G81 Z-.3 R.1 F4.28
N122 G80
N124 M5
N126 G91 G28 Z0.
N128 M01
N130 T4 M6
N132 G0 G90 G54 X-.5762 Y-1.5873 S1800 M3
N134 G43 H4 Z2.
N136 G98 G81 Z-.6 R.1 F1.03
N138 G80
N140 M5
Title: Re: G81 weirdness, newbie
Post by: Graham Waterworth on August 30, 2007, 04:06:46 AM
Hi Rob,

try the code like this, this should work, I am going to pass this one on to Art as the G80 should have cancelled the drill cycle but it looks like is did not.

What version of Mach are you using?

Graham.

N100 G20
N102 G0 G17 G40 G49 G80 G90
N104 T104 M6
N106 G0 G90 G54 X-1.25 Y0. S1069 M3
N108 G43 H104 Z2.
N110 G98 G81 Z-.6 R.1 F4.28
N112 X1.25
N114 X.315 Y-1.5945
N118 X-.5762 Y-1.5873 Z-.3
N122 G80
N124 M5
N126 G91 G28 Z0.
N128 M01

N130 T4 M6
N132 G0 G90 G54 X-.5762 Y-1.5873 S1800 M3
N134 G43 H4 Z2.
N136 G98 G81 Z-.6 R.1 F1.03
N138 G80
N140 M5
Title: Re: G81 weirdness, newbie
Post by: ART on August 31, 2007, 08:57:30 AM
Hi Guys:

 Actually, both are wrong. In the first program the move
N118 X-.5762 Y-1.5873 should have a g1 in it. This is because the G80 cancels the canned cycel, but it also cancels all modal motion commands, so the line
doesnt have a modal movement type. IT needs to have G1 reinstantiated.

 The second example, trys to change the Z of a canned cycle, that too cannot be done while in the cycle. The Z can only change when
entering a canned cycle. Ill list to see if I can change this bnehaviour, the G80 cancellation of all modal is a holdover from EMC's interpreter,
but I see in the code where I once changed it, then changed it back, so I suspect there are unknown problems in other areas when I just reinstantiate the
last motion prior to a canned cycle. But Ill see what I can do.

Art
 
Title: Re: G81 weirdness, newbie
Post by: Sam on September 28, 2007, 04:12:47 AM
I had the same issue today while cutting a part. Luckily I was only using a 1/8 end mill for the drill cycle, before the unintended (lack of G0 or G1)rapid through my part. I did manage to find a post that fixed the problem. It is here.. http://www.artsoftcontrols.com/forum/index.php?PHPSESSID=c685ee2eef12b97183a34a2803b770b4&topic=1306.0 Also fixes the line 1 error by putting the line numbering before the program number. There could be other potential causes for a crash using this post rather than the default post, I simply do not know. I did have to go into the control definition manager and turn on "write NC operation information" in the 'file' section to avoid the pop-up during the post process. I did use an earlier version of this post, so it may not have to be done now.