View Full Version : Need Help! Inserting G41 command in a subroutine


sbarziza
06-11-2008, 02:04 AM
Hello:
I am having a small problem with a post file on my Fadal machine.
I have a VMC 15XT with the 88HS control. I have my machine setup to run 8 parts, and so I have created a subroutine for all my tools ops.
I call them up when I do a tool change.
Like this:
T1 M6
S2500. M3
Z.1 H1 M8
Go X 1.234 Y-1.2 E1
L101
And so on and so forth.
My problem is that when I need to make a small adjustment to my tool diameter, the program or controller will not make the required cutter comp, for my diameter offset. I put in a -.005 diameter offset on the offsets page.
And in the sub-routine I put a G41 on the 1st line where the X motion occurs, and at the end of the sub-routine I put in a G40 to cancel cutter comp. I am at a loss for what is wrong. What should I look for or change in order to get this to work.
Also I use Solidworks and Camworks to create my tool paths.
Camworks will not create multiple fixture offsets, I must do that editing by hand in Preditor.
Any help would be gretaly appreciated.

Thanks

Sam

sbarziza
06-11-2008, 02:49 AM
Hello:
This is Sam again, I forgot to add to my previous post that I am cutter a circular pocket.
I can post the text file that I am having trouble with, if that would help.

Thanks

Sam

timf
06-11-2008, 09:14 AM
are you also putting the D or H on the same line?

machine needs to know what comp to use.

post the text if that is not the problem.

sbarziza
06-11-2008, 05:04 PM
Hello Tim:
Here is a sample of my code. I only copied the portion that I am having trouble with.
This is the start of my subroutine. Notice how Camworks posted a G3 and G1 on just about every line. So to add a G41, where would you put that. No I don't use 'D' words.
But I do use the 'H' word for tool length offset.

N106 L700
N107 (.372 4 FLUTE HSS EM)
N108 G90 G00 X1.7128 Y-1.5
N109 G01 Z-.15 F1.35
N110 G03 I-.0253 J0 F30.
N111 G01 X1.8628
N112 G03 I-.1753 J0
N113 G01 X2.0128
N114 G03 I-.3253 J0
N115 G01 X2.1628
N116 G03 I-.4753 J0
N117 G01 X2.3128
N118 G03 I-.6253 J0
N119 G00 Z.1
N120 X1.7128
N121 Z-.05
N122 G01 Z-.35 F1.35
N123 G03 I-.0253 J0 F30.
N124 G01 X1.8628
N125 G03 I-.1753 J0
N126 G01 X2.0128
N127 G03 I-.3253 J0
N128 G01 X2.1628
N129 G03 I-.4753 J0
N130 G01 X2.3128
N131 G03 I-.6253 J0
N132 G00 Z.1
N133 M17

This is the tool called up and the subroutine invoked by the L701 lines for each E number
N286 T8 M6
N287 S5500. M3
N288 Z.1 H8 M7
N289 G90 G00 X1.7128 Y-1.5 E1
N290 L701
N291 G90 G00 X1.7128 Y-1.5 E2
N292 L701
N293 G90 G00 X1.7128 Y-1.5 E3
N294 L701
N295 G90 G00 X1.7128 Y-1.5 E4
N296 L701
N297 G90 G00 X1.7128 Y-1.5 E5
N298 L701
N299 G90 G00 X1.7128 Y-1.5 E6
N300 L701
N301 G90 G00 X1.7128 Y-1.5 E7
N302 L701
N303 G90 G00 X1.7128 Y-1.5 E8
N304 L701
N305 M9
N306 G0H0 Z0
N307 G90
N308 M1

I ncluded this block of code to show how my thread milling works. The G41 is used and I can use tool diameter offsets on my offsets page in the Fadal controller.
N134 L800
N135 (8mm x .75mm)
N136 G90 G00 X1.6875 Y-1.5
N137 G01 Z-.3337 F13.
N138 G41 X2.0434 Y-1.8559
N139 G03 X2.3994 Y-1.5 Z-.33 I0 J.3559
N140 Z-.3005 I-.7119 J0
N141 X2.0434 Y-1.1441 Z-.2968 I-.3559 J0
N142 G00 X1.6875 Y-1.5
N143 Z.1
N144 G40 X1.6875 Y-1.5
N145 M17
N146 M30

Well any help or ideas would be greatly appreciated.

Thanks

Sam

Delw
06-11-2008, 05:29 PM
g01 g41 xblah blah y blah blah d2 ( d word must be used for the diameter offset) same line ok

and h word is for height offset.

dont forget to have a lead in before you start to cut and a lead out on then cancel your offset.

sbarziza
06-11-2008, 05:45 PM
So for the 'D' word or offset for that D2, I simply put in a value like -0.003"
and I am good ?

Delw
06-11-2008, 07:14 PM
I always put in the dia. of the tool. then fine tune it when you measure your parts.
providing your program is exactly what your part size is.

if you programed your part and offsetted your tool ( in the program) .250 then you could use the .003+ or - but doing so you are more than likely to make mistakes and if you change endmills to a bigger one you will have a huge number in there that will make no sence.

Cartesian-xyz
06-17-2008, 08:31 PM
Cutter Comp must be entered in a G0 or a G1. Cutter Comp
can be entered and exited in the main program and past
to the sub program or entered and exited in the sub program.
The D value must be entered prior to the G41 or G42, But
does not have to be on the same line. Just to clear things
up the D is a register # and not an offset value.
(G41 D5) correct (G41 D.003) Incorrect.
Now if you have done all this correctly and in running the
program you adjust your offset in the Tool offset table
you dont see an imediate chage, here is why.

The Fadal control has a variable in the SETP page that
is look ahead buffer. As I remember the older machines
could be set to 256. If this is the case then the Fadal
control will read the program and buffer many lines ahead
and never UPDATE your diameter offset change UNTIL it
refills the buffer!
So if you have a short program with subs and you make
any offset changes XYZAB or HD it will not see them until
the buffers are refreshed, UNless you stop the program and
restart it. You can use the AU command and start mid program
with success. (USE caution on this as it will move to the
prior XYZ location prior to execution)

Hope this Helps
Stephen

donl517
06-19-2008, 04:48 PM
So for the 'D' word or offset for that D2, I simply put in a value like -0.003"
and I am good ?


No.

T1 = Tool 1
D1 = Tool Diameter 1
H1 = Tool Length 1

They are used to call the values stored in your tool offset page.
(i.e. D2 = Tool Diameter 2, D3 = Tool Diameter 3, etc...)

HTH,
Don

B_Bueno
06-28-2008, 10:33 PM
My post does not put the G41 on a move that my machine is acustomed to see. After I post and go into edit[predator] I bang in a "D" value on the Z feed move and I'm in then . . .