Screwcutting

More
30 Jul 2009 18:31 - 30 Jul 2009 18:34 #659 by welderfabrod
Replied by welderfabrod on topic Re:Screwcutting
Try again!!!!!!!!!!!!!!!!!!!

The previous four are pulses on pins 10 and 11

At 900revs
At 600revs
At 300revs

Rod

Sorry John can only seem to get the same image 3 times!!!!!!!!!!!!!!!!!
Attachments:
Last edit: 30 Jul 2009 18:34 by welderfabrod. Reason: 3 different images not attaching to post

Please Log in or Create an account to join the conversation.

More
30 Jul 2009 18:47 #662 by BigJohnT
Replied by BigJohnT on topic Re:Screwcutting
That is a lot different than my scope trace. Yours seems to be random bumps where mine is real steady. You might have some electrical noise on your encoder lines. Do you have the shield grounded on one end only?

John

Please Log in or Create an account to join the conversation.

More
29 Sep 2009 13:52 #891 by andypugh
Replied by andypugh on topic Re:Screwcutting
welderfabrod wrote:

Also I'm still getting what I feel is the odd motion of the rapids outside the drive line. Now the point is, is this how the G76 in EMC2 has been implemented or is it just me having this problem.


I don't know if you are still watching this thread, but it is not just you. I have exactly the same issues and have been wrestling with them for some days now.

1) The spurious +X jump disappears with an M1 optional pause before the G76. Perhaps a G4 pause would also do away with it?

2) Jerkiness. This looks like a badly tuned controller in the internal conrol loop in spindle coordinated motion. The job of G33 and G76 is to look at the encoder position and to make sure that the axis is in the right place. This requires a controller, possibly a full PID one, inside the software. This looks to be badly tuned (or to be well tuned for a different machine, as it seems to work for others) .
It seems that the axis is overshooting, pausing to let the spindle catch up, overshooting again. You can elimibate this by cranking the spindle speed up so far that overshoot is impossible, but then you get an arbitrary and wrong thread pitch, so it isn't any help.
Firstly, you can feed this controller with a much smoother encoder signal by making the following change to your HAL file:

setp encoder.0.position-scale 100
setp encoder.0.counter-mode 1
net spindle-position encoder.0.position-interpolated => motion.spindle-revs
net spindle-velocity encoder.0.velocity => motion.spindle-speed-in
net spindle-index-enable encoder.0.index-enable <=> motion.spindle-index-enable
net spindle-phase-a encoder.0.phase-A
net spindle-phase-b encoder.0.phase-B
net spindle-phase-index encoder.0.phase-Z

This didn't actually work for me, so I am going to try some more experiments.

1) Try different control modes, (G61, G61.1, G64) perhaps the version with a programmable error is better, or maybe exact stop mode even.
2) Try working in imperial. I have noticed that the only people complaining (Me, yourself and Archivist on IRC) are using metric. Perhaps the controller is tuned for much smaller numbers?

Please Log in or Create an account to join the conversation.

More
29 Sep 2009 21:18 #898 by andypugh
Replied by andypugh on topic Re:Screwcutting
G61.1 Does help, but not enough in my case.
G61 is also an inprovement.
G64 P (silly big number) is definitely worse.
I created an imperial config for the same lathe, and it seemed fractionally better, but that could have been luck. Having an imperial lathe might be useful anyway at some point.

Please Log in or Create an account to join the conversation.

More
03 Oct 2009 08:48 - 03 Oct 2009 08:53 #917 by welderfabrod
Replied by welderfabrod on topic Re:Screwcutting
Andy I never got to the bottom of this after a lot of time spent trying to eliminate interference including making up a small pcb with a hex inverter and opto isolator for the sensors.
In the end I deduced that it was not interference my gearing or any of my set up but a software problem that no one else was getting and I simply did'nt have the knowledge to tackle it so gave up on trying to get this lathe to screw cut and have now started to upgrade a Denford Orac that I bought not working about 18 months ago and had'nt attacked because of the time spent on the Emco. I would still like to get the Emco to screwcut though so as soon as I can get to the shed again will try you suggestions and let you know how I get on. At least I now Know I'm not alone on this, which is something of a relief.

Rod

