Hello Guest it is March 28, 2024, 08:42:01 AM

Author Topic: Q word missing error when running G83?  (Read 5824 times)

0 Members and 1 Guest are viewing this topic.

Offline Bx3mE

*
  •  68 68
    • View Profile
Q word missing error when running G83?
« on: December 18, 2016, 09:15:09 AM »
When i run the generated G-Code the machine stops and complains about missing Q Word... Why? Q-Word is not 0 or negative and should be treated as sticky....
Anyone a clue?

(Note: G-Code is Generated By CamBam so i dont have a clue what Q Word does...)

Code: [Select]
G21 G90 G64 G40
G0 Z10.0
( T10 : 6.0 )
T10 M6
( Drill 6mm CenterBore 4-6mm )
G17
M3 S1500
G0 X82.96 Y40.1
G98
G83 X82.96 Y40.1 Z-5.0 Q1.0 R3.0 F100.0
G83 Y119.9 Z-5.0
G83 Y199.7 Z-5.0
G83 X637.24 Z-5.0
G83 Y119.9 Z-5.0
G83 Y40.1 Z-5.0
G80
« Last Edit: December 18, 2016, 09:20:41 AM by Bx3mE »
Re: Q word missing error when running G83?
« Reply #1 on: December 18, 2016, 02:34:16 PM »
You only need the G83 on the first line because it is modal. As soon as you call G83 again you need the Q again.
We never have the time or money to do it right the first time, but we somehow manage to do it twice and then spend the money to get it right.

Offline Bx3mE

*
  •  68 68
    • View Profile
Re: Q word missing error when running G83?
« Reply #2 on: December 18, 2016, 03:16:21 PM »
Has this changed since Mach3?
Re: Q word missing error when running G83?
« Reply #3 on: December 18, 2016, 08:13:13 PM »
Not that I am aware of.
Here is how the Mach3 rectangular hole wizard generates code for the G83 cycle.
This is for a 10 x 3 pattern of holes.

G0 G49 G40  G17 G80 G50 G90
M6 T0
G20 (Inch)
M03 S0
M08
G90
G00 G43 H0  Z0.1
G83 X-7 Y-4 Z-0.75 Q0.2 R0.1 F10
X-5.8889
X-4.7778
X-3.6667
X-2.5556
X-1.4444
X-0.3333
X0.7778
X1.8889
X3
Y-2
X1.8889
X0.7778
X-0.3333
X-1.4444
X-2.5556
X-3.6667
X-4.7778
X-5.8889
X-7
Y0
X-5.8889
X-4.7778
X-3.6667
X-2.5556
X-1.4444
X-0.3333
X0.7778
X1.8889
X3
G80
M5 M9
X-7  Y-4
M30

HTH

Mike
We never have the time or money to do it right the first time, but we somehow manage to do it twice and then spend the money to get it right.

Offline Bx3mE

*
  •  68 68
    • View Profile
Re: Q word missing error when running G83?
« Reply #4 on: December 19, 2016, 05:26:47 AM »
That is so wired because i have used CamBam for ages and never ha this problem .... only now since i started using Mach4....

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Q word missing error when running G83?
« Reply #5 on: December 19, 2016, 12:00:38 PM »
My guess is that Mach4 is a little more strict in it's requirements.
Code that works in Mach4 will probably run in Mach3, but not all code that works in Mach3 will work in Mach4.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Q word missing error when running G83?
« Reply #6 on: December 21, 2016, 10:59:03 PM »
CamBam has been doing that for me too. I have to manually edit the GCode to remove the extra G81 or G83 entries.

I've gotten pretty good at filtering them in my text editor but it is a bug that is tedious at best. It seems like something in Mach 4 must have changed in the current build because it didn't happen to me until approximately 2-3 months ago.

Re: Q word missing error when running G83?
« Reply #7 on: January 09, 2017, 05:05:56 PM »
G83 is a deep hole pecking drill canned cycle, "Q" is the peck depth.  If you're using a pecking cycle you need to have the "Q" in there since that is what the program looks for as the "Peck Depth".  If you do not need to peck then just use "G81". 
Chad Byrd
Re: Q word missing error when running G83?
« Reply #8 on: January 09, 2017, 06:11:15 PM »
Understood. Regardless of G81 or G83, here is the issue:

