Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Andreas999 on September 03, 2007, 08:36:19 AM

Title: Constant velocity
Post by: Andreas999 on September 03, 2007, 08:36:19 AM
I am sorry I rewarm this subject, it has been discussed in other threads already, but I think this is still not implemented right.

After several trial and errors, I reduced my G-Code to a very simple example, a square with three rounded corners and a sharp one:
G0 G49 G40  G17 G80 G50 G90
G21 (mm)
G00 X30 Y0  (start)
G1 X70 Y0 F600  (straight line ..)
G3 X100 Y30 I0 J30 (.. goes smoothly into arc which ..)
G1 X100 Y100        ( .. goes smoothly into straight line)
G1 X30 Y100          (sharp corner 90 degrees to the left) 
G3 X0 Y70 I0 J-30   
G1 X0 Y30
G3 X30 Y0 I30 J0
(http://www.ahofer.ch/toolpath.jpeg)
Note: The lines and arcs join without any change in direction. You cannot have any smoother joins. The radii are large enough so that they can be followed with the desired feed rate.

My desired behaviour in Constant Velocity mode with the "Stop CV on angle" feature would be that Mach3 follows this contour with no acceleration and decelerations for the rounded corners, but with a stop around the sharp corner.

Well, I can either find settings so that Mach3 follows the contour smoothly, but also rounds the sharp corner, or it will stop and go for each segment. 

The only way I see how I can achieve the desired behaviour today is to set up things for Constant Velocity and insert G61 and G64 commands at the appropriate places to switch to and from Exact Stop mode around the sharp corners.

These are the settings I used:
In the Config/General config screen:
- Motion Mode set to Constant Velocity
- CV Dist Tolerance checked, 10 units (10 mm is actually a nonsensical value).
- Stop CV on angle unchecked
In the Alt6 Settings screen:
- CV Distance 10 units.
- CV Feedrate 600 (the same as the actual feed rate)
For these tests I reduced the acceleration of my motors to only 20 mm/sec/sec.
With these settings, Mach3 follows the contour with constant speed, and rounds the sharp corner.

Things I noticed:
- When I reduce the "CV Dist Tolerance" to 1 unit (which is 1 mm in my case, a very high value still), Mach3 noticeably decelerates/accelerates between the rounded segments and their adjoining lines. I do not see any need for that, since these segments join with no disruption in direction. The arcs could be entered and exited at full feed rate from the straight line segments without any resulting error in position, so this could be a smooth motion even if I set this tolerance to 0.0001.

- The CV Feedrate in the Alt6 settings screen does not make sense to me. I need to set it to 600 (the actual feed rate in my example), otherwise I get decelerations between the lines and arcs.

- If I check the "Stop CV on angle" checkbox and set the angle to 90 degrees, it runs smoothly through the contour, rounding the sharp corner. If I set the angle to 89 degrees, it stops for every segment like in Exact Stop mode. (I also had the hypothesis that the entry/exit angle between lines and segments was calculated wrong,
so I split one of the 90 degrees arcs into two 45 degrees segments, but that made no difference.)

- I also tried the Quantum beta version. I could not find any setting that would follow the rounded corners smoothly. I guess the new Jerk Correction only makes things even more complicated, since I have no idea how to set reasonable values.

- If the "Stop CV on angle" feature would work like I understood it should, it could do this example shape correctly automatically. I assume this angle next to the checkbox means the deviation in direction when following from one segment to the next. In the above example, the joints between the rounded corners and the adjoining sides will not change the direction, so their angle is 0 degrees, but the sharp corner turns the direction by 90 degreed when following it. So I assumed I could enter a value of 30 degrees for example, so that the rounded corners would not be affected and be followed smoothly, but the program would detect the 90 degree corner and stop for that.

Andreas
Title: Re: Constant velocity
Post by: jimpinder on September 03, 2007, 01:00:25 PM
I am sorry - I do not understand your problem. I have just programmed my mill to cut windows in a miniature railway locomotive, each window had rounded corners off a straight as you have, and (as far as I could see) the machine cut the straight then went straight round the corner at the same speed.

I did not set any Constant velocity settings or anything. I used G3 as you have ( only I use X Y R instead of X Y I J ) no problem.

I did not think that constant velocity had anything to do with your axis motors, but it was to do with spindle speed on a lathe. As you cut into the work and the diameter reduces, the spindle speed increases to keep the cutting speed at a CONSTANT VELOCITY. I cannot see how you can apply constant velocity to a miller, since the feed rate will stay at what is set.

Am I wrong in this ???
 
Title: Re: Constant velocity
Post by: Hood on September 03, 2007, 03:12:21 PM
Jim you are getting confused with Constant surface speed and Constant velocity I think
Have a look on your programme run page, you may find you are in CV mode.

Hood
Title: Re: Constant velocity
Post by: gskinner on September 03, 2007, 05:30:44 PM
It would be nice if someone could do a tutorial or something explaining the CV settings as I have tried many different settings and get either rounded corners or it stops at every segment.  I still have not figured out what the settings do.

Thanks
George
Title: Re: Constant velocity
Post by: jimpinder on September 04, 2007, 08:43:58 AM
Thanks Hood -
That is what I meant - so, as you say I must be in constant velocity mode, because it certainly doesn't hesitate when it comes to the corners. Having said that, my feed rate is not very high - so maybe it still has planty of time to think !!!
Title: Re: Constant velocity
Post by: jimpinder on September 04, 2007, 09:50:50 AM
As far as the puzzle is concerned - surely  Andreas is correct in his findings, but is trying to achieve somethings that cannot be achieved.

Either the machine is in constant velocity or it stops. The problem is that the milling head (at a right angle) must instantaneously change from one direction to another.

 You cannot do that instantaneously

The head must either decelerate to a stop in one direction, and after it has stopped accelerate up to speed in the other - OR -
as it decelerates in one direction it starts to accelerate in the other (in which case you get a rounding of the corner).

If you have set the machine to stop it will ensure it has stopped in every direction before in moves to the next one, or, in constant velocity mode there will be a smooth transition from the speed in one direction to the speed in the other.

I do not see how the software can interpret what you want, unless you tell it, therefore you can make settings for  the norm, for example, constant velocity, but you would then have to tell the machine if you required anything different for a particular corner.

I must admit, now that you have brought it up - it would be nice to have a tutorial on this aspect of how the machine functions. It would appear that it may be possible to set an angle where a change takes place between Cv and exact stop - I do not know. Try setting the "Stop CV on angle" at 91 so that it includes your 90 angle, and it may do what you want.

Title: Re: Constant velocity
Post by: stirling on September 04, 2007, 11:51:57 AM
... but is trying to achieve somethings that cannot be achieved...

Sorry Jim (can I call you Jim :)) - I don't agree.

