Machsupport Forum

Mach Discussion => Feature Requests => Topic started by: nik on March 07, 2012, 08:50:37 AM

Title: CV bad behaviour need improvement
Post by: nik on March 07, 2012, 08:50:37 AM
hello
finally I found a spindle with higher RPM and endmill which allow me to increase the feedrate
unfortunately I found several problems with CV mode when feedrate increased over 3m/min
in some situations it have terribly badly behavior where step motors will definitely loose position
Im using servo drive where sudden stop with lower speed is executed relatively well, the whole machine is shaking and vibrating badly where high elastic deformation occur in my construction but the machine continue and I can observe what is happening

so here is my configuration
maximum speed on X and Y axis - 15 m/min
acceleration - 0.4s to reach maximum speed
CV distance 1mm
CV angle 10 degrees

what I found is that CV angle in not as shown in CV notes

please see the attached file

on second and third image Gcode points are shown with circles, where the distance between each point is slightly lower than CV distance - 1mm
if no sudden stop occur then the rounding is obvious

after sudden stop is fixed I think rounding can be reduced significantly and keep high speed if more options are added:

if CV angle < 1 degrees then CV distance = 10mm
if CV angle < 2 degrees then CV distance = 5mm
if CV angle < 5 degrees then CV distance = 2mm
if CV angle < 10 degrees then CV distance = 1mm
if CV angle < 20 degrees then CV distance = 0.1mm
if CV angle > 45 degrees then CV off - exact stop or plasma mode
if not possible to keep same speed in next 10 or 50 lines then start deceleration early or exact stop on next point and then start over with CV or any similar algorithm

all numbers need to be entered manually for any specific machine and configuration


I guess even if you found a good ideas will take long time to fix it
is there any chance I can improve it myself? probably with custom brain or something else which can be done quickly than waiting for next release?
please advice
thanks
Title: Re: CV bad behaviour need improvement
Post by: nik on March 07, 2012, 03:36:19 PM
I was not able to edit my message again
I tried to generate G code with different tolerance(resolutiron)
but when lower resolution - low number of points used, then arcs with large radius are represented as lines, if they are longer than CV distance then they are executed with exact stop, where the machine is shaking even if the radius is so large, almost straight line
when higher resolution used then slightly better but still strange movement, therefore I we need to set different CV distance for different angles on next line

so here is the exact Gcode for the second image

X205.786 Y44.396
X205.583 Y43.434
X205.376 Y42.473
X205.165 Y41.513
X204.951 Y40.553
X204.732 Y39.595
X204.510 Y38.637
X204.284 Y37.680
X204.054 Y36.724
X203.821 Y35.769
X203.583 Y34.815
X203.342 Y33.862
X203.098 Y32.910
X202.849 Y31.959
X202.597 Y31.009
X202.577 Y30.941
X202.554 Y30.873
X202.527 Y30.805
X202.496 Y30.738
X202.462 Y30.671
X202.424 Y30.606
X202.382 Y30.542
X202.337 Y30.480
X202.288 Y30.420
X202.236 Y30.362
X202.181 Y30.307
X202.122 Y30.254
X202.062 Y30.205
X201.998 Y30.159
X201.933 Y30.116
X201.865 Y30.077
X201.796 Y30.041
X201.725 Y30.010
X201.653 Y29.982
X201.581 Y29.958
X201.508 Y29.938
X201.435 Y29.922
X201.362 Y29.909
X201.290 Y29.901
X201.218 Y29.895
X201.147 Y29.894
X18.983  

next Gcode is third image on top:

G0 X32.480 Y173.046
G1   Z0.000 F2000
G1 X187.651   F3000
X187.953 Y173.044
X188.255 Y173.039
X188.557 Y173.029
X188.860 Y173.016
X189.163 Y172.999
X189.466 Y172.977
X189.769 Y172.952
X190.071 Y172.924
X190.374 Y172.891
X190.677 Y172.854
X190.979 Y172.813

gcode third image bottom

