Need Help! G116 Sub that will output tool cutting times


Results 1 to 7 of 7

Thread: G116 Sub that will output tool cutting times

  1. #1
    Registered
    Join Date
    Nov 2014
    Location
    United States
    Posts
    18
    Downloads
    0
    Uploads
    0

    Default G116 Sub that will output tool cutting times

    Hi guys,

    I'm working on a Okuma Genos MB460 VE mill with an OSP 200M controller and I'm trying to output a text file for purposes of cycle time improvements that displays the cut times for each tool and then the total cycle time for all of the tools combined. My program runs with tool 25 starting and ending with tool 32, tool order is a bit mixed as you can see. I'm using a G116 sub instead of the regular M6 but can't figure how to get the total time at the end of the file and not after each tool and then to keep adding to the file as each new cycle starts. My code is shown below.

    OG116 (USE FOR M6)
    ( SET GCODE PARAM. G116 TO OG116 )
    ( AT TOOL CHANGE KEY IN G116 T= TOOL NO. Q = NEXT TOOL EX. G116 T1 Q2)


    IF [ VTLCN EQ PT ]NST1 (ACTIVE TOOL)
    IF [ VTLNN EQ PT ]NRT1 (NEXT TOOL)
    IF [VTLNN EQ 0]NOT1
    (OUTPUT TIMES TO CUT-TIMES.MIN ON MD1 DIRECTORY)
    M64


    NOT1
    FWRITC MD1:CUT-TIMES.MIN;A
    VC46 = VDTIM[1,1]
    PUT'START CYCLE '
    PUT VC46,10
    PUT' MIN'
    WRITE C
    PUT'TOOL ='
    PUT VTLCN,3
    M6 T=PT
    GOTO NST1




    NRT1
    FWRITC MD1:CUT-TIMES.MIN;A


    PUT'TOOL ='
    PUT VTLCN,3
    M6
    VC44=VDTIM[1,1] (TOOL REMOVED FROM SPINDLE TIME)
    VC45=[VC44-VC43]/60 (ACT TIME IN SPINDLE)
    PUT' - CUT TIME='
    PUT VC45,10
    PUT' MIN'
    WRITE C


    NST1
    IF [ PQ EQ EMPTY ]NEND (if ready tool empty/jump )
    IF [ VTLNN EQ PQ ]NEND (if next called tool is at next tool pos./jump)
    IF [ VTLNN EQ 0 ]NTT1 (if next tool has no value)
    M64 (next tool pot back up)
    NTT1
    T=PQ
    M356 (next pot down)
    NEND
    VC43=VDTIM[1,1] (TOOL PUT IN SPINDLE TIME)


    FWRITC MD1:CUT-TIMES.MIN;A
    PUT'ENDCYCLE '
    PUT VC45,10
    WRITE C
    VC47=VC46-VC45
    PUT'START TO STOP '
    PUT VC47,10
    WRITE C
    CLOSE C
    RTS


    This gives me an output like this, but what really want is the start cycle at the beginning of the tools and the end cycle and start to stop at the very end of the list (actually probably just need the total time at the end of the list and then have the next cycle start below it). Anyone doing this and have an example of how I might rearrange this code to get what I want to accomplish or have any suggestions of an easier way? Searched the forums and can get examples of standard G116 subs but not anything that includes cycle time output. Also it doesn't put my last tool on the list, it puts it in the beginning of the next file and has a huge time which includes the waiting between running the different cycles.

    TOOL = 25 - CUT TIME= 12.133333 MIN
    START CYCLE 81878704 MIN
    TOOL = 10ENDCYCLE 12.133333
    START TO STOP 81878692
    TOOL = 25 - CUT TIME= 0.4166667 MIN
    ENDCYCLE 0.4166667
    START TO STOP 81878704
    TOOL = 10 - CUT TIME= 0.4166667 MIN
    ENDCYCLE 0.4166667
    etc.

    I had it looking like this below but fooling around with it to get the end cycle time and start to stop messed up my format. I know it most likely has to do with where I put my ending time put statement but the book is ambiguous about how the file writing structure is determined.

    TOOL = 32 - CUT TIME= 76.65 MIN
    TOOL = 25 - CUT TIME= 0.4 MIN
    TOOL = 10 - CUT TIME= 0.4 MIN
    TOOL = 7 - CUT TIME= 0.2166667 MIN
    TOOL = 4 - CUT TIME= 0.5166667 MIN
    TOOL = 22 - CUT TIME= 0.4166667 MIN
    TOOL = 29 - CUT TIME= 0.4 MIN
    TOOL = 23 - CUT TIME= 0.4166667 MIN




    Thanks ,

    Tom

    Similar Threads:


  2. #2
    Registered
    Join Date
    Nov 2014
    Location
    United States
    Posts
    18
    Downloads
    0
    Uploads
    0

    Default Re: G116 Sub that will output tool cutting times

    Figured it out, added this code to the beginning of the main program

    (CAPTURE START TIME)
    VC41=[VDTIM[1,1]/60] (START OF CYCLE)
    VC43=VDTIM[1,1] (RESET TIME FOR TOOL IN SPINDLE)
    TIM1=VC46-VC41 (DOWN TIME BETWEEN CYCLES)
    FWRITC MD1:TIMES.MIN;A
    PUT'START CYCLE '
    PUT VC41,10
    PUT' MIN'
    WRITE C
    PUT'BETWEEN CYCLES='
    PUT TIM1,10
    WRITE C
    CLOSE C

    changed the G116 sub to this

    OG116 (USE FOR M6)
    ( SET GCODE PARAM. G116 TO OG116 )
    ( AT TOOL CHANGE KEY IN G116 T= TOOL NO. Q = NEXT TOOL EX. G116 T1 Q2)
    IF [ VTLCN EQ PT ]NST1 (ACTIVE TOOL)
    IF [ VTLNN EQ PT ]NRT1 (NEXT TOOL)
    IF [VTLNN EQ 0]NOT1
    (OUTPUT TIMES TO CUT-TIMES.MIN ON MD1 DIRECTORY)
    M64
    NOT1
    FWRITC MD1:CUT-TIMES.MIN;A
    PUT'TOOL ='
    PUT VTLCN,3
    M6 T=PT
    GOTO NST1

    NRT1
    FWRITC MD1:CUT-TIMES.MIN;A
    PUT'TOOL ='
    PUT VTLCN,3
    M6
    VC44=VDTIM[1,1] (TOOL REMOVED FROM SPINDLE TIME)
    VC45=[VC44-VC43]/60 (ACT TIME IN SPINDLE)

    PUT' - CUT TIME='
    PUT VC45,10
    PUT' MIN'
    WRITE C
    CLOSE C
    NST1
    IF [ PQ EQ EMPTY ]NEND (if ready tool empty/jump )
    IF [ VTLNN EQ PQ ]NEND (if next called tool is at next tool pos./jump)
    IF [ VTLNN EQ 0 ]NTT1 (if next tool has no value)
    M64 (next tool pot back up)
    NTT1
    T=PQ
    M356 (next pot down)
    NEND
    VC43=VDTIM[1,1] (TOOL PUT IN SPINDLE TIME)
    RTS

    And added this to the end of the main program

    VC42=[VDTIM[1,1]/60] (END OF CYCLE)
    VC46=VC42-VC41 (TOTAL CUT TIME)

    FWRITC MD1:TIMES.MIN;A
    PUT'END CYCLE= '
    PUT VC42,10
    PUT' MIN'
    WRITE C
    PUT'START TO STOP= '
    PUT VC46,10
    PUT' MIN'
    WRITE C
    PUT'****************'
    WRITE C
    CLOSE C



  3. #3
    Registered
    Join Date
    Feb 2008
    Location
    USA
    Posts
    16
    Downloads
    0
    Uploads
    0

    Default Re: G116 Sub that will output tool cutting times

    G116 Sub that will output tool cutting times-aaaa-jpg

    You could of used VTIME System Variable as well. Good Job with your Macro



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

    Default Re: G116 Sub that will output tool cutting times

    Quote Originally Posted by TommyCNCGuy View Post
    but what really want is the start cycle at the beginning of the tools and the end cycle and start to stop at the very end of the list
    hy Tommy, i also work on something like this

    please, can you share the output of your procedure .. and share why are you doing this ? like what is the idea behind ? 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 ...


  5. #5
    Registered
    Join Date
    Nov 2014
    Location
    United States
    Posts
    18
    Downloads
    0
    Uploads
    0

    Default Re: G116 Sub that will output tool cutting times

    Quote Originally Posted by deadlykitten View Post
    hy Tommy, i also work on something like this

    please, can you share the output of your procedure .. and share why are you doing this ? like what is the idea behind ? kindly !
    It ouputs something similar to this

    START CYCLE 913043.38 MIN
    BETWEEN CYCLES=-38.466667
    TOOL = 6 - CUT TIME= 0.0666667 MIN
    TOOL = 25 - CUT TIME= 3.3666667 MIN
    TOOL = 10 - CUT TIME= 2.2 MIN
    TOOL = 7 - CUT TIME= 0.6 MIN
    TOOL = 3 - CUT TIME= 0.6 MIN
    TOOL = 4 - CUT TIME= 2.2833333 MIN
    TOOL = 22 - CUT TIME= 1.3 MIN
    TOOL = 23 - CUT TIME= 1.3833333 MIN
    TOOL = 24 - CUT TIME= 3.1666667 MIN
    TOOL = 2 - CUT TIME= 3.85 MIN
    TOOL = 20 - CUT TIME= 1.8333333 MIN
    TOOL = 5 - CUT TIME= 1.0166667 MIN
    TOOL = 9 - CUT TIME= 0.45 MIN
    TOOL = 21 - CUT TIME= 1.4833333 MIN
    TOOL = 8 - CUT TIME= 1.8166667 MIN
    TOOL = 13 - CUT TIME= 0.25 MIN
    TOOL = 14 - CUT TIME= 0.6333333 MIN
    TOOL = 15 - CUT TIME= 0.5833333 MIN
    TOOL = 16 - CUT TIME= 0.6166667 MIN
    TOOL = 11 - CUT TIME= 0.5166667 MIN
    TOOL = 17 - CUT TIME= 0.7333333 MIN
    TOOL = 19 - CUT TIME= 0.4833333 MIN
    TOOL = 18 - CUT TIME= 0.8666667 MIN
    TOOL = 12 - CUT TIME= 0.8 MIN
    TOOL = 10 - CUT TIME= 2.1 MIN
    TOOL = 1 - CUT TIME= 0.8333333 MIN
    TOOL = 6 - CUT TIME= 2.4666667 MIN
    END CYCLE= 913079.78 MIN
    START TO STOP= 36.4 MIN

    I was using it to reduce tool cycle times and wanted to see individual tools, and how long they cut. I could then compare a new toolpath or feed and speed for a specific tool and see my results for each tool. With 50 machines running one part, 4 parts per machine, even a few seconds means something to the folks up front. I was able to reduce cycle times by a small amount which proved to be a huge increase in productivity.
    The only downside is that the actual code used to do this (what I had posted earlier) created more machine time. I had to do my improvements and then run the programs without this to get a decent cycle time. It turned out only being used for diagnostic purposes, but it worked well.



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

    Default Re: G116 Sub that will output tool cutting times

    hy TommyCNCGuy thank you 4 your answer

    I was using it to reduce tool cycle times and ... results for each tool
    don't you test all this inside a CAM ? so to virtual test trials, and after, send the best to the machine? just asking

    With 50 machines running one part, 4 parts per machine, even a few seconds means something to the folks up front.
    "1 part / 50 cnc" or "4 parts / 1 cnc" ? are those 50 identical ? or at least same OSP ?

    I was able to reduce cycle times by a small amount which proved to be a huge increase in productivity
    " reducing cycle time by a small amount " can not deliver " huge increase in productivity "

    only if you reffer to that :
    ... as you used a small amount of your potential; so subtle ! , or
    ... "cycle time" is short, thus a "small amount" means >5% ... but still ...

    actual code ... created more machine time. It turned out only being used for diagnostic purposes, but it worked well.
    If you wish, I can help you to drastically reduce system load, thus keeping it always active

    I will ring a bell when i will be ready with this 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 ...


  7. #7
    Registered
    Join Date
    Nov 2014
    Location
    United States
    Posts
    18
    Downloads
    0
    Uploads
    0

    Default Re: G116 Sub that will output tool cutting times

    I wish I could put it in a CAM system and analyze times, but not possible. It is old code that I am in a "continuous improvement" project on.

    All 50 machines are the same with the same OSP 200 control.

    If I reduce cycle time by like a minute (15 seconds per part), it's almost a couple hundred parts more a day, the folks up front like that.



  8. #8
    Member broby's Avatar
    Join Date
    Apr 2006
    Location
    Australia
    Posts
    822
    Downloads
    0
    Uploads
    0

    Default Re: G116 Sub that will output tool cutting times

    Quote Originally Posted by deadlykitten View Post


    " reducing cycle time by a small amount " can not deliver " huge increase in productivity "
    Wow, how short sighted of you Kitty, Obviously, if Tommy has 50 machines producing the same part, then he is making LOTS of parts.
    If he was to save cycle time like he wants, then of course he is going to make MORE parts in the same amount of time = EQUALS INCREASE IN PRODUCTIVITY!



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

    Default Re: G116 Sub that will output tool cutting times

    Quote Originally Posted by TommyCNCGuy View Post
    I wish I could put it in a CAM system and analyze times, but not possible. It is old code that I am in a "continuous improvement" project on
    hy TommyCNCGuy i am not sure, but i guess that your code is written by you, and not generated by CAM or IGF, thus it should be faster and optimized ... however, maybe there is a way to improve without CAM and without time trials from the cnc

    Quote Originally Posted by TommyCNCGuy View Post
    All 50 machines are the same with the same OSP 200 control
    nice one you don't mess your head with differences ...

    Quote Originally Posted by TommyCNCGuy View Post
    If I reduce cycle time by like a minute (15 seconds per part), it's almost a couple hundred parts more a day, the folks up front like that
    i think i get it : 1 cycle delivers 4 parts, and that cycles runs on 50 cnc's not sure, but whatever

    i done a bit of math, as you can see attached, so to play with / predict "theoretical" production

    however, this is only on paper, while in reality setup stability is an issue

    it will take a bit until i'll finish my tik-tok, but until than i could try to help you, because i like squeezing seconds out from parts on mass production, so if you wish, upload a part, and i will do my best kindly !

    Quote Originally Posted by broby View Post
    Wow, how short sighted of you Kitty, Obviously, if Tommy has 50 machines producing the same part, then he is making LOTS of parts.
    If he was to save cycle time like he wants, then of course he is going to make MORE parts in the same amount of time = EQUALS INCREASE IN PRODUCTIVITY!
    hy broby you know that engineers can do good stuff, but they can not explain what they do ?

    i don't regard this as from 50 cnc's x same cycle

    i don't improve global, but unitar, thus more parts / 1 single cnc ; repeating same setup on another cnc is not my concern i only try to make it fast and stable

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


  10. #10
    Registered
    Join Date
    Nov 2014
    Location
    United States
    Posts
    18
    Downloads
    0
    Uploads
    0

    Default Re: G116 Sub that will output tool cutting times

    Quote Originally Posted by deadlykitten View Post
    hy TommyCNCGuy i am not sure, but i guess that your code is written by you, and not generated by CAM or IGF, thus it should be faster and optimized ... however, maybe there is a way to improve without CAM and without time trials from the cnc
    It was previously written. I was examining and rewriting certain parts to achieve better cycle times with newer tools and grades, this post was about time trials which worked well


    i think i get it : 1 cycle delivers 4 parts, and that cycles runs on 50 cnc's not sure, but whatever
    Correct, 1 cycle runs 4 parts, and this set-up runs on 50 machines three shifts 7 days a week. This is just one part. We have 300 other CNC's running other parts.


    however, this is only on paper, while in reality setup stability is an issue

    it will take a bit until i'll finish my tik-tok, but until than i could try to help you, because i like squeezing seconds out from parts on mass production, so if you wish, upload a part, and i will do my best kindly !
    Set-up is the same and it is stable as possible. This post is over a year old, parts have been running well, but I appreciate the offer to help :-)


    hy broby you know that engineers can do good stuff, but they can not explain what they do ?
    I know this is directed at Broby, but I can pretty much explain everything I do. Sometimes I tend to get blank stares when my explanations exceed my allotted explanation time :-)



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

    Default Re: G116 Sub that will output tool cutting times

    i wish that here was such an army of cnc's ... we are in "the trend" from just 3 years / all the best Tommy

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


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

G116 Sub that will output tool cutting times

G116 Sub that will output tool cutting times