First, let's assume that we'll accept blending: As you say, when it comes to the rightangle we'll actually get an arc. Let's assume that arc is of radius theta - where theta will depend on the accel capabilities of the machine and the FR we're trying to achieve.

Now let's not accept blending: The machine (as you say again) must come to a stop momentarilly at the right angle. BUT- and here's the nub - if the radius of the other arc corners are greater than theta, we already know that the system can handle an arc of theta without slowing so there is absolutely no need for any slow down for the arcs. i.e. it should be perfectly possible to cut Andreas path with a stop at the rightangle and no slowdowns for the rest (which I think is what he wants and is expecting).

I do not see how the software can interpret what you want, unless you tell it, therefore you can make settings for  the norm, for example, constant velocity, but you would then have to tell the machine if you required anything different for a particular corner.

And that is exactly what all the CV settings are for. i.e. when CV should blend and when it should not. But here I think is the problem: I've noticed that all the CV settings are different depending on what version of Mach your using - which makes it really hard for us to talk about. Also the UG hasn't been updated to reflect the latest CV settings, so this tends to make them (to me anyway and I assume also to Anreas) virtually impossible to understand and to set correctly to get the desired result. Or maybe they just don't work that well even if you can find a way to set them up - I don't know.
Title: Re: Constant velocity
Post by: Chaoticone on September 04, 2007, 01:13:14 PM
Hey Guys, check out this thread by Art.

