using HAL to correct axis errors

More
8 years 8 months ago #106115 by Mike_Eitel
I like your true diy

Please Log in to join the conversation.

More
8 years 8 months ago #106135 by pgf
I think "true diy" might be a euphemism for "doesn't work all that well". :-)

Please Log in to join the conversation.

More
8 years 8 months ago #106136 by Mike_Eitel
But its fun to think about and tinker.
Have fun!

Please Log in to join the conversation.

More
8 years 8 months ago #106725 by andypugh
There is also a special kinematics file that can be used to correct a skewed machine:
wiki.linuxcnc.org/cgi-bin/wiki.pl?Contri...y_XY_skew_correction

That might not work so well with a gantry machine, it predates joints-axes.

Please Log in to join the conversation.

More
8 years 8 months ago #106728 by pgf
thanks andy. guess that could have saved me a bit of work. oh well -- it wasn't hard, and i enjoyed it. and what's most important....

MY MILL CAN CUT RIGHT ANGLES!!!

there. just had to say that. :-)

paul

Please Log in to join the conversation.

More
8 years 8 months ago #106739 by Mike_Eitel
Nice to read from a happy man!

Please Log in to join the conversation.

More
4 years 1 month ago #251158 by LAUSCH
Hi paul,

Can you explain why you set:
option singleton yes;
If you do this you will get errors from the lines in HAL:
addf nonsquare-table.0.cmd servo-thread
addf nonsquare-table.0.fb servo-thread

I have thus comment the line
//option singleton yes;
And LinuxCNC starts without error.

Cheers
Christian

Please Log in to join the conversation.

More
4 years 1 month ago #251178 by pgf
Well, I clearly didn't get errors from that code when I last ran the mill. I had to look up what the "singleton" option does -- it seems appropriate for this module, since you can really only have one of these components per system. But perhaps you're running a newer version of hal, with tighter restrictions on naming.

paul

Please Log in to join the conversation.

More
1 year 6 months ago #325765 by pgf
I wanted to bring this thread up to date, in case anyone finds it and finds it useful.  I recently upgraded my mill from 2.7.4 to 2.9.4, which of course brought in the joints axes changes.

Those required some rework of my skew corrector.  The component module itself was unchanged.  It's in a post above .

But the linkage into HAL did change, due to joints axes, and the introduction of pid.

First, 2.7:      the original HAL had a fairly simple connection between motor and stepgen:
Code:
  ypos-cmd       axis.1.motor-pos-cmd ==> stepgen.1.position-cmd   ypos-fb       stepgen.1.position-fb ==> axis.1.motor-pos-fb   xpos-cmd       axis.0.motor-pos-cmd ==> stepgen.0.position-cmd   xpos-fb       stepgen.0.position-fb ==> axis.0.motor-pos-fb

I was able to simply insert the nonsquare function block into the middle of each Y axis signal path, and tap into the X signal path.
Code:
 ypos-cmd       axis.1.motor-pos-cmd ==> nonsquare-table.y-in   ypos-cmd-adjusted       nonsquare-table.y-out ==> stepgen.1.position-cmd   ypos-fb-adjusted       stepgen.1.position-fb ==> nonsquare-table.y-fb-in   ypos-fb       nonsquare-table.y-fb-out ==> axis.1.motor-pos-fb   xpos-cmd       axis.0.motor-pos-cmd ==> stepgen.0.position-cmd                            ==> nonsquare-table.x-in   xpos-fb       stepgen.0.position-fb ==> axis.0.motor-pos-fb                             ==> nonsquare-table.x-fb-in

The newer LinuxCNC path in 2.8/2.9 is a little more complicated, with the introduction of the PID mechanism.
Code:
  y-pos-cmd       joint.1.motor-pos-cmd ==> pid.y.command   y-output       pid.y.output ==> hm2_7i96.0.stepgen.01.velocity-cmd   y-pos-fb       hm2_7i96.0.stepgen.01.position-fb ==> joint.1.motor-pos-fb                                         ==> pid.y.feedback   x-pos-cmd       joint.0.motor-pos-cmd ==> pid.x.command   x-output       pid.x.output ==> hm2_7i96.0.stepgen.00.velocity-cmd   x-pos-fb       hm2_7i96.0.stepgen.00.position-fb ==> joint.0.motor-pos-fb                                         ==> pid.x.feedback

Integrating the nonsquare function in the new HAL is similar, butasymmetric.  TreIn the output direction, the nonsquare function is inserted between the joint and pid (which then feeds stepgen), but in the feedback direction, we insert between stepgen and the joint.

Regardless, the new function is inserted just after (cmd) and before (fb) the joint command.  The X control for the new function is similarly attached directly to the joint function.
Code:
  y-pos-cmd       joint.1.motor-pos-cmd ==> nonsquare-table.y-in   new-y-pos-cmd       nonsquare-table.y-out ==> pid.y.command   y-output       pid.y.output ==> hm2_7i96.0.stepgen.01.velocity-cmd   y-pos-fb       hm2_7i96.0.stepgen.01.position-fb ==> nonsquare-table.y-fb-in                                         ==> pid.y.feedback   new-y-pos-cmd-fb       nonsquare-table.y-fb-out ==> joint.1.motor-pos-fb   x-pos-cmd       joint.0.motor-pos-cmd ==> pid.x.command                             ==> nonsquare-table.x-in   x-output       pid.x.output ==> hm2_7i96.0.stepgen.00.velocity-cmd   x-pos-fb       hm2_7i96.0.stepgen.00.position-fb ==> joint.0.motor-pos-fb                                         ==> pid.x.feedback                                         ==> nonsquare-table.x-fb-in

 

Please Log in to join the conversation.

Time to create page: 0.116 seconds
Powered by Kunena Forum