looping program for lathe with bar puller

Results 1 to 2 of 2

Thread: looping program for lathe with bar puller

  1. #1
    Member maker of things's Avatar
    Join Date
    Mar 2012
    Location
    United States
    Posts
    189
    Downloads
    0
    Uploads
    0

    Default looping program for lathe with bar puller

    OK I tried a few different avenues and am having trouble getting the right code, or at least written correctly maybe. I got the program to behave properly using repeat. Downside for me is no piece counter for me to know how far along in the program I am. I determined that I can get 85 widgets out of the chunk of stock with enough material left for the collet to hold + safety margin.
    I got it to run using this code with the idea of using the B m99 counter as my current run counter. The problem I encountered with it is the counter does not increment every time. For 37 pieces the counter went up 16. This leads me to believe I have coded it incorrectly but am stuck figuring out why.

    (OD Turn G-code generated: Mon Apr 27 10:39:35 2020 <v2>)
    (PathPilot Version: 2.4.3)
    (Description = od)
    (Material = Aluminum : -any-)

    (Units = G20 inches)
    (Work Offset = G54)

    (CSS Max. Spindle RPM = 2500)
    (Tool Number = 1)
    (Tool Description = wnmg dorian jetstream)
    (Tool Type = rtp_turn)
    (Tool Orientation = 2)
    (Tool Radius = 0.0160)

    (Rough CSS = 250 feet/minute)
    (Rough Feed inches/revolution = 0.0050)
    (Rough Depth of Cut = 0.0030)

    (Finish CSS = 250 feet/minute)
    (Finish Feed inches/revolution = 0.0050)
    (Finish Depth of Cut = 0.0020)

    (Initial Diameter = 1.0000)
    (Final Diameter = 0.9950)
    (Z Start Location = 0.0000)
    (Z End Location = -0.1000)
    (Fillet Radius = 0.0000)
    (Tool Clearance = 0.0050)
    (Tool on X+ side)


    m98 p500



    o500
    (----- Start of G-code -----)
    (<cv1>)

    G7 (Dia. Mode)
    G18 (XZ Plane)
    G90 (Absolute Distance Mode)
    G40 (Turn Cutter Compensation Off)
    G20 (units in inches)
    G54 (Work Offset)

    ((((((actual program removed for brevity))))))

    g30
    (End ExternalCode)

    o600 if [#5653 lt 85]
    m99
    o600 endif
    m30

    Similar Threads:
    -Jon
    instagram @hermit.shed


  2. #2
    Banned
    Join Date
    May 2008
    Location
    Canada
    Posts
    667
    Downloads
    0
    Uploads
    0

    Default Re: looping program for lathe with bar puller

    The only way I could have a part counter to work on the lathe is by using a digital counter plugged to the USB relay board.

    I already use the USB relay board for the collet closer.

    I just use one of the relays to send a pulse to the counter. I know this is not what you really want to do but it works for me.

    Jeff

    Attached Thumbnails Attached Thumbnails looping program for lathe with bar puller-counter-png  


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

looping program for lathe with bar puller

looping program for lathe with bar puller