Buffer Underflow Problems

Moderators: TomKerekes, dynomotion

Hullhorst
Posts: 6
Joined: Thu Apr 26, 2018 5:50 pm

Buffer Underflow Problems

Post by Hullhorst » Thu Apr 26, 2018 6:25 pm

Hi Tom,

If G code is 'heavy small' , on certain parts of models in produce there is no use if I increase the LookForwardTime. System go to Underflow . [ i.e. from 2.5 to 5 or even 10 sec ].
I am getting fast in a position to decrease the overall speed to 1500 mm/min even the CNC play well up to 5800 mm/min [ 55 inch/min respectively 228 inch/min ] . Based on USB 2.0, there is any setting in Windows [ services, priority so on ] or C [ timing factors, canceling process so on ] to increase the data transfer ? [ KMotion interface work without Graphic Plot and main processor run decent on 2.8 GHz ] - all task in background where stopped, Network interface is disabled, mouse is wired, kbd is wired - just in case you may ask -> all but Kmotion is stopped in Windows services / USB cable is 1m long, screened and protected with Ferrite rings on both ends].

I am not in a crisis , I do operate same manner since first Kflop board [ and this one is the third with his third CNC ] , I am willing to cooperate to test even odd solutions.
I type now because last clients demands went a zone where G code will be even double or triple as size. Somehow I want to keep my timing under control.
[ to have a example, I may add a sample from a program that is now on run and a sample from one I want to run , accuracy go to 0.003 '' ( 0.08 mm ) ]

Sorry to bother, Thank you,
Vio

User avatar
TomKerekes
Posts: 2540
Joined: Mon Dec 04, 2017 1:49 am

Re: Buffer Underflow Problems

Post by TomKerekes » Fri Apr 27, 2018 1:51 am

Hi Vio,

A couple of things to check:

Too Small of a Facet Angle in the Trajectory Planner Settings can cause excessive segments to be sent and buffered. What is your setting? Try setting to 2 degrees or larger.

You might check your USB rate for your Computer. There is a USB Test in the SimpleFormsCS.exe example. Push the Test USB. My (fairly fast i7) computer shows:

PC->KFLOP N=100000 Int32, Time=2.276 sec, 390KBytes/sec
KFLOP->PC N=100000 Int32, Time=2.047 sec, 433KBytes/sec

If you post some GCode and your settings we can look into it further.

Regards
Regards,

Tom Kerekes
Dynomotion, Inc.

Hullhorst
Posts: 6
Joined: Thu Apr 26, 2018 5:50 pm

Re: Buffer Underflow Problems

Post by Hullhorst » Tue May 01, 2018 6:05 pm

Hi Tom,

Your advice is appreciated.
I check-it-up by small steps, until my models surface was smooth applying effect from : (G code generator + Facet Angle ), therefore I arrived to 0.3 deg.
Below that value was small or no significant change in surface [ I check all surfaces with magnifying glasses and I check again after manual finish is apply ].
Today I run the model with 2 deg Facet angle. ( Beginning of the program was Facet Angle : 0.3, speed stack somewhere 435 mm/min ]
To be done :
How do I send a sample from my program ?
To be checked :
USB Test.

Sincerely,

Vio

User avatar
TomKerekes
Posts: 2540
Joined: Mon Dec 04, 2017 1:49 am

Re: Buffer Underflow Problems

Post by TomKerekes » Tue May 01, 2018 6:17 pm

Hi Vio,

To attach files use the "Attachments" Tab below the Reply box. Then select "Add Files".

Also include what Version you are running and what type of system this is?

Regards
Regards,

Tom Kerekes
Dynomotion, Inc.

Hullhorst
Posts: 6
Joined: Thu Apr 26, 2018 5:50 pm

Re: Buffer Underflow Problems

Post by Hullhorst » Fri May 04, 2018 3:20 pm

Hello Tom,

Sorry -> I was expecting a large .nc file [ 4Mb ] to be refused as attach. This is why I asked for an uploaded method.
My usual .nc files stay from 2 to 16 Mb.
As I say before, I operate the program - after 75% of his volume, on 2 deg adjustment.
Compared surfaces - identical surfaces both as model, angle and direction of mill travel - show differences in accuracy.
Speed, however , in the '2 deg' adjustment was possible up to 1250 mm/min [ rough 3 times faster ].

To be done :

speed test on USB.
I will answer on questions and give several details on next post.


Thank you,

Vio

User avatar
TomKerekes
Posts: 2540
Joined: Mon Dec 04, 2017 1:49 am

Re: Buffer Underflow Problems

Post by TomKerekes » Fri May 04, 2018 7:02 pm

