New LinuxCNC-Ethercat git tree
- scottlaird
- Topic Author
- Offline
- Premium Member
- Posts: 136
- Thank you received: 155
A few changes compared to the current sittner tree:
- There's an auto-generated list of supported devices: github.com/linuxcnc-ethercat/linuxcnc-et...mentation/DEVICES.md
- Device driver code has been moved from src/ into src/devices, and there is no longer a need to edit lcec_main.c, lcec_conf.h, lcec_conf.c, or Kbuild. Just drop properly-configured code into src/devices and it'll build automatically. This should make new module distribution via this forum less work.
- Drivers for several additional devices have been added. In addition to all of the pending PRs from the old repo, I've added (currently mostly untested) support for ~all of the EL3[01]xx analog input devices.
- There's a Github release and testing process, so at least we can't commit code that doesn't build. I'm working on getting Debian packages build automatically, but that's kind of a pain right now.
At this point, I'd love people to do a few things:
- Test out the new tree, especially the new EL3xxx code, and let me know what works and what doesn't.
- Submit bug reports against the new tree.
- Send new drivers, bug fixes, and documentation updates.
- Send updates to the device list , especially updating notes and testing status. If you're using devices and they work, then let's update the doc to say so.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
- Posts: 19188
- Thank you received: 6429
Please Log in or Create an account to join the conversation.
If you download and install the Linuxcnc 2.9.2 iso from the downloads page linuxcnc.org/downloads/ all you need to do is to
sudo apt update
sudo apt install ethercat-master libethercat-dev linuxcnc-ethercat
Then follow the normal ethercat steps documented in this sticky here
www.forum.linuxcnc.org/ethercat/45336-et...-how-to-step-by-step
There is a very brief description (readme.md) deployed to your home folder by the linuxcnc ISO installer
Please Log in or Create an account to join the conversation.
Can we have a look at the halType=float for the generic driver? It's less than ideal today.
As it is today, lcec does a type conversion between ethercat datatype dint (int32) and hal's float (64-bit), so conversion between integer to float on bit level.
When I actually send a float through ethercat (real), it comes out wrong from lcec. This has been adressed by the halType=float-ieee, and another one halType=float-unsigned (I think it was).
I'm making my own ethercat device and want to send a double (64-bit float) because it has better range, 14-15 digits, and float in hal is 64-bits (since LCNC 2.5 or so). Just normal C/C++ "double" datatype, ethercat datatype lreal.
And that can not be done today, it isn't possible to get 64-bit variables through lcec.
I see two ways.
The quick solution is to add a halType=float-double along the lines of float-ieee.
A more general way, which might raise other questions, is to acknowledge the data conversion aspect of the lcec generic driver and add something like ethercatType=lreal in the config line. Then lcec will read the ethercat data as a lreal (64-bit float) and convert it into the requested halType. It's my understanding that there is no info on datatypes in the ethercat data stream, only the data sizes, otherwise one should have used that to identify what comes in via ethercat, and how it should be sent out.
Please Log in or Create an account to join the conversation.
On a closer read, it looks like all you need to do isI'm happy to announce that Sascha Ittner's linuxcnc-ethercat package is now
available in our Debian 12 repository at build.opensuse.org/project/
show/science:EtherLab . Yesterday we hat a very interesting call with Sascha,
he was fine that we distribute his package.
Now, linuxcnc users only have to add our debian repository to their machines,
like you explained in the forum post, and install linuxcnc-ethercat which
automatically installs the ethercat master too.
sudo apt update
sudo apt install linuxcnc-ethercat
I'm just not sure where you would send PRs for new drivers. Perhaps here somewhere?
build.opensuse.org/package/show/science:...ab/linuxcnc-ethercat
Please Log in or Create an account to join the conversation.
- scottlaird
- Topic Author
- Offline
- Premium Member
- Posts: 136
- Thank you received: 155
Please Log in or Create an account to join the conversation.
- scottlaird
- Topic Author
- Offline
- Premium Member
- Posts: 136
- Thank you received: 155
I'm trying to fix that end of things.
Please Log in or Create an account to join the conversation.
- scottlaird
- Topic Author
- Offline
- Premium Member
- Posts: 136
- Thank you received: 155
Please Log in or Create an account to join the conversation.
I appreciate that you organize this. There is a need for drivers for many devices. One can try with the lcec_generic driver but one can only do so much and can end up with things in hal that shouldn't be there.
Please Log in or Create an account to join the conversation.
- scottlaird
- Topic Author
- Offline
- Premium Member
- Posts: 136
- Thank you received: 155
Here's a draft PR that *should* implement this, although I don't really have hardware to test it against right now.
github.com/linuxcnc-ethercat/linuxcnc-ethercat/pull/116
It won't patch cleanly into anyone else's tree because (a) lcec_generic.c has changed directories in my tree and (b) this includes the other float fix, but other than that it should be straightforward enough to patch.
Please Log in or Create an account to join the conversation.