Hello Guest it is November 16, 2019, 06:36:26 PM

Author Topic: Help! Error Message G81 Cycle, Z Value Unspecified Error  (Read 1054 times)

0 Members and 1 Guest are viewing this topic.

Help! Error Message G81 Cycle, Z Value Unspecified Error
« on: December 08, 2017, 11:24:08 AM »
This sounds like a very simple issue, but I'm getting this error message on all of my drill cycles, and can't figure out what the problem is. My Gcode definitely has a Z value included. Attached are pics of my Gcode and the error message.
Re: Help! Error Message G81 Cycle, Z Value Unspecified Error
« Reply #1 on: December 08, 2017, 11:31:56 AM »
The Z co-ordinate in the G81 command line is the hole depth.

Before you can execute a G81, the previous code must have
established the Z starting point.

https://www.cnccookbook.com/g81-g73-g83-drill-peck-canned-cycle/
Steve Stallings
www.PMDX.com
For PMDX product support, please use PMDX forum or direct email for quickest response. We do not use this forum as our primary product support site.
Re: Help! Error Message G81 Cycle, Z Value Unspecified Error
« Reply #2 on: December 08, 2017, 12:02:00 PM »
Ok, so what should the first lines of this Gcode look like? This code ran perfectly fine in Mach 3.
Re: Help! Error Message G81 Cycle, Z Value Unspecified Error
« Reply #3 on: December 08, 2017, 12:19:37 PM »
I do not know your intent and cannot write the G code that you need to add.

It should precede the section that you posted and should establish the Z
plane that the G81 starts from. See the example that I linked.
Steve Stallings
www.PMDX.com
For PMDX product support, please use PMDX forum or direct email for quickest response. We do not use this forum as our primary product support site.
Re: Help! Error Message G81 Cycle, Z Value Unspecified Error
« Reply #4 on: December 08, 2017, 12:27:39 PM »
Hi,
I've encountered exactly this 'error' also. G83, in fact most of the canned cycles are modal, so the first G83 requires all the information to
drill the hole, Z depths, retracts...etc. Thereafter you only need put the X,Y co-ordinates and Mach assumes all the remaining info stays unchanged.
Your code will work if the first G83 line is left as is but each subsequent line LEAVE OUT the 'G83'

You might believe, as I did this is an error, its not. In fact this interpretation of a modal canned cycle is correct whereas Mach3's interpretation is/was
sloppy enough to get away with it.

Craig
My wife left with my best friend...
     and I miss him!
Re: Help! Error Message G81 Cycle, Z Value Unspecified Error
« Reply #5 on: December 08, 2017, 12:30:37 PM »
Hi,
sorry should be G81 not 83, same principle applies.

Craig
My wife left with my best friend...
     and I miss him!
Re: Help! Error Message G81 Cycle, Z Value Unspecified Error
« Reply #6 on: December 08, 2017, 12:47:52 PM »
Thank you! I left the first line the same but removed each subsequent G81 like you said and it runs perfectly. I don't know how long it would have taken me to realize that that was what needed to change, but I think you just saved me at least another hour of banging my head on the wall.

Now I'll need to update our Gcode generator program. It's a program that my coworker wrote years ago that lets you pick points and polylines in Rhino3D and it spits out a Gcode. Anyway, thanks again.
Re: Help! Error Message G81 Cycle, Z Value Unspecified Error
« Reply #7 on: December 08, 2017, 12:52:50 PM »
Hi,
try this code:
Code: [Select]
n10 g20
n20 g81 x0.067 y2.121 z-0.223 r0.500 f6.0
n30 y3.496
n40 x2.844 y3.993
n50 y2.100
n60 g80

Couple of other interesting things that Mach4 does which can catch you out:
the G code interpreter changes all letters to lowercase, strips out leading zeros and spaces.

So:
G81 X0.067 Y2.121..... becomes
g81x.067y2.121.....etc

In the vast majority of cases it makes no difference but in some cases it does, I found out when Mach couldn't find a macro I had written and named
M03 or similar and Mach interpreted differently and continued using the built in macro because my substitute was incorrectly named. smuprh pointed
this behaviour out. While uppercase, leading zeros and spaces make Gcode more human readable the Gcode interpreter sees it differently, be aware of it!

Craig

My wife left with my best friend...
     and I miss him!
Re: Help! Error Message G81 Cycle, Z Value Unspecified Error
« Reply #8 on: December 08, 2017, 12:57:20 PM »
Gee, I missed the duplicated G81 on each line.

Seems you did already have Z plane defined.

Good catch Craig, Mach4 is much fussier about following G code standard.

Steve Stallings
www.PMDX.com
For PMDX product support, please use PMDX forum or direct email for quickest response. We do not use this forum as our primary product support site.
Re: Help! Error Message G81 Cycle, Z Value Unspecified Error
« Reply #9 on: December 08, 2017, 01:01:34 PM »
Hi,
I use a software utility that converts PCB artwork into Gcode and it puts a G81 on each line also and that's when I encountered the behaviour you noted.
I was tempted to call it an error, after all the same code ran under Mach3 just fine, it must be a Mach4 bug, but its not. The Mach4 behaviour is closer
to the correct, or at least 'Peter Smid' interpretation.

Craig
My wife left with my best friend...
     and I miss him!