X191.266 Y30.233
X190.966 Y30.189
X190.665 Y30.149
X190.365 Y30.112
X190.064 Y30.080
X189.763 Y30.051
X189.462 Y30.026
X189.161 Y30.005
X188.861 Y29.988
X188.560 Y29.975
X188.260 Y29.965
X187.960 Y29.960
X187.661 Y29.958
X32.480 Y29.958

here is G code similar to third image bottom but the last point is at the end of the curve:

X28.278 Y172.673
X28.577 Y172.725
X28.877 Y172.772
X29.177 Y172.816
X29.477 Y172.857
X29.778 Y172.893
X30.079 Y172.925
X30.379 Y172.954
X30.680 Y172.978
X30.981 Y172.999
X31.281 Y173.016
X31.581 Y173.029
X31.881 Y173.039
X32.181 Y173.044
X32.480 Y173.046
G0   Z10.000
Title: Re: CV bad behaviour need improvement
Post by: nik on March 12, 2012, 05:28:53 AM
anybody there?
Title: Re: CV bad behaviour need improvement
Post by: BR549 on March 12, 2012, 01:31:59 PM
CV is NOT going to fix your floppy machine. YOU have to do that part(;-) AS to LOST steps that is a simple point that the mootrs cannot go any faster or quicker in accel and they loose steps. May need to repower the machine with stronger motors/drives.

OR just slow things down within the boundaries of your machine capabilities.

There IS info here on the use of CV it was written by "Stirling" DO a search and read up on it.

Just a thought, (;-) TP
Title: Re: CV bad behaviour need improvement
Post by: nik on March 12, 2012, 04:05:43 PM
hi
as I mentioned ALREADY for that machine I use servo motors, not steppers
the motors are powerful enough to move the machine in opposite direction on higher speeds and accel
that problem occur when I use higher feeds - over 5m/min
I read all information about CV and I understand completely how it should work, but it is not, in the situations I mentioned above is not decelerating early as it should be, therefore I need to improve it, so I can use the full potential of my machine
mach3 do not drive properly in some situations, therefore I tried to explain the problem as clear as possible - what and when is going wrong, and I will be very happy if anybody well grounded in can help me to solve it
thanks
Title: Re: CV bad behaviour need improvement
Post by: nik on March 13, 2012, 07:36:05 AM
1 week no reply from customer support
very disappointing
I will look for another solution
thanks for the missing technical support
Title: Re: CV bad behaviour need improvement
Post by: BR549 on March 13, 2012, 01:01:05 PM
YOU have been given ALL the info available on CV. It is what it is. FOr most applications It works BEST if you don't try to outsmart it.
AND again it is not there to FIX your machine from being FLEXABLE (floppy) .

Thousands of users all over the world use it successfully every day so something must be right about it.

Just a thought, (;-) TP
Title: Re: CV bad behaviour need improvement
Post by: nik on March 13, 2012, 06:20:33 PM
all machines in the world are flexible, 1mm or 0.00000001mm they are always flexible
therefore mach3 should use ramps, slow accelerating and decelerating, ALWAYS, not only some time
CV is great, and most of the times works perfect, but some time it forget to decelerate, anyway.... if there is no technical support then I have to look for another solution to avoid these sudden stops
Title: Re: CV bad behaviour need improvement
Post by: BR549 on March 13, 2012, 07:28:42 PM
I would turn on CV and turn off all the extra settings, that puts it in native mode and it works 100% of the time.

Mach3 runs a bang bang tragectory (trapazoidal) it does NOT run an S curve. There are settings for accelleration of the motors as well as max velocity.

Perhaps you need to tune the motors DOWN a bit in accelleration to help avoid the sudden stops(;-) or plan your Gcode for a better use of the machine capabilities.

Just because a drive/motor combination can rattle the machine it doesn't mean you should.

