Hello Guest it is March 29, 2024, 04:52:10 AM

Author Topic: Why Is this happening?  (Read 5686 times)

0 Members and 1 Guest are viewing this topic.

Why Is this happening?
« on: September 06, 2015, 07:57:09 AM »
I am in the process of setting up my lathe tool turret

I am using small stepper motor, an encoder and using Pokeys 57E

I have a button via Pokeys calling a macro controlling the operation.

In the macro I have G01 code controlling the movement with a high

feed rate F900. I need this high a feed rate because of the turret gearing

It all works as expected except  when I first load up mach and try it

at this point it appears to use the feed rate in feed DRO.

It completes the cycle ok but way to slow.

Once it has completed one cycle it seems to follow the macro perfectly.

Does anyone have any ideas on what could be influencing the first cycle


Any ideas would be greatly appreciated

cheers George

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Why Is this happening?
« Reply #1 on: September 06, 2015, 10:11:55 AM »
Can you post the macro?
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Why Is this happening?
« Reply #2 on: September 06, 2015, 10:48:56 AM »
Hi Gerry

Dim T1 As Long
Dim T2 As Long
Dim T3 As Long

DoOEMButton(1011)'Zero A axis DRO

DoOEMButton(303)'MPG Velocity Only

T1 = GetOEMDRO(102) 'current encoder count

Code (" G01 A47 F900") 'move 47deg anticlockwise fast
   While (IsMoving())
      Sleep (100)
   Wend
Code ("G01 A45 F200") 'move 2Deg clockwise slowly
   While (IsMoving())
      Sleep (100)
   Wend

T2 = GetOEMDRO(102) 'new encoder count

T3 = T2 - T1

SetOEMDRO(1999,T3)'Put value T3 into Encoder DRO


Note without DoOEMButton(303) it always runs slow


cheers George 

ps when I tried to attach file m1200 it told me 2 error one already exists rename"

so to load just remove (duplicate)               
Re: Why Is this happening?
« Reply #3 on: September 07, 2015, 07:12:53 AM »
One other thing I have noticed is that if I go into

config ports and pins when I come out of it

and try turret it reverts back to slow feed

for first cycle.

George
Re: Why Is this happening?
« Reply #4 on: September 07, 2015, 03:45:55 PM »
Another strange thing

I have tried to remove the feed rate issue altogether

by changing the two code lines to  G00 A47  and G00 A45  (rapid traverse)

and it is just the same slow on the first cycle fast on the rest !!!!!!!!



Where is the feed rate for G00 set?



The screen set I am using has feederate option G94 and G95

In one of my textbooks it says Fanuc type lathe controls normally use G98 and G99

Does anyone know what is correct for mach lathe?


Cheers George

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: Why Is this happening?
« Reply #5 on: September 08, 2015, 07:42:35 AM »
George,

Where is the feed rate for G00 set?

G00 - the max feedrate will be limited by the max Velocity  setting in motor tuning  
Note that an axis can be defined as linear and rotary.

G94  & G95 are correct for Mach3. See the manual for Mach's definition of G98 & G99. There are differences in the Gcode definitions
between manufactures and some manufacture Gcodes are specific to that manufacturer.

What version of Mach are you using?
What / who's screen set are you using?
May want to post you xml file.

RICH
Re: Why Is this happening?
« Reply #6 on: September 08, 2015, 10:47:21 AM »
Hi Rich

Mach version is R3.043.066
Please find attached xml and screen set


Got the screen somewhere on forums a couple of months ago
but can't see it listed now. Wanted to try it as it already had A DRO set up
only mod I have made to original is added extra encoder DRO.

However since your post I have tried using standard lathe screen and
problem is just the same.

What I have also tried is typing G01 A45 F900 directly into MDI line and this
works every time even after restarting mach or after viewing ports and pins

So then I tried writing a new shorter macro (without using cut and paste from previous macros)
consisting only of

DoOEMButton(1011)

Code("G01 A45 F900")
     WhileIsMoving())
          Sleep(100)
      Wend

I then called this macro up direct from the MDI line and the problem is
exactly the same as before ie slow after start up then works fine
every subsequent attempt

Cheers George

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Why Is this happening?
« Reply #7 on: September 08, 2015, 11:37:45 AM »
Try going back to an older version like .062 or .057.
3.043.066 is known to be rather buggy,
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Why Is this happening?
« Reply #8 on: September 08, 2015, 02:40:33 PM »
Hi Gerry

Just the same unfortunately

cheers George

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Why Is this happening?
« Reply #9 on: September 08, 2015, 07:02:35 PM »
When mach 3 first loads up the feerate is set to zero.That is a safety feature. Try adding in a Fcall in the initiation string. Something like F100.  The reason it is slow when you come out of config IS mach3 resets and that sets the Feedrate back to ZERO again (;-).

IF putting a f100 in the initiation string does not help then FORCE the Fcall it your macro by making a call.  Code"F900" put it in before any action code, right after the last DIM call

Code"F900"
While Ismoving()
Wend