G10 Issues

A place to discuss and ask questions about all things Machining for Mills, Lathes, Laser, and Routers

Moderator: cnckeith

Gerral
Posts: 11
Joined: Fri Nov 22, 2024 4:25 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: B4107B77A373-0905248481
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

G10 Issues

Post by Gerral »

I'm trying to convert GCode from an established Mach4 machine and am running into strange happenings.

Code: Select all

( BRL100 Lug hole closest to edge )
(angle 7.2500)
#31508 = [ #31516 + 43.0000 ]
M05
M06 T1
S12000.0 M03
F1200.0
G10 L2 P1  Y#31508 X0.00 Z#31501 A7.2500
G43 H1
G00 G54 G90 Z15.
X0 Y0 A0
M01
M98 P9001
;
Above is the original working code on Mach4 when run it on CNC12 I get: 701 G10 error: no R value

Code: Select all

( BRL100 Lug hole closest to edge )
(angle 7.2500)
#31508 = [ #31516 + 43.0000 ]
M05
M06 T1
S12000.0 M03
F1200.0
G10 L2 P1 R0 Y#31508 X0.00 Z#31501 A7.2500
G43 H1
G00 G54 G90 Z15.
X0 Y0 A0
M01
M98 P9001
When I add R0 R0 or any other R value I get: 704 G10 error: invalid P
I'm not sure where to go with this.

Thanks in advance for any assistance.


suntravel
Posts: 2895
Joined: Thu Sep 23, 2021 3:49 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 6433DB0446C1-08115074
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Germany

Re: G10 Issues

Post by suntravel »

G10 is for writing Parameters:

12.6 G10 – Parameter Setting
G10 allows you to set parameters for different program operations.
Example:
G10 P73 R.05 ; Sets the peck drilling retract amount to .05
G10 P83 R.05 ; Sets the deep drill rapid down clearance to .05
G10 P81 R15 ; Sets G81 to use M15 instead of Z movement
G10 H5 R -1.3 ; Sets tool length offset #5 to -1.3 in the offset lib.
G10 D3 R.25 ; Sets tool diameter offset #3 to .25 in the offset lib.
237Note: The following parameters cannot be modified: 1–5, 7–9, 11–30, 39, 40, 42, 44, 52, 53, 60–63, 65–67, 70,
75–77, 82, 87–90, 95–98, 100–106, 107–112, 114, 120–122, 132–135, 155–159, 165, 220–224, 226–231, 236–241,
252–255, 257, 270, 271, 278, 300–315, and 416.

Uwe


Gerral
Posts: 11
Joined: Fri Nov 22, 2024 4:25 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: B4107B77A373-0905248481
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: G10 Issues

Post by Gerral »

I've been using G10 L2 P1 X50 Y100 Z25 to set the G54 offset but since this doesn't work on CNC12, what would be the alternative method?


suntravel
Posts: 2895
Joined: Thu Sep 23, 2021 3:49 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 6433DB0446C1-08115074
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Germany

Re: G10 Issues

Post by suntravel »

Why not setting G54 before running the g-code?

But you can write the WCS settings with variables...

Uwe
Attachments
aVeYdkiwUd.png


Gerral
Posts: 11
Joined: Fri Nov 22, 2024 4:25 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: B4107B77A373-0905248481
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: G10 Issues

Post by Gerral »

I can't preset the G54 offset because the piece's dynamic nature requires probing to determine its height and diameter. Essentially, I'm milling up to 20 separate "parts" on a cylindrical workpiece, and each part's position is established based on the probing results.

I was just told I can set the offsets for G54 using. #5221, #5222, #5223 and #5224 For X,Y,Z,A

Does that sound like it'll work?


suntravel
Posts: 2895
Joined: Thu Sep 23, 2021 3:49 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 6433DB0446C1-08115074
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Germany

Re: G10 Issues

Post by suntravel »

#5041-5048 are read only current position variables.

But anyway, G10 is for writing parameters, not for writing in variables.

Related reading:

11.2.16 #, = – User or System Variable Reference

in the mill manual.

Uwe


cncsnw
Posts: 4189
Joined: Wed Mar 24, 2010 5:48 pm

Re: G10 Issues

Post by cncsnw »