http://www.artsoftcontrols.com/forum/index.php?topic=1724.msg10363#msg10363

Brett
Title: Re: Constant velocity
Post by: Brian Barker on September 04, 2007, 01:45:47 PM
This is a CV problem in the current version of Mach 3 and we have fixed this for the next rev :)

Sorry for the trouble
Brian
Title: Re: Constant velocity
Post by: jimpinder on September 04, 2007, 03:21:52 PM
Brian - Thanks for that, I was begining to get the old grey matter working on the maths.

Is there any chance of a tutorial?? They do help, especially when you don't necessarily understand it fully without a bit of experimenting.

Jim
Title: Re: Constant velocity
Post by: gskinner on September 04, 2007, 08:09:25 PM
Brian,

Was the CV problem fixed in ver. 2.45 released today or will it be fixed in the next version?
Also some sort of tutorial or manual on what all the CV settings do and a how to go about setting them would be great.

Thanks
George
Title: Re: Constant velocity
Post by: Brian Barker on September 05, 2007, 07:26:29 PM
The update is on the web now :)

This setting will tell Mach3 to come to a full stop if the angle from one intersection to the other is less then X amount. For example if you have a move that makes a 120 move you will not stop and the CV will fly right through it.. this will round the corner but you will not care because you don't need to have a sharp corner...

Now in the next example the intersection is 10 Deg (Looks like a sharp point). To make this a sharp point we need to come to a full stop at the intersection...
Hope that helps
Brian
Title: Re: Constant velocity
Post by: gskinner on September 05, 2007, 08:12:34 PM
What is the CV feedrate setting for?

Thanks
George
Title: Re: Constant velocity
Post by: Brian Barker on September 11, 2007, 09:53:31 PM
This will make the Blending of the moves happen at Blend feedrate... But the problem is that on some tables this will make the movements seem jerky when this is added... But it will make it so that you have smaller rounding in the corners.

Thanks
Brian
Title: Re: Constant velocity
Post by: stirling on September 27, 2007, 05:44:20 AM
I upgraded R2.45 post sep 5th but have not had chance to really try it out until today and I'm sorry guys but I still can't make any sense of the CV tuning settings. If anything they just seem to have gotten worse and more confusing.

This setting will tell Mach3 to come to a full stop if the angle from one intersection to the other is less then X amount.

The only settings now appear to be CVDistance and CVFeedrate - I can find no setting relating to any angle.

What is the CV feedrate setting for?

This will make the Blending of the moves happen at Blend feedrate...

This doesn't seem to be the case (on my system at least)

I've tried to figure out the logic of CVDistance and CVFeedrate for myself but thus far I can't make any sense of either of them.

CVDistance seems to tighten the blend arc the smaller you set it but it doesn't appear to have any correlation to any real distance. This is on every intersection regardless of angle.

CVFeedrate seems to be a + or - to the current feedrate but the only effect it seems to have is either no effect or it effectively turns CV off completely. Again I can't see any correlation between different values and any effect. Certainly whatever it's set to the actual feedrate doesn't seem to change.

Has anyone - particularly those who've contributed to this thread had any better success? or is it just me?
Title: Re: Constant velocity
Post by: Brian Barker on September 27, 2007, 08:22:24 AM
Go to Config/ General Config and there are CV settings there...
Title: Re: Constant velocity
Post by: stirling on September 27, 2007, 09:49:28 AM
Thanks Brian

I'm afraid I'm still having trouble getting things to work as I'd like - would you walk me through a couple of things please?

As I understand it there are the following settings with regard to CV tuning (ignoring things like plasma cutting etc.)

On the Config/General config dialog: two items:

 a)  CV Dist Tolerance (units)
 b)  Stop CV on angles > (degrees)

