Hello Guest it is July 08, 2020, 01:35:13 AM

Author Topic: spindle speed doesnt reset (mach 3)  (Read 405 times)

0 Members and 1 Guest are viewing this topic.

spindle speed doesnt reset (mach 3)
« on: November 27, 2019, 09:28:32 AM »
Hello Everyone
I am trying out different tools with speeds and feeds to see the difference
in cutting
I have written the attached bit of code but wheb I run the code when
it hits the block M3 the speed runs away up to maximum speed (1700rpm)
Would some-one please look at the sample of code attached and tell me why it should be doing this?
( sorry i am battling to get the code to attach)
think of the trees-- use both sides of the computer paper
Re: spindle speed doesnt reset (mach 3)
« Reply #1 on: November 27, 2019, 09:33:47 AM »
Hello Everyone
I am trying out different tools with speeds and feeds to see the difference
in cutting
I have written the attached bit of code but wheb I run the code when
it hits the block M3 the speed runs away up to maximum speed (1700rpm)
Would some-one please look at the sample of code attached and tell me why it should be doing this?
( sorry i am battling to get the code to attach so am doing a copy paste)


% prepare
% take one cut along the diameter
G18 (xz plane)
G40 (cancel nose radius compensation)
G49 ( cancel tool offset -like at a tool change)
G80 (cancel all canned cycles)
G90 (absolute distance mode)
G95 (move in units per rev)
G80 (cancel canned cycles)
s300    (motor speed set to 300rpm)
f0.1   (cutting feed is .1mm per rev)
m03     (start motor forward)
g0 x58
g0 z5
% first cut
f0.1
g0 z1
g0 x58
g01 z-15
g0 x60
g0 z1
M30 ( end of program return to program top -same as m02)


think of the trees-- use both sides of the computer paper

Offline Graham Waterworth

*
  • *
  •  2,102 2,102
  • Yorkshire Dales, England
    • View Profile
Re: spindle speed doesnt reset (mach 3)
« Reply #2 on: November 28, 2019, 09:59:53 AM »
For a start the only place you should have % is the first and last line of your code.

Lathe has 2 spindle modes G97 constant speed and G96 constant surface speed.

In your code you have not told it which you want so it may be in G96 by default so as the diameter reduces the speed rises.

so I would try G97 Snnn M3 and see if that helps.

Without engineers the world stops
Re: spindle speed doesnt reset (mach 3)
« Reply #3 on: November 29, 2019, 07:06:59 AM »
Thanks Graham for your response- I will play this out on monday when I am back at the machine

regards
fred
think of the trees-- use both sides of the computer paper