586,069 active members*
3,454 visitors online*
Register for free
Login
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2012
    Posts
    189

    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
    -Jon

  2. #2
    Join Date
    May 2008
    Posts
    667

    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 counter.PNG  

Similar Threads

  1. VMC 20 program looping
    By adaprecision in forum Fadal
    Replies: 1
    Last Post: 12-13-2016, 09:14 PM
  2. Looping a program on a OSP5020 Lathe
    By hoganj in forum Okuma
    Replies: 6
    Last Post: 05-18-2013, 05:09 PM
  3. Replies: 4
    Last Post: 03-06-2013, 07:56 PM
  4. Looping Program
    By libbey in forum Okuma
    Replies: 9
    Last Post: 08-06-2012, 06:04 PM
  5. Program Looping
    By Bohemund in forum CamSoft Products
    Replies: 7
    Last Post: 05-26-2007, 05:08 PM

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
  •