THCAD Noise / THC comp movement

More
03 Nov 2016 07:01 #82367 by azeri
Hi there,

About hardware limits, i use 400W Yaskaawa servos (3000 rpm, max 4000) with 15:1 gear reduction on both X and Y, and i use Yaskawa 100W servo (3000rpm, max 4000) direct to 5mm/rev ball screw, wich gives me up to 15000 mm/min and no problem with 1000mm/min acceleration.

About numbers, all my system works on mm, not on inches.

About PID on THC, there is a thread on this forum of BigJohn and other user discussing it, but there are not attachments, i found BigJohns THC comp with P, wich i still need to test (attached here).

I have thought about redoing THC comp ,but not as discussed here, to work with Linuxcnc "new" PID component, i'm going to think about it.
Attachments:
The following user(s) said Thank You: Rick G

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

More
03 Nov 2016 10:26 #82370 by rodw

Hi there,

About PID on THC, there is a thread on this forum of BigJohn and other user discussing it, but there are not attachments, i found BigJohns THC comp with P, wich i still need to test (attached here).

I have thought about redoing THC comp ,but not as discussed here, to work with Linuxcnc "new" PID component, i'm going to think about it.


This is quite interesting. Can you post a link to the discussion you referred to? I found a few relevant articles but I don't think I found that one. Here's the threads I found on this topic. It seems we've rediscovered what we've collectively forgotten yet again.
forum.linuxcnc.org/24-hal-components/30600-thc-component#71823
forum.linuxcnc.org/38-general-linuxcnc-q...d-control-loop#65832
forum.linuxcnc.org/38-general-linuxcnc-q...plasma-thc-questions

One thing I've learnt is that the default Plasma setup is generic and not designed for the Mesa THCAD. It would be good to get some history behind the PID code you've attached.. Eg is it in use, working or just a first cut.

I do have a stand alone THC here but when I ordered my Mesa 7i67e, International postage costs made it a no brainer to grab the Mease THCAD at the same time.

It will be quite a while before I get enough built to play with this.

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

More
03 Nov 2016 11:23 #82371 by Rick G
azeri,

Thanks for posting the thc pid, I had not seen that.
I do in fact have a modified thc comp I plan on testing this weekend and will try the thc pid you posted also.

Rick G

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

More
03 Nov 2016 18:06 #82384 by rodw


Perhaps modify the code to only apply a correction after so many cycles to give the z a chance to get into position.
So request a Z correction, wait 10 cycles before next correction can be made.

Rick G


So if adjustments required by a pid mean that the z axis has to move more than one click as the bit bang approach does, isn't this required? However, rather than the arbitrary delay proposed by Rick, shouldn't we wait for the previous command to finish before adding another adjustment?

Eg
if(still_moving)
    do_nothing;
else
   do_adjust_pid;

Perhaps this implies that PID based THC should be fully self contained. Will a stepper based system have different control requirements to a servo based system? I've been doing a bit of reading on pid algorithims and they don't look to hard to code.

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

More
03 Nov 2016 18:19 #82385 by andypugh

I've been doing a bit of reading on pid algorithims and they don't look to hard to code.


No, they are extremely simple.
error = command - actual
I = I + error * Igain
P = error * Pgain
D = (error - old_error) * Dgain
out = P + I + D
old_error = error

This will work, but needs re-tuning if you change the servo thread frequency. That's not normally something that folk do, though.
The following user(s) said Thank You: rodw

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

More
03 Nov 2016 19:02 #82387 by azeri
Hi there,

posted code is not mine, is BigJohT's published code. I think i started reading about it on this post:
forum.linuxcnc.org/27-driver-boards/3980...mesa-guru-s?start=60

but let me check somewhere else...

Best Regards,
Aitor.

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

More
03 Nov 2016 20:56 - 03 Nov 2016 21:28 #82390 by rodw

Hi there,

posted code is not mine, is BigJohT's published code. I think i started reading about it on this post:
forum.linuxcnc.org/27-driver-boards/3980...mesa-guru-s?start=60

but let me check somewhere else...

Best Regards,
Aitor.


Very interesting thread. Got me to delve deeper.
Digging through the source, there are actually 2 versions of the THC component.
THC.comp for Mesa Hardware
THCUD.comp which for other hardware
The correct one (THC.comp) for the Mesa Card for V 2.7 is here
www.linuxcnc.org/docs/2.7/html/man/man9/thc.9.html
with source here
github.com/LinuxCNC/linuxcnc/blob/master.../components/thc.comp

You will see that the PID control has not been incorporated into the current stable release.

So I think you need to check which THC version you have deployed in your build.
Last edit: 03 Nov 2016 21:28 by rodw. Reason: Removed some incorrect information

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

More
03 Nov 2016 21:17 - 03 Nov 2016 21:18 #82393 by azeri
Dear rodw,

i cant see any PID there. and the source (where i cant see PID neither) is for master branch, wich if im not wrong is now the 2.8-pre.

Of course, for us, THC comp is the good one, but on some threads, THCUD and THC are mixed.

Best Regards,
Azeri.
Last edit: 03 Nov 2016 21:18 by azeri.

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

More
03 Nov 2016 21:20 #82394 by rodw
Oops, my mistake, I just realised I was wrong. Gotta get to work.

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

Moderators: PCWjmelson
Time to create page: 0.136 seconds
Powered by Kunena Forum