Just a thought, (;-) TP
Title: Re: CV bad behaviour need improvement
Post by: nik on March 15, 2012, 06:31:07 AM
you are explaining like beginner to beginner, Im not sure about you but Im not, and Im not going to explain same thing again and again just because nobody is reading  :'(
the motors are tuned already, and they accelerate and decelerate properly , the machine run nice and smoothly
but as I already explained SEVERAL !!!!!!!!  times - some time mach3 DO NOT DECELERATE !!!!!!!!!!!!!!!!!! this is the only problem that do not allow me to use higher feed than 3m/min, because when mach3 STOP WITHOUT DECELERATION !!!!!!!!!!!! with 5 or 6 m/min the machine is shaking and this reduce the quality

it is definitely a bug in CV algorithm because it is happening in identical situations, but as you can see nobody care about that.... very sad
Title: Re: CV bad behaviour need improvement
Post by: nik on March 15, 2012, 08:19:54 AM
I agree that if you edit the G code manually after hundreds of tests you may avoid some bugs in the software, as I did once, but It is a waste of time to do it every time, I think the proper way is to fix the bugs, instead of trying to guess how to avoid them

considering that most of the G code is generated with software, and almost nobody write it manually anymore, CV is essential, and should be improved, specially when the G code is generated properly, and it IS possible to generate PROPER pulsing without SUDDEN STOPS
Title: Re: CV bad behaviour need improvement
Post by: nik on March 23, 2012, 07:04:07 AM
still nobody replied from technical support, what a shame
obviously I have to look for another solution
does anyone tried EMC2 for high speed milling? I just downloaded it and when Im free I will try it, but other experience will be useful, specially for higher feed, how is executing Gcode on corners and curves, I want to improve the quality and productivity, because the machine is capable to do much better, just need proper pulsing
thanks
Title: Re: CV bad behaviour need improvement
Post by: ger21 on March 23, 2012, 04:19:07 PM
The CV is not going to be fixed in the current version of Mach3.
The developers are currently working on Mach4, which should have much better CV.
Title: Re: CV bad behaviour need improvement
Post by: nik on March 23, 2012, 04:48:22 PM
that sounds as a little hope.... if this is going to be fixed it doesn't matter which version number is, thanks for the info
I asked early but let me ask again
I have a little programming skills
is there any chance I can modify or write my own CV algorithm, may be VB script?
I wasnt able to find all details needed in documentations
is it possible at all?
thanks
Title: Re: CV bad behaviour need improvement
Post by: ger21 on March 23, 2012, 05:28:34 PM
No, it's not possible.

One other thing you might want to try is to use the Tempest trajectory planner. It's experimental, and some things don't work when using it, but it can give much smoother motion.
There's a separate section of the forum for it here.
Title: Re: CV bad behaviour need improvement
Post by: nik on March 23, 2012, 07:10:37 PM
Yes I tried it but I keep receiving error message "An invalid argument was encountered"
I wasnt able to test it at all
and when I read the last post in the thread I just give up
also I noticed that all posts are very old therefore I posted here, if any new and working solution is available
Title: Re: CV bad behaviour need improvement
Post by: ger21 on March 23, 2012, 07:40:15 PM
Try running it with an older version of Mach3, like 3.42.020 or 3.42.040
Title: Re: CV bad behaviour need improvement
Post by: nik on March 23, 2012, 07:47:34 PM
I tried with 3.042.028
do you think that other may work?
Title: Re: CV bad behaviour need improvement
Post by: ger21 on March 23, 2012, 08:43:35 PM
I use it with 3.42.020.
Title: Re: CV bad behaviour need improvement
Post by: nik on March 24, 2012, 06:55:28 PM
same error message with 3.42.020
the last version of tempest I found is sept29, on page 6, I tried also to replace the parallel driver provided in same thread, still same problem

also I read a lots of posts here that mach4 is expected, some posts 2-3 years old, and I still cant find even alpha release for download
then I tried emc2 - extremely smooth movements even on highest feed rate, no matter of corners or arcs or number of points
no jitter, no shaking, no sudden stops while running G code or manual movement
mach3 do sudden stops while running G code and also on manual movement near to soft limits
anyway
thanks for your help
Title: Re: CV bad behaviour need improvement
Post by: tripleblack on April 04, 2012, 12:28:35 PM

