Need Help! Looking for a macro to get a cycle time average across a full day's operation


Results 1 to 4 of 4

Thread: Looking for a macro to get a cycle time average across a full day's operation

  1. #1
    Registered helbonikster's Avatar
    Join Date
    Aug 2016
    Location
    naugatuck
    Posts
    6
    Downloads
    0
    Uploads
    0

    Default Looking for a macro to get a cycle time average across a full day's operation

    Hi,
    I am trying to write a macro that will record the exact time that the cycle start button is pressed, each time it is pressed, record the difference into a variable, and average the button-to-button time into another variable.

    for example, if I push the cycle start button at 3:06:52, then after loading a new part, push it again at 3:10:56, I want it to subtract most recent button push from previous button push, and I want that 4 minutes and 4 seconds to go into a variable, which will then be averaged with all of the other button-to-button pushes of the day, which would be stored in a new variable.

    Hopefully this makes sense to people. Feel free to ask for clarification if this is unclear. For reference, I'm trying to do this on a Fanuc OI-MD control.

    Bonus points if you can put an IF statement in to ignore button pushes that occur within less than the cycle time (if the operator immediately reset, then started again for some reason)

    Thanks

    Similar Threads:


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

    Default Re: Looking for a macro to get a cycle time average across a full day's operation

    hi helbonikster / switch to okuma-osp and ask again

    I am trying to write a macro that will record the exact time that the cycle start button is pressed
    if you wish to write code, then you won't be able to record the moment of the "button-press event", but the moment when the buffer reaches a time system variable or a time counter

    for exact data, you may need a buffer prohibit code, but in most cases a system variable delivers buff prohibit behaviour

    ... so dig for a time system variable for your controller; and build the code arround it ( common variables and writing/reading from a file will help )

    ... or try recording data from the plc

    Bonus points if you can put an IF statement in to ignore button pushes that occur within less than the cycle time (if the operator immediately reset, then started again for some reason)
    i can do this, on okuma, but in a different manner; things can be pushed even further than what you described in this thread, helping someone to see the bigger picture, for more then a single machine

    from some kind of perspective, deviation and stability are one and the same thing : once you have enough data, you may calculate the "statistical corelation coeficient" which is lower for a less trained person or a less organized shop ( more downtime, etc ), and if things are not handled well, it may lead to demoralization of a skilled employee; also, with patience & well spent $$$, nice things can be achieved

    statistics inside a shop is a sword with 2 edges scoring high numbers means a well organized shop, while wrong data colecting and wrong interpretations may lead to time waste and demoralization : everyone is under the same roof

    in the end, after you will do such kind of stuff, is easier to see that all you need is love / 99.8%? 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 ...


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

    Default Re: Looking for a macro to get a cycle time average across a full day's operation

    one more thing : getting the average cycle time may not be a reference, because sometimes unitar production may vary a lot, thus how_many_parts/1_hour may be subject to deviations caused by different things

    sometimes i inspect when each operation starts&finishes, thus i can create an operation frequency chart for 1-2 days, 1-2 months, etc ...

    of course, main goal is to achieve minimal cycle time deviations, with minimal downtime and minimal total time : there is a thin line that may lead to problems if it is passed, because going faster on a stable setup may come with more downtime, caused by more tool changes or more offset changes / 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 ...


  4. #4
    Registered helbonikster's Avatar
    Join Date
    Aug 2016
    Location
    naugatuck
    Posts
    6
    Downloads
    0
    Uploads
    0

    Default Re: Looking for a macro to get a cycle time average across a full day's operation

    Really just want to know the average cycle time across a full day, which would take breaks/lunch etc into account. not looking to drastically change my program, more just want to have a more accurate idea to send to my corporate overlords lol



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

    Default Re: Looking for a macro to get a cycle time average across a full day's operation

    yup, the lords, i know depending on control capabilites, you may take into consideration also shift changes, 24/7, time spent during an M0, offsets changes, etc

    you need a time system variable for your controller, or a time counter & i don't have experience with fanuc; try asking your near-by dealer about this ?! repost your question inside the fanuc forum : https://www.cnczone.com/forums/fanuc/

    check this :
    ... https://www.cnczone.com/forums/fanuc/351442-cnc.html
    ... https://www.cnczone.com/forums/fanuc...nderstand.html
    ... https://www.cnczone.com/forums/fanuc...-fanuc-oi.html

    pls consider that there are guys&girls that gather data from the plc, so to create charts about production / idle times for machines : roman.korzus@machine.report, https://machine.report

    good luck helbonikster / see you arround, etc

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


  6. #6
    *Registered User* Sythe179's Avatar
    Join Date
    Sep 2018
    Posts
    10
    Downloads
    0
    Uploads
    0

    Default Re: Looking for a macro to get a cycle time average across a full day's operation

    Why not copy the time variable at the start of the program to #550 or any unused variable, and have another program that reads current time, that variable and the part counter to give you an estimated daily count.



  7. #7
    Registered helbonikster's Avatar
    Join Date
    Aug 2016
    Location
    naugatuck
    Posts
    6
    Downloads
    0
    Uploads
    0

    Default Re: Looking for a macro to get a cycle time average across a full day's operation

    Why not copy the time variable at the start of the program to #550 or any unused variable, and have another program that reads current time, that variable and the part counter to give you an estimated daily count.
    I can't find the parameter number for that on a Fanuc OI-MD control. Do you know?



  8. #8
    kanecharles's Avatar
    Join Date
    Mar 2024
    Posts
    1
    Downloads
    0
    Uploads
    0

    Default Re: Looking for a macro to get a cycle time average across a full day's operation

    Wow, this project sounds quite interesting and challenging! It will definitely take a bit of logic and programming time calculator skills to handle this request. Good luck with writing macros!



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

Looking for a macro to get a cycle time average across a full day's operation

Looking for a macro to get a cycle time average across a full day's operation