Hello Guest it is March 28, 2024, 03:08:07 PM

Author Topic: G41 Offset being ignored  (Read 7995 times)

0 Members and 1 Guest are viewing this topic.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: G41 Offset being ignored
« Reply #10 on: October 10, 2010, 05:01:40 PM »
Graham The current version works FINE after I remembered to clear the G52 from previous work(;-)  OLD BAD HABIT

IF it works with this test it should work with anything.

Here is a Play test file.  Note the use of the tool: on the Toolpath screen to count parts per setup NOTE: this will not work IF you use tool changes for the obvious reasons.

G21 G90 G54 G80
G52 X0 Y 0
F500
#1=-.1
#11=-.1  ( Z Step Depth )
#2=0
#3=20    ( Part Offset )
#4= 2     ( Number of Z steps)
#5= 3     ( Number of Parts on X axis )
#6=1      ( Parts Counter per setup)
G0X0Y0
M98 P2 L#5
G40
Z2.000
X0Y0
G52 X0 Y0
G0 X0Y0
T0 M6
M30
%
o02
T#6 M6
#1=-.1
Z2.000
G40 X0Y0
G52  X#2
G0 X0 Y0
#2=[#2+#3]
M98 P3 L#4
#6=[#6+1]
%
o03
G41 P.5
G1 X5 Y-1 Z#1
#1=[#1+#11]
G1 X5 Y5
X-5 Y5
X-5 Y-5
X5 Y-5
X5 Y-1.5 Z#1
Y-1
m99
%

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: G41 Offset being ignored
« Reply #11 on: October 10, 2010, 05:29:30 PM »
I have to admit that your test file did not work as expected, but after a few changes it worked better.

%
G21 G90 G54 G80
G52 X0 Y 0
F500
#1=-.1
#11=-.1  ( Z Step Depth )
#2=0
#3=20    ( Part Offset )
#4= 2     ( Number of Z steps)
#5= 3     ( Number of Parts on X axis )
#6=1      ( Parts Counter per setup)
G0X0Y0
M98 P2 L#5
G40
Z2.000
X0Y0
G52 X0 Y0
G0 X0Y0
T0 M6
M30
(% removed)
o02
T#6 M6
#1=-.1
Z2.000
G40 X0Y0
G52  X#2
G0 X0 Y0
#2=[#2+#3]
M98 P3 L#4
#6=[#6+1]
m99 (added this)
(% removed)

o03
G41 P.5
G1 X5 Y-1 Z#1
#1=[#1+#11]
G1 X5 Y5
X-5 Y5
X-5 Y-5
X5 Y-5
X5 Y-1.5 Z#1
Y-1
m99
%

Graham
Without engineers the world stops

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: G41 Offset being ignored
« Reply #12 on: October 10, 2010, 07:58:59 PM »
HUM yep missed a M99 but the funny parts is HERE mach does not care it runs the same with or without the M99. I t should have thrown an error (sub call with no return)

Another strange thing is even thought the Z variable is 0.100 per step Mach moves 0.127.  Somewhere mach is adding the .027. The internal Variable value =0.100 based on the var monitor.

I use the % as a separator so when mach loads up without spaces you can still find the break easy.

« Last Edit: October 10, 2010, 08:02:54 PM by BR549 »