You can also use G92 to set part zero, in the currently-active WCS, based on the current axis positions.

A typical application is to do a probing operation that ends with the probe (spindle centerline) at the place you want to become X0Y0 in the WCS, and then run "G92 X0 Y0" to set it there.

That is for Mill controls. With a Lathe control you can use G50 to do the same thing (e.g. "G50 Z0" to set Z axis part zero at current position).


tblough
Posts: 3370
Joined: Tue Mar 22, 2016 10:03 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: 100505
100327
102696
103432
7804732B977B-0624192192
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Boston, MA
Contact:

Re: G10 Issues

Post by tblough »

IMHO, you should not be changing work offsets in a program. A change in a work offset should require user intervention which is why there are no easy ways to modify them programmatically.

This sounds like a perfect application of G52 to temporarily offset the current WCS.
Cheers,

Tom
Confidence is the feeling you have before you fully understand the situation.
I have CDO. It's like OCD, but the letters are where they should be.


Gerral
Posts: 11
Joined: Fri Nov 22, 2024 4:25 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: B4107B77A373-0905248481
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: G10 Issues

Post by Gerral »

Since I can't adjust the offset using G10, what would be the best approach to modify this code to work with Centroid? The idea of using G52 or G92 is appealing, but I'm struggling to fully understand how to implement it effectively.

To clarify, this setup involves working with a drum and milling multiple holes into it — potentially 60 or more, depending on the specific drum.

This is the subprogram I'm calling, over and over.

Code: Select all

O9102
(***Cut Circle***)
(Inside)
(Xorign: 0.0000  Yorign: 0.0000  Dia: 9.3000 Dir: 00  )
(Ztop: 2.0000  Zdepth: -13.0000  Zstep: 1.0000 )
(will make  15.0000  cuts of:  1.0000 )
G00 Z15.0000 
X3.1500 Y0.0000 
Z5.0000 
G01 Z2.0000 F1000.00 
G00 
G02 Z1.0000 I-3.1500 
Z0.0000 I-3.1500 
Z-1.0000 I-3.1500 
Z-2.0000 I-3.1500 
Z-3.0000 I-3.1500 
Z-4.0000 I-3.1500 
Z-5.0000 I-3.1500 
Z-6.0000 I-3.1500 
Z-7.0000 I-3.1500 
Z-8.0000 I-3.1500 
Z-9.0000 I-3.1500 
Z-10.0000 I-3.1500 
Z-11.0000 I-3.1500 
Z-12.0000 I-3.1500 
Z-13.0000 I-3.1500 
Z-14.0000 I-3.1500 
Z-15.0000 I-3.1500 
Z-16.0000 I-3.1500 
X-3.1500 I-3.1500 
X3.1500 I3.1500 
G00 Z15.0000 
#91031 = [#91031 + 1]
M99
This is how the previous CNC machine did it,each time using different calculated offsets here's an example of it being called two times.

Code: Select all

( SP300 Right for 10 lug 22" Drum Counterclockwise side middle)
(angle 6.39879028311650)
#91008 = [ #91015 - 90.0000]
#91009 = #91001- [ #91002 - SQRT[ [ #91002 ** 2 ]-[ -35.0000 ** 2 ]]]
#91010 = 27.2500 + [ -96.0000 / #91002] * 57.2957
G10 L2 P1  Y#91008 X-35.0000 Z#91009 A#91010
G43 H1
G00 G54 G90 Z15.
X0 Y0 A0
M01
M98 P9102

( SP300 Right for 10 lug 22" Drum Furthest edge center)
(angle 7.56357480314961)
#91008 = [ [#91015 - 90.0000 ] - 26.0000 ]
#91010 = 27.2500 + [ -96.0000 / #91002] * 57.2957
G10 L2 P1  Y#91008 X0.00 Z#91001 A#91010
G00 G54 G90 Z15.
X0 Y0 A0
M01
M98 P9102
thank you in advance!


suntravel
Posts: 2895
Joined: Thu Sep 23, 2021 3:49 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 6433DB0446C1-08115074
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Germany

Re: G10 Issues

Post by suntravel »

Do you have drawings or pictures of the parts for me to understand better what you want to achieve?

Uwe


Post Reply