Need help to modify gcode so spindle does not turn off at the end of the cycle


Results 1 to 10 of 10

Thread: Need help to modify gcode so spindle does not turn off at the end of the cycle

  1. #1
    Member
    Join Date
    Oct 2006
    Location
    united states
    Posts
    205
    Downloads
    0
    Uploads
    0

    Default Need help to modify gcode so spindle does not turn off at the end of the cycle

    Hi,
    I have a repetitive job on my cnc mill.
    The code from Fusions stops the spindle at the end of the cycle.
    I would like to keep the spindle running at the end of the cycle while I swap out parts
    and then hit run again.

    Any help would be appreciated.

    Thank you all in advance.
    Rod in San Francisco

    (1001)
    (T144 D=0.3125 CR=0. TAPER=118DEG - ZMIN=-1.275 - DRILL)
    G90 G94 G91.1 G40 G49 G17
    G20
    G90
    (DRILL1)
    M5
    M9
    S2000 M3
    M8
    G0 X0. Y0.
    G43 Z1.4 H144
    Z1.
    G98 G73 X0. Y0. Z-1.375 R0.1275 Q0.1 F4.
    G80
    Z1.4
    G90
    M30

    Similar Threads:


  2. #2
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5717
    Downloads
    0
    Uploads
    0

    Default Re: Need help to modify gcode so spindle does not turn off at the end of the cycle

    M5 turns off the spindle so deleting that line might help. M30 may shut the spindle off also, depends on the controller software. It may be possible to replace the M30 with an M2, but i'm not sure if it would cycle again. Can't hurt to try.

    On the other hand, it doesn't seem safe to leave the spindle running when changing parts, but I'll leave it to you to evaluate the conditions.

    Jim Dawson
    Sandy, Oregon, USA


  3. #3
    Member machinehop5's Avatar
    Join Date
    Aug 2009
    Location
    United States
    Posts
    1570
    Downloads
    5
    Uploads
    2

    Default Re: Need help to modify gcode so spindle does not turn off at the end of the cycle

    One way is to LOOP the Program add a G04 Pxxx (Dwell time of your choice) and a M1 to be able to Stop for Lunch.



  4. #4
    Member mactec54's Avatar
    Join Date
    Jan 2005
    Location
    USA
    Posts
    15362
    Downloads
    0
    Uploads
    0

    Default Re: Need help to modify gcode so spindle does not turn off at the end of the cycle

    Quote Originally Posted by rodjava View Post
    Hi,
    I have a repetitive job on my cnc mill.
    The code from Fusions stops the spindle at the end of the cycle.
    I would like to keep the spindle running at the end of the cycle while I swap out parts
    and then hit run again.

    Any help would be appreciated.

    Thank you all in advance.
    Rod in San Francisco

    (1001)
    (T144 D=0.3125 CR=0. TAPER=118DEG - ZMIN=-1.275 - DRILL)
    G90 G94 G91.1 G40 G49 G17
    G20
    G90
    (DRILL1)
    M5
    M9
    S2000 M3
    M8
    G0 X0. Y0.
    G43 Z1.4 H144
    Z1.
    G98 G73 X0. Y0. Z-1.375 R0.1275 Q0.1 F4.
    G80
    Z1.4
    G90
    M30
    You would have to remove the M5 and M9 at the start of the program, the program looks kind of strange how that was done

    Mactec54


  5. #5
    Member
    Join Date
    Oct 2006
    Location
    united states
    Posts
    205
    Downloads
    0
    Uploads
    0

    Default Re: Need help to modify gcode so spindle does not turn off at the end of the cycle

    Quote Originally Posted by mactec54 View Post
    You would have to remove the M5 and M9 at the start of the program, the program looks kind of strange how that was done
    Thanks everybody who chimed in.
    The job was to drill a 9/32 through hole down the center of a 1/2-13 x 3/4 hex bolt which are M8 hardness.
    Since there are 500 pieces, I thought I could save wear and tear on the spindle motor by keeping it on for the 500 cycles.

    Turned out that auto spindle turn off and then a simple cycle start worked best.

    Things I learned from this job was a slow constant downward pressure worked 10x better than peck drilling.
    9/32 drill 900 rpm with flood coolant. Each cycle was only 60 seconds.
    I could get about 15 cycles from each new 9/32 bit before sharpening.

    Since I am only a home shop machinist, I never know how much to charge.
    I settled on $2.25 each piece.

    Thanks again for all your help.

    Rod in SF

    Need help to modify gcode so spindle does not turn off at the end of the cycle-m8-bolt-hole-2-jpg
    Need help to modify gcode so spindle does not turn off at the end of the cycle-m8-bolt-hole-jpg

    Attached Thumbnails Attached Thumbnails Need help to modify gcode so spindle does not turn off at the end of the cycle-m8-bolt-hole-jpg   Need help to modify gcode so spindle does not turn off at the end of the cycle-m8-bolt-hole-2-jpg  


  6. #6
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5717
    Downloads
    0
    Uploads
    0

    Default Re: Need help to modify gcode so spindle does not turn off at the end of the cycle

    At $2.25 each, I think you did OK.

    Jim Dawson
    Sandy, Oregon, USA


  7. #7
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4154
    Downloads
    0
    Uploads
    0

    Default Re: Need help to modify gcode so spindle does not turn off at the end of the cycle

    hi

    i thought I could save wear and tear on the spindle motor by keeping it on for the 500 cycles
    to avoid spindle stop, use something like this :

    Code:
        spindle running
        G00 Z_up
        G00 Y_bring_table_near_door
         /... or M01 (*1)
        G00 Y_send_table_at_work_position
        G00 Z_down
    
    (
    *1
    search a parameter inside the machine, that won't stop the spindle during optional stop 
    )
    Turned out that auto spindle turn off and then a simple cycle start worked best
    also a ctr capability will save some time :

    Code:
        G00 Z_up
        G00 Z_down S M03 ( rpm and linear travel, both of them, begin at same moment )
    Things I learned from this job was a slow constant downward pressure worked 10x better than peck drilling
    the truth is in between : somehow, you have to change the peck distance and the cutting feeds as you go deeper, so to keep ( almost ) same torque on the spindle, and also the chips to come out; it may be needed, after a certain depth, to retreat the drill at a much greater clearance in front of the part, so to have time to throw the chips ... decisions about what to do, where to change, etc, requires to inspect the Zand/orS axis load diagram

    Quote Originally Posted by Jim Dawson View Post
    On the other hand, it doesn't seem safe to leave the spindle running when changing parts, but I'll leave it to you to evaluate the conditions
    is needed to mess with the keylocks, so to be able to open the cabinet door at any time; i have done this, and it was ok, but i started to worry when someone else was working on the machine, so, i told that person to open the door only when blue light is on ( thus machine is in stop state ) / kindly

    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


  8. #8
    Member machinehop5's Avatar
    Join Date
    Aug 2009
    Location
    United States
    Posts
    1570
    Downloads
    5
    Uploads
    2

    Default Re: Need help to modify gcode so spindle does not turn off at the end of the cycle

    only 15 parts per Drill? Spindle Speed to fast and not enough Chip Load. You may be work hardening the material.

    What does the dull Drill look like? Burned up corners of drill is a dead give away of Spindle to fast.



  9. #9
    Member mactec54's Avatar
    Join Date
    Jan 2005
    Location
    USA
    Posts
    15362
    Downloads
    0
    Uploads
    0

    Default Re: Need help to modify gcode so spindle does not turn off at the end of the cycle

    Quote Originally Posted by rodjava View Post
    Thanks everybody who chimed in.
    The job was to drill a 9/32 through hole down the center of a 1/2-13 x 3/4 hex bolt which are M8 hardness.
    Since there are 500 pieces, I thought I could save wear and tear on the spindle motor by keeping it on for the 500 cycles.

    Turned out that auto spindle turn off and then a simple cycle start worked best.

    Things I learned from this job was a slow constant downward pressure worked 10x better than peck drilling.
    9/32 drill 900 rpm with flood coolant. Each cycle was only 60 seconds.
    I could get about 15 cycles from each new 9/32 bit before sharpening.

    Since I am only a home shop machinist, I never know how much to charge.
    I settled on $2.25 each piece.
    Sounds like your drill was not that great, if you do it again use a screw machine drill, jobbers are not very good for a job like this, Quality Drills most likely do the whole job with a drill like this and then some

    They are in CA

    North Bay Cutting Tools
    jonbrunetti@hotmail.com
    Ph 707-773-2240

    Attached Thumbnails Attached Thumbnails Need help to modify gcode so spindle does not turn off at the end of the cycle-9-32-drill-jpg  
    Mactec54


  10. #10
    Member
    Join Date
    May 2016
    Location
    United States
    Posts
    471
    Downloads
    0
    Uploads
    0

    Default Re: Need help to modify gcode so spindle does not turn off at the end of the cycle

    Quote Originally Posted by rodjava View Post
    Hi,

    Thank you all in advance.
    Rod in San Francisco

    (1001)
    (T144 D=0.3125 CR=0. TAPER=118DEG - ZMIN=-1.275 - DRILL)
    G90 G94 G91.1 G40 G49 G17
    G20
    G90
    (DRILL1)
    M5
    M9
    S2000 M3
    M8
    G0 X0. Y0.
    G43 Z1.4 H144
    Z1.
    G98 G73 X0. Y0. Z-1.375 R0.1275 Q0.1 F4.
    G80
    Z1.4
    G90
    M30
    Hi Rod,

    I know your job is done, but save this for next time.

    It pains me to see such, let's say, very dirty code. I'm thinking your Fusion CAM post processor still has a long way to go in needed tweaks. The following is a cleaned up version of your program. It will leave the spindle running in one version and off and on in another.

    First thing I see is you're waaaay too fast on the spindle and waaaaaaaaaay too slow on your feed. Remember if you ever find yourself with chips wrapping around your drill in a nest, nine times out of ten it means you're feeding too slow. You don't mention your control type so I'll assume Fanuc. My apologies if otherwise.

    I would also suggest a 135 deg split point Cobalt drill on a non-spotted hole in medium carbon alloy steel like you're doing. Even TIN coated if you could find it. Program assumes Z zero is top of bolt. Assuming material hardness at roughly 325 Brinell. I left G49 (cancel tool offset) out of your lead setup line as it can mess with how Z acts on some controls in a repeat situation like this. Careful at first run of this to be sure Z acts properly. Your reload work clearance height will be at two inches. (G43 Z2.) Adjust to your comfort level. (Z0.1 suggested minimum)

    O1001 (DRILL 9/32 THRU 1/2-13 X 3/4 GRD 8 BOLT)

    (CONSTANT SPINDLE VERSION)

    (T144 9/32 COBALT DRILL 135DEG)

    (TURN OFF BLOCK SKIP AFTER)
    (LAST PART TO END PROGRAM)

    G17 G20 G40 G54 G80 G90 G94 G98 -- (I didn't see a work offset so added G54 here. Also, what was G91.1? I left it out.)

    G0 X0. Y0.
    G43 Z2. H144 S750 M3
    M8
    G98 G83 Z-1.24 R0.1 Q0.475 F4.9 --- (If having favorable chip control, you can try G73 instead)
    G80
    M9
    G53Y0 (TABLE FORWARD AND RELOAD)
    G4P1500 ----(you got 1.5 sec to hit FEED HOLD. Adjust to suit. If you miss it just let it rerun till next round)
    /M30
    M99

    ************************************

    O1001 (DRILL 9/32 THRU 1/2-13 X 3/4 GRD 8 BOLT)

    (STOP/START SPINDLE VERSION)

    (T144 9/32 COBALT DRILL 135DEG)

    G17 G20 G40 G54 G80 G90 G94 G98

    G0 X0. Y0.
    G43 Z2. H144 S750 M3
    M8
    G98 G83 Z-1.24 R0.1 Q0.475 F4.9
    G80
    M9
    G53Y0
    M30

    Good luck with what I hope is a next time.



  11. #11
    eckitsch's Avatar
    Join Date
    Aug 2007
    Location
    Suhl
    Posts
    413
    Downloads
    0
    Uploads
    0

    Default

    Do you know system variable (#3003) for automatic operation control? You start the program in AUTOMATIC. From N10 Switch to Single Block. #3003 = 1 (HAAS) disable Single Block and the program goes through to #3003 = 0 (HAAS). This is where the function becomes active and the Program does stop.
    The program runs in an endless loop without spindle stop.
    Fanuc similar to HAAS.

    T144 M6
    S2000 M3
    G54
    N10
    #3003=1 (HAAS, disable Single Block)
    M8
    G0 X0 Y0
    G43 Z1.4 H144
    G73 X0. Y0. Z-1.375 R0.1275 Q0.1 F4.
    G80 M9
    G53 Z0
    G53 Y0
    #3003=0 (HAAS, enable Single Block)
    GOTO 10
    M30



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

Need help to modify gcode so spindle does not turn off at the end of the cycle

Need help to modify gcode so spindle does not turn off at the end of the cycle