Something else you might try is Coordinated Motion Smoothing. What is yours set at in your Init C Program? You might experiment with different values? Larger values should provide more smoothness but slight corner rounding. The following code will set the smoothing Tau value to 1 millisecond:

Code: Select all

#include "KMotionDef.h"
main()
{
	double Tau = 0.001; // seconds for Low Pass Filter Time Constant
	KLP = exp(-TIMEBASE/Tau);
	printf("Tau=%f KLP=%f\n",Tau,KLP);
}

Here is an example plot of motion through a ~25mm radius, at ~8000mm/min, 0.5 degree facet angles, with and without smoothing:
Image
Image

This is described here.
Regards,

Tom Kerekes
Dynomotion, Inc.

Hullhorst
Posts: 6
Joined: Thu Apr 26, 2018 5:50 pm

Re: Buffer Underflow Problems

Post by Hullhorst » Mon May 07, 2018 9:53 am

Hi Tom,

For practical reasons I must take all information and check-them step-by-step.
USB test : File mentioned -> SimpleformsCS.exe start.
Error on run.
Error signature :

EventType : clr20r3 P1 : simpleformscs.exe P2 : 1.0.0.0
P3 : 534a05e2 P4 : kmotion_dotnet P5 : 1.0.1.0 P6 : 531ca6f7
P7 : 3b P8 : e1 P9 : kmotion_dotnet.dmexception
Test done with Error.
System details.

PC : Dell Optiplex Proc ; Pentium E5800 RAM : 2Gb , Video : Intel G41
OS : Win XP SP2 - licensed
Kmotion 4.32 -> for some reasons 4.33 work bad with sudden stops and I took a step back ( is not your fault, I just did not took time to fix :) )
Trajectory adjustment :
Break angle : 85, Corner 5 E-7 , Colinear 5 E-7 , Facet : 1.5 ->

Next reply will contain more data upon the tests.

Thank you for your deep sharing,

Vio

User avatar
TomKerekes
Posts: 2540
Joined: Mon Dec 04, 2017 1:49 am

Re: Buffer Underflow Problems

Post by TomKerekes » Mon May 07, 2018 5:01 pm

Hi Vio,

Please use our latest Test Version if possible. Links are here.
USB test : File mentioned -> SimpleformsCS.exe start.
Error on run.
The SimpleFormsCS.exe uses .NET 4.5 and will not run on Windows XP.
Break angle : 85, Corner 5 E-7 , Colinear 5 E-7 , Facet : 1.5 ->
Those tolerances are very small (13nm!). Please use something more reasonable like 5e-4.

Regards
Regards,

Tom Kerekes
Dynomotion, Inc.

Hullhorst
Posts: 6
Joined: Thu Apr 26, 2018 5:50 pm

Re: Buffer Underflow Problems

Post by Hullhorst » Tue May 08, 2018 4:35 pm

Hello Tom,

I made adjustment upon Colinear and Corner Tolerance as suggested.

Tau factor, however, is not implemented in my system.
Regarding link and descriptions : I feel out-dated :)

Next days I will focus on my main revenue paid-job->automation.
Therefore I will refresh the info after next tests .

Please consider : maybe some users can accept online debug/filters adjustments/calibrations from your side, as paid services.
A TeamViewer session is easy to implement and 50 $ or more/hour with 50% payed in advance will keep people more focused on CNC-s job.
At least C problems or Step response will be no more an unsolved issue. [ I think ]

Thank you,

Vio

Hullhorst
Posts: 6
Joined: Thu Apr 26, 2018 5:50 pm

Re: Buffer Underflow Problems

Post by Hullhorst » Tue Jun 26, 2018 9:36 am

Hello Tom,

Lat week, 4 days , I had an extensive test with 3 different 3D models from 150 sq inch to 5 sq inch surface.
All test performed with 3500-4000 mm/min and various Colinear and Corner Tolerance not bigger than 2-10e-3 and not smaller than 5- 10e-4.
So far USB comm went smooth , therefore I presume I will keep adjustments in this area. ( mills from 4 to 0.5 mm diam )
Regarding implementation of Tau, was not done yet. I keep in mind that is will give even more play-ground for the USB speed and smoother corners.

I had another error trying to use test speed but I don't have in handy the error file, maybe I will explain that later on.
( like explained below, I don't feel Panic now :D )

There is a lot to learn in order to achieve a deep nice use of this product and I am glad this way. I will go forward and implement some planning for this learn.
Thank you for your previous detailed answers.
I am considering : Emergency of this subject is level 1/5 for me.

Thank you again, best wishes Tom.

Vio

Post Reply