587,517 active members*
3,086 visitors online*
Register for free
Login
Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2009
    Posts
    7

    Parts per hour subroutine (HAAS)

    Here is a little subroutine I created today to give live feedback to an operator. Did a pretty good job of improving throughput. Calculates a moving average of the last ten runs. Written for a Super Mini Mill.

    I heavily comment my stuff to make it easy to understand for our non CNC machinists.

    Code:
    %
    O40002 (Parts per hour running average)
    (Subroutine calcs the number of parts )
    (that are being produced per hour )
    (This is calculated based on the time taken )
    (between calls stored in a)
    (10 position ring buffer.)
    (** Required Arguments **)
    ("D" count of parts per run)
    (** Macro vars used **)
    (670-679 used for ring buffer)
    (681 Current position in buffer)
    (682 Calculated parts per hour )
    (3001 is th HAAS millisec timer)
    
    (Checks to see if buffer position needs to)
    (return to zero.)
    IF[#681 GT 9] THEN #681 = 0
    #[670 + #681] = #3001 (Store timer value)
    #681 = #681 + 1 (Increment buffer position)
    #3001 = 0 (Reset timer)
    
    #1 = 0 (Loop counter)
    #2 = #681 (Ring buffer average starting point)
    WHILE[#1 LT 10]DO1
    #3=#3 + #[670 + [#2 MOD 10]]
    #2 = #2 + 1
    #1 = #1 + 1
    END1
    
    #4 = #3/10 (Divide by buffer size for average)
    #4 = #4/1000 (Convert from milsec)
    #4 = #4/#7 (Divide by number of parts/run)
    #682 = 3600 / #4 (Store number of parts per hour)
    
    M99
    
    %

  2. #2
    Join Date
    May 2004
    Posts
    4519
    Cool. I did something similar, but much more detail years ago for a Fagor 8055 control that would output to a daily file the end of each cycle, the program number completed.

  3. #3
    Join Date
    Oct 2009
    Posts
    7
    I will be doing a bit more once I have a data logger rigged to the serial out. The idiot machine is networked but does not allow me to write to its network share.

  4. #4
    Join Date
    Aug 2011
    Posts
    2517
    I've been machining for many years and I worked out that the average time for a part is double the actual cycle time.
    So if a part takes 6 minutes of actual machine run time (theoretical 10 parts an hour if you had 0 minutes downtime) then you can do 5 parts an hour.
    the double-cycle-time average is very close to reality if averaged over an 8 or 10 hour day.
    reality means having to deal with everything else that's going on including loading parts, measuring parts, changing inserts and keeping track of tool wear, clearing swarf from parts and chucks before loading/unloading, cleaning up/general house keeping, general interruptions like running out of inserts because our storeman is a loser and chasing the workshop for some replacements, talking to one or more of the bosses about current job and upcoming jobs, eating, sh*ting etc.

    it could also vary if the person is just a button pusher and running only 1 machine and is dedicated. then he could probably manage 8 parts per hour on average based on a 6 minute cycle run time. non-dedicated people usually dont give a sh*t and probably do less than 5 parts an hour average and no amount of active timing will change that (at least not where I work)

  5. #5
    Join Date
    Oct 2009
    Posts
    7
    60 40 split during actual full rate production, but probably tracks pretty close to 50 50 with calibration routines and whatnot included.

Similar Threads

  1. Haas hour meters???
    By mniadna in forum Haas Mills
    Replies: 4
    Last Post: 03-26-2015, 02:35 PM
  2. Used Haas parts
    By JasonR in forum Haas Mills
    Replies: 0
    Last Post: 03-17-2010, 04:23 AM
  3. Hour meter on Haas VF cnc machines
    By imholta in forum Haas Mills
    Replies: 8
    Last Post: 01-27-2010, 07:21 AM
  4. HAAS TM-1P parts
    By ssrmr2 in forum Haas Mills
    Replies: 4
    Last Post: 05-28-2008, 11:52 AM
  5. haas parts?
    By markct in forum Haas Mills
    Replies: 5
    Last Post: 06-17-2007, 03:27 PM

Posting Permissions

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