CamBAM produces the following code for a simple Drill cycle. Could be G81 or G88, you get a similar result in Mach4 with respect to the error.

   ( Made using CamBam )
   ( Spinner with Brass 1/9/2017 3:16:46 PM )
   ( T2025011 : 0.25 )
   G20 G90 G64 G40
   G0 Z0.8
   ( Pre Drill )
   G17
   G0 X95.5123 Y45.6613
   G98
   G83 X95.5123 Y45.6613 Z-0.04 Q0.375 R0.0 F150.0
   G83 X92.297 Y46.425 Z-0.04
   G83 X92.3761 Y42.9219 Z-0.04
   G80
   G0 Z0.8
   G0 z1.5 X1.5 Y49.5
   M30


OR a G81 based drill program from CamBAM:

   ( Made using CamBam )
   ( Podium 1/6/2017 1:42:52 PM )
   ( T1025021 : 0.25 )
   G20 G90 G64 G40
   G0 Z0.7
   ( PreDrill 025 )
   G17
   G98
   G81 X95.6034 Y36.4502 Z0.35 R0.0 F170.0
   G81 Y25.553 Z0.35
   G81 X94.6409 Y23.3137 Z0.35
   G80
   G0 Z0.8
   G0 Z1.5 X1.5 Y49.5
   M30


Up until a more recent build of Mach4, these would run both of these without an error.
However, in the current build, Mach4 throws the following error when you load the file:

    File "C:\Users\My Computer\Dropbox\CNC\Predrill.nc", Line 11: Q word missing with G73/G83

AND if you try to run the G83 peck file the following error comes up:

   Made using CamBam
   Spinner with Brass 1/9/2017 3:16:46 PM  
   T2025011 : 0.25  
   Pre Drill
   Q word missing with G73/G83


If you load the G81 file, it does not produce errors but it stops part way through the GCode list. The machine drills the first hole, traverses to the second location and does nothing more.

I have needed to modify the G83 file as follows:

   ( Made using CamBam )
   ( Spinner with Brass 1/9/2017 3:16:46 PM )
   ( T2025011 : 0.25 )
   G20 G90 G64 G40
   G0 Z0.8
   ( Pre Drill )
   G17
   G0 X95.5123 Y45.6613
   G98
   G83 X95.5123 Y45.6613 Z-0.04 Q0.375 R0.0 F150.0
   X92.297 Y46.425 Z-0.04
   X92.3761 Y42.9219 Z-0.04
   G80
   G0 Z0.8
   G0 Z1.5 X1.5 Y49.5
   M30


and the G81 file as follows:

   ( Made using CamBam )
   ( Podium 1/6/2017 1:42:52 PM )
   ( T1025021 : 0.25 )
   G20 G90 G64 G40
   G0 Z0.7
   ( PreDrill 025 )
   G17
   G98
   G81 X95.6034 Y36.4502 Z0.35 R0.0 F170.0
   Y25.553 Z0.35
   X94.6409 Y23.3137 Z0.35
   G80
   G0 Z0.8
   G0 Z1.5 X1.5 Y49.5
   M30



To my knowledge, CamBAM has not changed any of the way it produces GCode. These files used to run on Mach4 but now they don’t.

Is that more helpful?
« Last Edit: January 09, 2017, 06:13:26 PM by 53 Sparky »

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
Re: Q word missing error when running G83?
« Reply #9 on: January 11, 2017, 10:32:44 PM »
The CamBAM post processor is producing incorrect G code.  G81 and G93 are modal G codes.  You turn them on, then cancel them with G80.  So what Mach 4 is asking for is correct.  Previous builds of Mach 4 probably didn't catch that error.  We have been improving the error catching abilities of the interpreter and it looks like it messed things up for you, unfortunately.  :(  But it is probably a rather simple edit of the CamBAM post processor to fix the issue.  Or maybe try a generic Fanuc post processor to see if it may be better.

Steve