On the Settings screen: two items:

  c) CV Distance
  d) CV Feedrate

a) and c) seem to be the same thing i.e. when you change one it automatically reflects this in the other.

Concentrating for the moment just on "Stop CV on angles >". Let's set it to 90°.

Please see the attached two short gcode files. Both describe 5 pairs of lines describing different angles - approx 10°, 45°, 90° 135° and approx 170°.
 
The only difference between the two files is that cvtest1 starts at bottom left and cvtest2 starts at bottom right.

For the sake of discussion, if we now call the 90° quadrant between 12 oclock and 9 oclock quadrant 1, and the 90° quadrant between 12 oclock and 3 oclock quadrant two - we'll see that all blending for BOTH files ONLY occurs in quadrant 1. i.e. it seems that the "Stop CV on angles >" refers to the "global" 360° and takes no account of the angle at the actual line intersection. Surely this is wrong?
Title: Re: Constant velocity
Post by: Chaoticone on September 27, 2007, 10:10:10 AM
Look at this thread, it tells you how to test different settings, the idea behind them, etc. etc.

http://www.artsoftcontrols.com/forum/index.php?topic=1724.msg10363#msg10363

I haven't messed with the CV settings much because my machine does fine with the defaults. If this doesn't clear things up for you, let me know. I will do some test and explain my findings the best I can.

I hope this helps,
Brett
Title: Re: Constant velocity
Post by: Brian Barker on September 27, 2007, 11:10:55 AM
I will try to test... Could you make the file into 2 line moves and I can use that to test with... I can't have more then that to test with :(

Thanks
Brian
Title: Re: Constant velocity
Post by: stirling on September 27, 2007, 12:14:01 PM
Hi Brian

Sorry - had a customer taking up my time all afternoon... ;D
Now back to the REAL work. I'm not sure what you mean by make the file into two line moves.

Hi Brett

Thanks - I've read Arts post but I think my question with Brian at the moment is that CV may be meant to work like that, but I don't think it actually does. I'm sure Brian will correct me though if I'm wrong ;)

Ian
Title: Re: Constant velocity
Post by: Chaoticone on September 27, 2007, 12:21:49 PM
NP Ian, I understand.

Brett
Title: Re: Constant velocity
Post by: Brian Barker on September 27, 2007, 12:23:46 PM
Ian,
CV angle is only telling mach3 that it must come to a full stop at the intersection point of the two moves...

Run this as a test
(Machine needs to be at X0 Y0)
G01 X100 F5000000
Y50 X50

IF the CV angle is at 90 you shoudl not get any rounding of the corner... test it with CV on and CV off. What do you see??

thanks
Brian
Title: Re: Constant velocity
Post by: stirling on September 27, 2007, 12:58:21 PM
Hi Brian

I ran your code with angle set to 90°.
With CV mode on I get rounding. With CV mode off I get no rounding which is exactly what I'd expect. Why do you say I shouldn't see any rounding?

Ian
Title: Re: Constant velocity
Post by: stirling on September 27, 2007, 01:02:08 PM
Sorry Brian - strike that last answer - it's NOT what I'd expect - but I DO get rounding. I'm getting confused now!!!!
Title: Re: Constant velocity
Post by: jimpinder on September 27, 2007, 03:01:56 PM
I have read through this post and I am getting a little confused as to what we are trying to achieve.
As far as I understand, CV is a system that comes into play when the motors cannot decelerate and accelerate quickly enough to achieve instantaneous speeds required, constantly. The computer therefore decelerates one axis as it accelerates the other so the speed of the tool is overall constant. I don't know if anybody has studied the resultant curve or not  - is it circular, parabolic or what. I dont suppose it matters.

You can turn this effect on or off - and the off position should result in a sharp angle of cut.
A question - IF THE COMPUTER CAN ACHIEVE A SHARP CUT, WILL IT DO IT REGARDLESS OF WHETHER CV IS ON OR OFF

