Andy,
Since Dewey released the homemod functionality that allows you to build
custom homing routines, I've been working with Dan Dempsey on developing a
custom homing component for cia402 compliant drive.
Dominc Braun released a component that can  home cia402 (eg an Ethercat
canopen standard) drives.
See: https://github.com/dbraun1981/hal-cia402
I have played enough with this component enough to know it has homing
shortcomings where absolute encoders are not used.
The CIA402 standard allows connecting external home and limit switches and
a plethora of homing methods that define direction of travel and latching,
many of which reflect the Linuxcnc homing configuration documents. Some
drives support home by stalling without using any home or limit switches.
So to implement these features, all you do is tell the drive to home and
wait until it tells you it is homed. As you can imagine Linuxcnc is not
very happy with motion it has not commanded so this is a recipe for instant
following errors that need to be handled.

The approach I have taken is to expand  homing read_homing_in_pins() and
write_homing_out_pins() functions to incorporate Dominic's read_all() and
write_all() functions. It's been pretty slow going as in a homemod, you
need to manage all joints whereas using Dominc's component, this is managed
as a separate instance of the component for each joint.

I have got as far as seeing some motion when jogging before homing but its
rough so I have not got it right yet. I am also not resetting the status
words correctly when turning linuxcnc off from the axis orange button. When
I get that working, I will be able to code a much simplified state machine
in do_homing(). The one unknown is how the execution order in the servo
thread loop in relation to a homemod and the lcec ethercat driver. We may
end up being 1 servo cycle behind..

In answer to Gene's question re advantages, wiring can be much reduced and
homing should be more accurate because the drive should respond to a change
in homing state between servo thread invocations and wait patiently for
Linuxcnc to see the homed state when it next looks. Now if only I could get
etherlabmaster installed on a Raspberry Pi running the later Bullseye or
Bookworm kernel. But that's another story...



Rod Webster
*1300 896 832*
+61 435 765 611
Vehicle Modifications Network
www.vehiclemods.net.au


On Wed, 4 May 2022 at 01:30, gene heskett <ghesk...@shentel.net> wrote:

> On Tuesday, 3 May 2022 10:11:46 EDT andy pugh wrote:
> > On Tue, 3 May 2022 at 14:24, gene heskett <ghesk...@shentel.net> wrote:
> > > Homing can be a complex subject, what we have in master seems to
> > > work, if you play by its rules.  Does this change them?
> >
> > Only if you want it to.
>
> Advantages?
>
> Cheers, Gene Heskett.
> --
> "There are four boxes to be used in defense of liberty:
>  soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author, 1940)
> If we desire respect for the law, we must first make the law respectable.
>  - Louis D. Brandeis
>
>
>
>
>
> _______________________________________________
> Emc-developers mailing list
> Emc-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-developers
>

_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to