so go use EMc then. or slow the feed down. use your machine within its limits.while i do not use a spindle, i cut with plasma at 6 meters per minute with no problems.
Title: Re: CV bad behaviour need improvement
Post by: nik on April 04, 2012, 05:28:16 PM
the reason for all headaches was to increase the feed, not to slow it down
my machine limits are 15m/min with acceleration time 0.2 sec
I guess that the problem on my PC become noticalbe a bit early bacause of different settings, more steps per unit, or something else, but soon or later that will become a problem when you wish to improve, it looks like the problem is with the motion algorithm when tryinh to calculate CV movements
unfortunately mach3 work smooth up to 3m/min, with increasing the feed is not so smooth anymore, in some situations do not decelerate, which is unacceptable, actually 3m/min is really good speed for all DIY, even too much for steppers
emc is a bit complicated to setup all features, but I used it for 4-5 days cutting and it looks like the movements are much better, same G code with the only change - feedrate. it is moving smooth up to 15m/min on straight lines only slowing down to 6-7m/min on short-lines-arcs, but still moving so smooth, with the current tool and spindle I can cut with maximum feed of 8.5m/min, and now I can use the full potential, for now I will stick with emc on my mill
so the problem with the mill is solved and Im very happy now, same G code is executed in a quater time than before, and same quality as mach3 on 3m/min
today I tried to run a lathe with mach3 turn, currently I struggle with M6, is not changing the tools, probably I have to read a bit more
Title: Re: CV bad behaviour need improvement
Post by: BR549 on April 04, 2012, 06:32:43 PM
Sounds to me yo have found the max speed that your machine can run smoothly.

IF MAch3 were NOT deaccelerating you more than likely would have tripped the servos due to servo error.

SO IF the servos can keep up then you are at the rigidity limit of the machine.  I would suggest you retune the servos for the conditions. The servos tune seperately from MACH3. You should be able to soften the servo tuning to help.

In the real world you tune the servos to the MACHINE capabilities.

(;-) TP

Title: Re: CV bad behaviour need improvement
Post by: nik on April 04, 2012, 10:55:13 PM
yes, when the feed is over 6 m/min a suddent stop in step pulses trip a servo error

I tuned the servos when I build the machine and when I wrote the controller software, so Im sure they are tuned properly, I know the machine capabilities from the day I designed it, I just never was able to use it with the full potential before
the PID is tuned to keep minimum folowing error, so when mach3 stops suddently, they try to stop suddently as well, that shakes the whole machine too much, therefore mach3 shuould never stop suddently, it should ALWAYS use ramps

allowing more folowing error is not the solution, the machine run smooth as the step pulses are smooth, if the step pulses are NOT smooth, then the problem is where they are generated, you can try to calculate the overshoot whrere the speed is 6m/min and the deceleration of 0.2 sec is missing, It will be about 8mm if the servo controller decelerate, insted of mach3, this is completely unacceptable for CNC machine,
I think it will be easy for you to understand if the motors are STEPPERS then there is nothing to tune, they will just loose steps if you dont send proper step pulses

therefore I decided to locate and solve the problem instead of looking for a way to work with it, the main job of the motion software is to generate pulses WITH ramps

reading your message again make me think for the difference between good product and bad product (machine/software), good product is working as it should be, and bad product is when you try to make it work with all unsolved problems in it, if you want to make a good product, then you should solve the problems, instead of trying to go round
Title: Re: CV bad behaviour need improvement
Post by: nik on April 04, 2012, 11:22:05 PM
therefore I tried to report the problem and suggested an improvement, but as GER21 explained early - mach3 will not be fixed, we have to wait for mach4, but I will try it when is available for download and when I can use it with my current license, until then I will stick to emc even if I dont like linux and linux dont like me
Title: Re: CV bad behaviour need improvement
Post by: Hood on April 05, 2012, 04:04:34 AM
TXXYY where XX is the tool number and YY is the offset number, example T0101 or T2525.
Hood
Title: Re: CV bad behaviour need improvement
Post by: nik on April 05, 2012, 04:17:14 AM
yeah I found it few hours ago, last time I used tool changing on lathe was 15 years ago, completely forgot that it should be 4 digits
but thanks
Title: Re: CV bad behaviour need improvement
Post by: Hood on April 05, 2012, 04:56:19 AM
BTW no need to also use the M6, you can if you wish but Mach doesnt care either way in Turn.
Hood
Title: Re: CV bad behaviour need improvement
Post by: BR549 on April 05, 2012, 11:14:09 AM
So you are saying that at a certain point MACH3 just STOPS following the axis tuning as far as Vel /Accel ??? I don't think so(;-) IF it did you could not make a part as the axis would be lost in 2d space.