I understand that you are able to alter CV Distance and CV Feedrate. I can only assume that these two parameters only come into play if CV is ON - if it is off the computer will decelerate to 0 and then accelerate up again. I cannot see that you need both parameters - the computer will compute its dec/acceleration from either the distance it is told to start from, or the feedrate it is told to maintain round the shape - I cannot see how it can do both.

As far as the angle is concerned - Stirling - keep it simple.
Try a right angle and run with CV mode on.
I assume the feed rate must be pushed fairly high or the motor will be able to start and stop quickly enough - and up it until you are clearly getting a rounded corner.
I would try the Stop CV on angles, and try ENTERING from 88 to 92 - it may be that at 90 - if it is programed to stop when angle >90, it doesnt catch it - and see where the change from round to sharp occurs (if it does).

I cant see this diatribe will help much, but I cleared it up a bit in my mind, anyway.

 
Title: Re: Constant velocity
Post by: stirling on September 28, 2007, 03:34:38 AM
Jim - you tell me to keep it simple. I thought that's what I was doing when I sent the two short examples to Brian. I have not undertaken this post lightly - I NEED CV to work for me. I spent several hours yesterday doing nothing else but testing the "Stop CV on angles >" and I've done all the simple stuff like you've suggested.

Let me nail my colurs to the mast here. I think that the way that "Stop CV on angles >" has been implemented in the latest version of Mach (R2.45 as of the 5th Sep) is wrong and does NOT do what Art intended.

Brian gave me a code snippet in his last post, told me to set "Stop CV on angles >" to 90, and asked me what I saw. Well, I saw rounding with CV on and a sharp point when CV was off.

So let me ask you to test it and see what you get. I'd be very interested in your results. Note that units are in mm.
Title: Re: Constant velocity
Post by: Brian Barker on September 28, 2007, 04:17:20 AM
I am on the road today and will be back at the end of the day... when I get back I will have a look at CV again.
thanks
Brian
Title: Re: Constant velocity
Post by: stirling on September 28, 2007, 08:39:49 AM
Brian

I think I've found the problem.

Just to make sure we're on the same page, when we say "Stop CV on angles > 90 degrees. The angle we're referring to as being greater than 90 degrees is the obtuse angle.

Note: We've used 90 degrees as our limit in our discussion but the following holds true for any angle we care to use.

If we refer to the direction of the obtuse angle as being from the first line to the second line then:

For clockwise angles Mach succeeds. i.e. it blends when it should and doesn't blend when it shouldn't.

BUT For anti-clockwise angles Mach fails. i.e. it doesn't blend when it should and does blend when it shouldn't.

If you run the code fragment you posted to me you'll see that it blends (when it shouldn't) but if you cut exactly the same two lines starting from the other end, Mach works fine. I've tried it with loads of examples and the above seems to hold.

The attached pic might help.

Thanks

