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?
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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
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 ?
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
Hi Georg.
Thank you so much !
Your advice is really helpful for me.
I appreciate your great help.