You can MAKE the servo tuning TOO tight and get what you are describing. You can also tune Mach3 with too much accel for the velocity and get what you are describing.

Mach3 uses a bang bang planner (trapazoidal ramps)  Get the Accelleration too high and it is like running into a wall to stop. (;-)

It is still ramping but the ramp form is almost vertical which can easliy SHAKE the machine. CV can ONLY do so much to correct it. Most times it is as simple as rewriting the Gcode Micro segmented code is bad for smooth operation and the faster you go the longer the bad segments can be.

Been there done that , (;-) TP





Title: Re: CV bad behaviour need improvement
Post by: nik on April 05, 2012, 12:53:30 PM
instead of guessing better read more carefully what I explained MANY MANY times
as I mentioned ALREADY mach3 was set up to 15m/min with acceleration 0.4 sec. which is smooth most of the time and still doing sudden stops at certain point
therefore must be fixed, if you set up a ramp with 0.4 sec accel and 0.4 deceleration it should use that ramp for EVERY EVERY EVERY move, no mater jogging, CV or exact stop, if you dont believe me that it stops suddenly at certain points, Im not here to make you believe, Im here to report it, if somebody care and want to fix it, it is useful information which is hard to notice, but it is ESSENTIAL for proper and fast movements

also I mentioned already that it stops suddenly when you are jogging on 100% near to software limits, the servo controllers can handle it, it is shaking but not loosing position, last night I tested  jogging near software limits on stepper motors, it is horrible, it is loosing position instantly, so I switched off the software limits
Title: Re: CV bad behaviour need improvement
Post by: skunkworks on April 11, 2012, 02:27:56 PM
Don't forget to play with G64 Px.********* Qx.*********xx with linuxcnc.   It allows you to set path following tollerance to increase speed.

http://linuxcnc.org/docs/2.5/html/gcode/gcode.html#_g64_path_blending_a_id_sec_g64_path_blending_a

Make sure you are updated to the latest release of linuxcnc also (2.5 was just released)

There are a few threads similar to this where mach doesn't seem to obey machine accel/velocity constraints.  Linuxcnc doesn't have as large a 'look ahead' as mach but it does pretty well.

sam


the reason for all headaches was to increase the feed, not to slow it down
my machine limits are 15m/min with acceleration time 0.2 sec
I guess that the problem on my PC become noticalbe a bit early bacause of different settings, more steps per unit, or something else, but soon or later that will become a problem when you wish to improve, it looks like the problem is with the motion algorithm when tryinh to calculate CV movements
unfortunately mach3 work smooth up to 3m/min, with increasing the feed is not so smooth anymore, in some situations do not decelerate, which is unacceptable, actually 3m/min is really good speed for all DIY, even too much for steppers
emc is a bit complicated to setup all features, but I used it for 4-5 days cutting and it looks like the movements are much better, same G code with the only change - feedrate. it is moving smooth up to 15m/min on straight lines only slowing down to 6-7m/min on short-lines-arcs, but still moving so smooth, with the current tool and spindle I can cut with maximum feed of 8.5m/min, and now I can use the full potential, for now I will stick with emc on my mill
so the problem with the mill is solved and Im very happy now, same G code is executed in a quater time than before, and same quality as mach3 on 3m/min
today I tried to run a lathe with mach3 turn, currently I struggle with M6, is not changing the tools, probably I have to read a bit more
Title: Re: CV bad behaviour need improvement
Post by: nik on May 11, 2012, 02:57:11 PM
emc2 work even without tolerances much faster and much smoother (G64 only)