Ian
Title: Re: Constant velocity
Post by: stirling on October 02, 2007, 10:51:25 AM
is there no further interest in this from the forum?
Title: Re: Constant velocity
Post by: Brian Barker on October 02, 2007, 12:19:53 PM
I have seen your post and can not look at the problem at this time :( I have an OEM that I am working with and as soon as they are done I hope to get into that section of code to see if we can find the trouble...


Thanks
Brian
Title: Re: Constant velocity
Post by: stirling on October 02, 2007, 01:45:58 PM
No problem Brian.

Great avatar by the way - did you have it specially designed for you?  :D

Thanks

Ian
Title: Re: Constant velocity
Post by: Brian Barker on October 02, 2007, 02:35:44 PM
Benny did it  ;D

I need the days to be 48 Hours and about 20 days in the week... if I time was like that I could do so much more!
Title: Re: Constant velocity
Post by: gskinner on October 12, 2007, 09:09:11 PM
Any more information on CV yet?
Title: Re: Constant velocity
Post by: stirling on October 16, 2007, 03:21:38 PM
seconded... come on folks there must be more than the handful of people in this thread that need CV to work properly... or are you all secretly turning it off or... using T**C?!!!!! ;D

I know Art, Brian et al are busy and have to schedule priorities but with the support this thread is getting it's a no brainer (sic) why it's not at the top of their list.
Title: Re: Constant velocity
Post by: one_0_wonder on October 16, 2007, 07:37:25 PM
Ian,

Your quite right that the CV works on CW angles but not on CCW angles.  I did the same tests that you performed in your post of 9/28/07 which answers my questions.  I have dropped back to version 2.42 which does not have the problem.  Most of the routing I do is in a CCW direction so I can't use the latest code until this if fixed.  Maybe Brian or Art will hear us and give a progress report.

Tom
Title: Re: Constant velocity
Post by: one_0_wonder on October 17, 2007, 07:39:19 PM
Brian,
To go along with the drawing Ian provided on 9/28/07, I'm attaching a sample tap file that demonstrates the failure.

It's a sine wave that shows how CV drops out when angles are in a [CCW] direction.
Running at 70 ipm you see the speed moving right along during the first half of the wave, chord angles are [CW] and CV is working.
Now in the second half of the wave the chord angles are [CCW] and it slows way down, CV has dropped out.

In Config/General Logic Config:
    CV Dist Tolerance = 0.01
    Stop CV on angles > 35 Degrees

Hope this will be useful to you.
Regards,
Tom
Title: Re: Constant velocity
Post by: Brian Barker on October 19, 2007, 09:11:01 PM
I just got back and I will work with Art to see if we can find where the problem is with the CV... Thanks and sorry for the delay
Title: Re: Constant velocity
Post by: ART on October 22, 2007, 11:50:12 PM
Hi Guys:

  Direction of movement error in CV found and fixed for the next release.
Sorry for the long delay on the fix.. We did manage to find it this evening..

Art
Title: Re: Constant velocity
Post by: one_0_wonder on October 23, 2007, 02:40:38 AM
Thanks Art & Brian.  Will watch for next release.

Regards,
Tom
Title: Re: Constant velocity
Post by: stirling on October 23, 2007, 03:20:07 AM
Art, Brian - many thanks

Ian
Title: Re: Constant velocity
Post by: ART on October 23, 2007, 10:04:39 AM
Hi Guys:

  If you redownload 2.56 , youll find it reports at 2.56.1 , and the fix is in that file. Let me know if you see a CV problem in your files on this version, we think weve caught it, the spline file seems to run OK, but you never know, it can take a coupel of iterations to get it right sometimes..

Art
Title: Re: Constant velocity
Post by: vmax549 on October 23, 2007, 12:57:58 PM
Hi Art ,I just redownloaded V2.56 and it still reports as 2.56 not 2.56.1??

(;-) Tp
Title: Re: Constant velocity
Post by: one_0_wonder on October 23, 2007, 05:44:23 PM
Art,

Installed 2.56.1 and ran my old jobs, they all ran OK.  Generated a wild test program for CV and it also worked fine.
As far as I'm concerned everything is working correctly again.

Regards,
Tom
Title: Re: Constant velocity
Post by: stirling on October 24, 2007, 04:58:35 AM
tried to break it - but it just wouldn't - nice job. Thanks to all involved.

TP, mine also reports 2.56 but I noticed during install that it said it was upgrading to 2.56.1

Ian
Title: Re: Constant velocity
Post by: Holger0815 on October 24, 2007, 09:54:07 AM
Hello all,
when you do an update of MACH3, how do you make it? Just starting the installer-exe or cleaning the Mach3-folder before or is there an un-install tool anywhere?

I'm just in the test phase with Mach software, therefore not yet too familiar with it.

Thanks for advise.

Regards
Holger
Title: Re: Constant velocity
Post by: Chaoticone on October 24, 2007, 10:13:35 AM
You just download and install. It will ask if you want to write over the older version, just click yes. I would save a copy of my xml files, screensets, adn grabber profiles to an external disk before I installed the new. You should be ok without the back up, better safe than sorry.

Brett
Title: Re: Constant velocity
Post by: Repmo on October 28, 2007, 08:52:02 AM
try to disable backlash