Ps I seem to remember somebody saying that something in the ini. file needed to be changed I think something to do with the trajectory planner, I think on the CNC Zone, but when I looked for the post again I could'nt find it, don't no wether this is of any help.
Last edit: 03 Oct 2009 08:53 by welderfabrod. Reason: PS added

Please Log in or Create an account to join the conversation.

More
03 Oct 2009 10:29 #918 by andypugh
Replied by andypugh on topic Re:Screwcutting
There has been an awful lot of debate on this on the mailing list and the IRC channel.
One thing that is clear is that there is more that one way that screwcutting can go wrong.
There is a suggestion that my problem (regular osciallations of the carriage)m starts with a bad initial velocity estimate, and never recovers. There is a software patch being evaluated that should improve things if that is the case.
However, somebody else has demonstrated a problem with noisy encoder signals, and that causes a similar but different problem. If halscope shows a similar problem for you then the quick-and-dirty solution is debouncing in the HAL file.

Add lines like these (with the correct pins referenced, and a B-channel added if you have one) to your custom.hal (or in the main machine .hal file if you want, then you can ignore the unlinkp statements.


loadrt debounce cfg="2"
addf debounce.0 base-thread
setp debounce.0.delay 2

unlinkp encoder.0.phase-A
unlinkp encoder.0.phase-Z
unlinkp parport.0.pin-13-in
unlinkp parport.0.pin-15-in

net indexunfilt <= parport.0.pin-13-in
net indexunfilt => debounce.0.0.in
net indexfilt <= debounce.0.0.out
net indexfilt => encoder.0.phase-Z

net spindleunfilt <= parport.0.pin-15-in
net spindleunfilt => debounce.0.1.in
net spindlefilt <= debounce.0.1.out
net spindleunfilt => encoder.0.phase-A

Please Log in or Create an account to join the conversation.

More
06 Oct 2009 11:07 #926 by welderfabrod
Replied by welderfabrod on topic Re:Screwcutting
Andy have just tried adding the instuctions you suggested to my custom.hal file. Three things have happened 1) the digital rev counter I added to the Axis screen is no longer reading the revs from the encoder. 2) now when the part program gets to G76 it stops and will go no further. 3) I can no longer see the encoder velocity signal on the hal scope although the signals for the index and count pulse are still there.

I will play around a bit more tomorrow as I'm on an awkward shift at the moment.

Rod

Please Log in or Create an account to join the conversation.

More
06 Oct 2009 12:00 #927 by andypugh
Replied by andypugh on topic Re:Screwcutting
It sounds like it is unlinking the pins, but not relinking correctly.
Did you just paste in my HAL instructions, or edit them to suit your setup?

Which pins are your encoder wired to, and how many channels does your encoder have?

You should be able to get back to where you were by just deleting the new stuff.

Please Log in or Create an account to join the conversation.

More
07 Oct 2009 11:05 #929 by welderfabrod
Replied by welderfabrod on topic Re:Screwcutting
Andy your a star success at last!!!!!, at least until I've done a bit more testing but it really looks promising. Here's a run down of what I did, when I read your first post I did'nt have time to put in the suggested mod (interpolated), so when I finally got to the shed I added all your suggestions both the debounce and interpolation at the same time to my custom.hal, silly really as its always better to change one thing at a time, if it makes no difference change it back. Anyway what I decided to do was instead of removing the debounce I just hashed it out as I thought you may have some idea why it failed to relink the pins. But I did'nt remove the interpolated command and just ran my threading programme to make sure I was back where I started, I immediatly saw a difference in the cut velocity on the Axis screen as it was obviously now cutting at the right feed for the thread, previously it would just ramp up to max feed rate on the cutting pass so I let it continue hey presto one perfect 8mm thread. So in reality it appears that all I needed to do was add the interpolated command.

I,m still not happy with the way EMC2 appears to implement the G76, although I have,nt as yet tried an internal thread I think it could be a bit dodgy if you were,nt aware that the cutter travels outside the drive line. Even the Emco in its original form did'nt exhibit this behavior. That said I'm at least getting some where.
I will over the weekend do a bit more testing and let you know how I get on.

Thanks Rod

Please Log in or Create an account to join the conversation.

Time to create page: 0.409 seconds
Powered by Kunena Forum