Need Help! Calling all code writers....


Results 1 to 4 of 4

Thread: Calling all code writers....

  1. #1
    Member
    Join Date
    Aug 2006
    Location
    us of a
    Posts
    71
    Downloads
    0
    Uploads
    0

    Default Calling all code writers....

    My first attempt at writing a subroutine using M98 and it's a fail.........

    G91 (Set *Incremental Mode)
    G00 Z.1 (Rapid Positioning to safe Z)
    M8 (Flood coolant on command turns on spindle)
    G4 P3 (Dwell for spindle to spin up to speed)

    M98 P1000 L5 (call O1000 subprogram and Loop 5 times)
    G00 Z.1(Rapid Positioning to safe Z)
    M9 (all coolant off command to turn off spindle)
    G90 (Set *Absolute Mode)
    G00 X0 Y0 Z.100 (Rapid home- Z.100)
    M30 (Program end and rewind)

    O1000 (Subprogram to call)
    G01 Z-.500 F3 (Linear Interpolation) (Feedrate 3 Z down -.5)G00 Z.600 (New line to pull cutter up)
    G00 Z.600 (Rapid Positioning raises Z .600)
    G00 X-.05 (Rapid Positioning moves X over .05)
    M99 (return from Subroutine)
    %

    I missing something somewhere and can't seem to find it.
    My machine is using the A as a spinner on my mill and I am trying to cut incremental grooves in a round piece.
    It seems for some reason it's not reading the incremental code and each time it moves over in the X it keeps adding to the .100 clearance over the piece and by the time it gets to the last loop is only plunging around .100 and retracting around .600
    I tried moving the G91 into the sub program to no avail.
    Using Mach3 on my mill.
    Any clues or help is greatly appreciated.

    Similar Threads:


  2. #2
    Flies Fast Superman's Avatar
    Join Date
    Dec 2008
    Location
    Antarctica
    Posts
    3109
    Downloads
    0
    Uploads
    0

    Default Re: Calling all code writers....

    IMO you may find fault finding better if you:-
    try to make just the sub as an incremental part, start with G91, end with G90, add up each address between those G codes separately... ie all the Z values must equal zero
    ... you can then introduce the X step.... suggest you put at the start of sub.... the XYZ start point should allow for the X step.

    Programming entirely in incremental can lead to a large problem, you've got a lot more to check.



  3. #3
    Member
    Join Date
    Aug 2006
    Location
    us of a
    Posts
    71
    Downloads
    0
    Uploads
    0

    Default Re: Calling all code writers....

    Quote Originally Posted by Superman View Post
    IMO you may find fault finding better if you:-
    try to make just the sub as an incremental part, start with G91, end with G90, add up each address between those G codes separately... ie all the Z values must equal zero
    ... you can then introduce the X step.... suggest you put at the start of sub.... the XYZ start point should allow for the X step.

    Programming entirely in incremental can lead to a large problem, you've got a lot more to check.
    Thanks for your input....
    I'll give it a stab a little later today and see what I can come up with.
    I had another tell me that's where he had put the G91 and didn't seem proper to me but I give it a whirl.
    I had a sneaky feeling that may be part of the problem.

    I'll report back......................



  4. #4
    Member
    Join Date
    Aug 2006
    Location
    us of a
    Posts
    71
    Downloads
    0
    Uploads
    0

    Default Re: Calling all code writers....

    Moved the G91 into the sub and prelims in air look good. I tried that yesterday but have put it on the wrong line. Another friend also helped straighten me out on it.
    Much appreciated Superman



Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Calling all code writers....

Calling all code writers....