Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

CNC / G01 Speed is very slow (or go-stop motion) in Continuous short segment .

k2saki
2024-04-29
2024-05-01
  • k2saki - 2024-04-29

    I'm using CAD/CAM that outputs GCode with G01 many short segments from NURBS Curve, only X-Y axis.

    But CODESYS CNC motion seems much slower ( or stop-go motion ) in simulation mode than F-Value (I checked value from SMC_Interpolator - dVel ).
    In GCode G01, F value is F500, but movement is very slow, actual speed (dVel) is between 0 to 30 back and forth.

    I think very old CNC can move like that, but nowadays, a lot of CNC can move smoothly to process free curve ( somethimes option switch )

    I tried to use G51 Dxx but I got the same result.

    My questions are

    1) How do I improve CODESYS CNC motion in this case ?
    2) How can I graph the sampling from dVel of SMC_Interpolate in CODESYS?

    From my GCode


    N2006 G01 X1.4364 Y-14.6847 F500
    N2007 G01 X1.6759 Y-14.6768
    N2008 G01 X1.9152 Y-14.6486
    N2009 G01 X2.1547 Y-14.6400
    N2010 G01 X2.3943 Y-14.6090
    N2011 G01 X2.6336 Y-14.6002
    N2012 G01 X2.8732 Y-14.5716
    N2013 G01 X3.1127 Y-14.5634
    N2014 G01 X3.3520 Y-14.5410
    N2015 G01 X3.5915 Y-14.5336
    N2016 G01 X3.8308 Y-14.5307
    ...

    Thansk.

     

    Last edit: k2saki 2024-04-29
  • gseidel - 2024-04-30

    Hi k2saki,

    I would recommend to have a look at SMC_SmoothMerge, followed by SMC_SmoothPath.

    SmoothMerge will combine the small G1 elements to longer splines, SmoothPath will avoid stops between the splines.

    https://content.helpme-codesys.com/en/libs/SM3_CNC/Current/SM_CNC_POUs/SoftMotion-CNC/SoftMotion-Function-Blocks/SMC_SmoothMerge.html

    For SmoothMerge to work, you have to configure a tolerance, i.e. by how much it may deviate from the lines.

    To graph the output of the interpolator, you can use the trace. (Add a trace object below the application, and add the variables you are interested in to the trace.)

    Best regards,

    Georg

     
    • k2saki - 2024-04-30

      Hi, gseidel.
      Thank you so much for your advice.

      I have created a program to preprocess G-code as follows

      1.SMC_ReadNCFile2
      2.SMC_Interpreter
      3.SMC_CheckVelocities
      Then I put SMC_OUT_QUEUE in SMC_Interpolator.

      Where should I insert SMC_SmoothMerge and SMC_SmoothPath?
      Or are there any example link for it ?

       
  • gseidel - 2024-04-30

    Hi k2saki,

    1.SMC_ReadNCFile2
    2.SMC_Interpreter
    3.SMC_SmoothMerge
    4.SMC_SmoothPath
    5.SMC_CheckVelocities

    I attached a simple example project.

    Best regards,

    Georg

     
    • k2saki - 2024-05-01

      Hi Georg.
      Thank you so much !
      Your advice is really helpful for me.

      I appreciate your great help.

       

Log in to post a comment.