584,846 active members*
4,447 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Visual Basic > VB code for G-Code Cycle time estimation
Results 1 to 5 of 5
  1. #1
    Join Date
    May 2008
    Posts
    157

    VB code for G-Code Cycle time estimation

    Has anyone done any code for estimating cycle time from a G-Code program ? I presume it will be reading every line of code, measuring the travel length and dividing that by commanded feedrate and adding it all together.

    Though the logic seems simple, it is pretty complex when it comes to measuring G02 / G03 moves. Just wondering whether someone out here has already done this stuff and the code can be utilized

  2. #2
    Join Date
    May 2016
    Posts
    4

    Re: VB code for G-Code Cycle time estimation

    I might be able to help with this. Can you paste a bit of your G-code? I'd like to see its formatting.

  3. #3
    Join Date
    May 2016
    Posts
    2

    Re: VB code for G-Code Cycle time estimation

    Hi yaji63, here 2 g-codes.

    Mach3 have that feature, i'm not sure how exact it is.


  4. #4
    Join Date
    May 2008
    Posts
    157

    Re: VB code for G-Code Cycle time estimation

    Quote Originally Posted by cwilkes View Post
    I might be able to help with this. Can you paste a bit of your G-code? I'd like to see its formatting.
    I use fanuc format programs. Not sure how big program you may need for sampling. Do let me know

    - - - Updated - - -

    Quote Originally Posted by Migcha View Post
    Hi yaji63, here 2 g-codes.

    Mach3 have that feature, i'm not sure how exact it is.
    This is something i want to do offline and not on the controller. Something like using VB or C# coding

  5. #5
    Join Date
    May 2016
    Posts
    4

    Re: VB code for G-Code Cycle time estimation

    Quote Originally Posted by yaji63 View Post
    I use fanuc format programs. Not sure how big program you may need for sampling. Do let me know
    Well, I've been writing a really basic standalone G-Code simulator using OpenGL in VB.NET, and I could pretty easily work some sort of run-time estimator into it and send it to you. Thing is, I was really only going to handle a few different G-codes in my simulator (for now), since my job mostly only really uses G00 thru G03 for movement and then of course setting the machine variables (G90/G91 and whatnot). If you sent me all the different commands you typically use, I can maybe whip something up.

    My purpose for this simulator was mostly just for testing of some G-code GENERATING apps I've been writing: small, standalone VB.NET applications which can be run from our Windows-based CNC controller out in the shop by any shop worker. They punch in some dimensions for some standard types of components we make, and out pops their G-Code. I wanted to test this generated code without having to take it to my machine every time, so I just started on a real basic sim (it's really rough still, but it worked for the testing I had to do). I've attached some screencaps: one shows one of my g-code generators (this one for a 3-piece rolled steel elbow) and the other is my simulator after simulating.

    I haven't used a FANUC machine for the better part of a decade, so maybe send me a link to a list of accurate FANUC G-codes with their descriptions and tell me which codes you want to be able to estimate, or type a list out yourself, or however you want to do it.

Similar Threads

  1. Look ahead (GI) adjusted machining time estimation
    By Paw1 in forum Uncategorised MetalWorking Machines
    Replies: 1
    Last Post: 07-04-2012, 05:13 PM
  2. M code for cycle time reset
    By makingchipsfly in forum Mori Seiki lathes
    Replies: 2
    Last Post: 05-15-2010, 02:58 AM
  3. run time estimation
    By rsm169 in forum NCPlot G-Code editor / backplotter
    Replies: 1
    Last Post: 08-04-2009, 04:12 PM
  4. time estimation
    By camtd in forum FeatureCAM CAD/CAM
    Replies: 3
    Last Post: 04-23-2009, 10:56 AM
  5. Run time estimation
    By barbter in forum NCPlot G-Code editor / backplotter
    Replies: 3
    Last Post: 08-04-2008, 04:54 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
  •