- Posts: 118
- Thank you received: 0
HAL CiA402 Drive Interface for Can Bus,Ethercat etc...
- sqmathlete
- Offline
- Premium Member
-
Please Log in to join the conversation.
- sqmathlete
- Offline
- Premium Member
-
- Posts: 118
- Thank you received: 0
Please Log in to join the conversation.
- tommylight
-
- Away
- Administrator
-
- Posts: 22008
- Thank you received: 3
Please Log in to join the conversation.
- sqmathlete
- Offline
- Premium Member
-
- Posts: 118
- Thank you received: 0
Please Log in to join the conversation.
To install linuxcnc on Bullseye, follow the instructions here
www.qtpyvcp.com/install/bullseye.html
You can upgrade to unstable and then install linuxcnc from the Debian repos but to upgrade master branch from the snapshot given to Debian, you need to compile from source, so you might as well go this way.
I did explain how to use unstable here (but it is untested):
forum.linuxcnc.org/9-installing-linuxcnc...ling-linuxcnc#237671
The traditional method of ec-debianize will not work on Bullseye as it relies on a now obsolete mercurial repository, IgH moved to using gitlab and life is now simple!! They have an unofficial repository that lets you use apt install to install etherlabmaster
I have documented the process here (now a sticky in the ethercat section):
forum.linuxcnc.org/ethercat/45336-etherc...-how-to-step-by-step
I think I will add another post in response to your homing questions.
My website is www.vmn.com.au/
The using contact us page will get to me in the absence of PM's
Please Log in to join the conversation.
I watched your video. I put a fair bit of effort to try and get Dominc's cia402.comp to home my drives but in the end I gave up and reverted to the linuxcnc way. I don't think its possible to home without modifying homing.c as the LCNC velocities seem to override the internal ones.
What Dominc has provided though is a way to eliminate using M codes to change modes by tying the mode changes with a home to index signal.
I did have one go at changing homing.c in a branch called rodw-home-external on my fork of linuxcnc here
github.com/rodw-au/linuxcnc/tree/rodw-home-external
My thought was to add a new flag to homing configuration called HOME_EXTERNAL that bypassed all of the stuff linuxcnc does in homing.c until homing is completed except all the homing offsets etc. To do this I modified the bitmap in homing.h
github.com/rodw-au/linuxcnc/blob/rodw-ho.../emc/motion/homing.h
Then in homing.c, I jump down the homing sequence_state if this flag is set.
github.com/rodw-au/linuxcnc/blob/0ae7bb1...motion/homing.c#L628
I might add, I had to dig deep to remember how bitmaps worked!
I would be interested in looking at your changes to homing.c and homing.h
I think with some extension to dominc's component and similar modifications to homing.c I did, this could be solved quite neatly.
To contribute to linuxcnc code, you need to learn how to use github. I am an absolute novice. Create an account, fork linuxcnc, create a new branch in your repo, clone your repo to your PC, add your changes in and push back to your repo. Then you can create a pull request to linuxcnc.
With regards to incorporating ethercat into linuxcnc, there are some licensing issues preventing some of it. Now there is a repo for etherlabmaster, I would like to See sittner's hal driver turned into a deb file. I don't think that would be too hard to do. IgH's new repo clearly states it is open source so I see no reason why that deb file written by linuxcnc (eg based on sittner's work) could not be included in the debian repos in the same way mesaflash is.
Anyway, please contact me via my website as suggested in the last post.
Please Log in to join the conversation.
- sqmathlete
- Offline
- Premium Member
-
- Posts: 118
- Thank you received: 0
My apologies for not responding earlier, work interrupted. That being said, I have managed to create my own fork but I was having difficulty getting an rip version to build in Bookworm and I think that ethercat master doesn't play well the 5.16 Kernel. Doing a fresh install of Bullseye
as we speak.
I would agree with this. The code that controls homing is spread around 10 or so files. Not much editing/addition is required but it is quite a tangled web.I don't think its possible to home without modifying homing.c as the LCNC velocities seem to override the internal ones.
That's basically what is required. You create the variable HOME_EXTERNAL or in my HOME_AUTO =1 for the .ini file then you can use that to set a bit (that you have created), then in the homing file LinuxCNC knows to ignore the error during homing. It may not be that elegant but it works.My thought was to add a new flag to homing configuration called HOME_EXTERNAL that bypassed all of the stuff linuxcnc does in homing.c until homing is completed except all the homing offsets etc. To do this I modified the bitmap in homing.h
Then in homing.c, I jump down the homing sequence_state if this flag is set.
I might add, I had to dig deep to remember how bitmaps worked!
I will have to have a look at this. A comp file that handles the mode switching and brake at the appropriate time would be nice. Might even be able to delete a few rungs on the ladder.What Dominc has provided though is a way to eliminate using M codes to change modes by tying the mode changes with a home to index signal.
Will let you know when I get the changes uploaded to my fork. I'm going to clean them up a bit, there is a lot of stuff left over from previous attempts that may be confusing.
Kind regards,
Dan
Please Log in to join the conversation.
I documented how to do this in this thread which is now a sticky in the ethercat section.
forum.linuxcnc.org/ethercat/45336-etherc...-how-to-step-by-step
I was able to install bullseye, change the sources.list to point to unstable, upgrade Bullseye to testing, Install lcnc and Ethercat without compiling any code (except the hal driver)
Try this:
Then
Please Log in to join the conversation.
Please Log in to join the conversation.
oops, the second block of code should start with sudo not udo
Actually, sometimes, ethercat gets confused with the kernel versions so with preempt_rt running replace the first line with
This will install the correct headers.
Please Log in to join the conversation.
