Ethercat installation summary

More
06 Jan 2022 10:23 #230932 by rodw
Replied by rodw on topic Ethercat installation summary
Actually I am wrong. it does change to opmode=6 on a home all but the position changes and motors do not move so a following error happens. I'm still working on understanding this.

When home is set true by index-enable, should it stay true for all of the homing sequence? I would have thought it should be reset to 0 and then set true when homed. I just don't understand indexes enough.

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

More
06 Jan 2022 11:44 #230944 by db1981
the home pin from the cia component soult stay true , while the complete homing seqeunze.

but you are right, the comps does not wait for an acknowldege of op mode changing... but this has not been an error with my test drives.

you can try changing this :

// mode Home and start homing
if (home) {
opmode = OPMODE_HOMING;
controlword |= (home << 4);
}

to: // mode Home and start homing
if (home) {
opmode = OPMODE_HOMING;
if (opmode_homing) {
controlword |= (home << 4);
}
}

i have no acces to my linux pcs at the moment
The following user(s) said Thank You: rodw

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

More
19 Feb 2022 03:08 #235309 by rodw
Replied by rodw on topic Ethercat installation summary
I thought I better retreat to a thread I own. :)
Today I spent some time playing with stall homing with no success, just lots of  crashes that resulted in following errors and amplifier faults. Maybe I should have used a rubber buffer instead of a hard stop!

So then I installed some homing switches on my machine so I could have a play with the various CIA402  homing methods in my drives.
I did not have any luck with this at all. I am going to revert to Linuxcnc homing and get on with life. It will be accurate enough for me.

I think we really need a new flag in homing.c that bypasses all of the homing states until the drive is homed.
 

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

More
09 Jan 2023 12:59 #261348 by akg1904
Hi,
I tried to install Ethercat in Run-in-place version of LinuxCNC but I am getting an error when I type command "sudo make install" to install the drivers.
all  the commands before "sudo make install" worked fine but it shows following error:

configure.mk:8: *** halcompile/comp executable not found or set.  Stop.
make: *** [Makefile:17: config.mk] Error 2


I search through many threads for solution but the closest I got is here , which to my understanding comp and halcompile does the same work.
But I don't know how to fix it.

Regards
Abhishek

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

More
09 Jan 2023 13:54 #261353 by db1981
don't use sudo.

Use the terminal for the rip install after executing rip-environment, then change to the the linuxcnc-ethercat folder.

- make clean
- make install

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

More
17 Aug 2023 14:59 #278268 by maghis
db1981, thanks for the suggestion (and for the cia402 component).
Waiting for
opmode_homing
before
controlword |= (home << 4)
totally worker, now I can start the drive homing procedure (opening a PR later today).

Now, while the drive is homing, I get a joint follow error from linux cnc because the joint position feedback is moving past the max error.
What is the best way to do this? Ideally I would like linuxcnc to ignore the feedback and wait until the drive is done homing, the set the home offset.
The following user(s) said Thank You: eduard

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

More
17 Aug 2023 17:26 #278282 by rodw
Replied by rodw on topic Ethercat installation summary
The solution here is to modify Dominic's component and set pos_fb=pos_cmd when the drive is homing.
The drive is moving outside linuxcnc's control so it gets confused

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

More
17 Aug 2023 20:11 #278295 by maghis
Thanks for the help Rod! (and for publishing your config)

It feels a little bit dirty to lie to the motion controller like that, but it makes sense.

What else should I change to do the final part of the homing?
I expect the sequence of events to look like this:
- joint.0.index-enable sets cia402.0.home
- the ECT60 starts following the homing procedure and moves to find the edge of the home sensor (specifically I'm using homing mode 22)
- linuxcnc sees that homing is complete and sets the machine coordinates to "HOME_OFFSET" from the ini <-- ???

How do I do the last step? Apologies but I'm completely new to linuxcnc, this is probably a super trivial thing :)

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

More
17 Aug 2023 20:34 - 17 Aug 2023 20:35 #278297 by maghis
Btw, per your suggestion, I added this line in "read_all":
  //home states
  if (opmode_homing) {
    // hack
    pos_fb = pos_cmd;
    stat_homed    = ((statusword >> 10) & 1) && ((statusword >> 12) & 1);
    stat_homing   = !stat_homed && !((statusword >> 10) & 1);
  }
Is that what you were thinking?
Last edit: 17 Aug 2023 20:35 by maghis.

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

More
17 Aug 2023 20:52 #278301 by rodw
Replied by rodw on topic Ethercat installation summary
Yes give that a go.

I could not get Dominic's component working with the ECT drives. Domininc I think homed to index on his drives ad that is not supported o n the ECT.
The solution is to create a custom homecomp linuxcnc.org/docs/2.9/html/man/man9/homecomp.9.html
Have a good loook at homing.c and understand it before you start. BAsically you would skip a lot of steps and once homing is complete on the drive, Linuxcnc shold continue to do all the home offsets etc.

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

Time to create page: 0.239 seconds
Powered by Kunena Forum