How: Add more (Beckhoff) devices to EtherCAT HAL driver?
21 Nov 2016 23:02 - 22 Nov 2016 18:57 #83101
by jerryCNC
How: Add more (Beckhoff) devices to EtherCAT HAL driver? was created by jerryCNC
I am thinking to add support for more (Beckhoff) devices to EtherCAT HAL driver. For example:
* AX5000
I have studied template files based on: github.com/sittner/linuxcnc-ethercat/tree/master/src
* lcec_el7342.h/.c
* lcec_el7041_1000.h/.c
* lcec_em7004.h/.c
I found that:
* Most of HAL pins come from PDO objects as stated in (Beckhoff) device manual.
* But there are some mysterious HAL pins, such as:
--- hd->reset; hd->raw-count; hd->set_raw_count, etc.
Anybody got hints on these pins?
Thanks!
* AX5000
I have studied template files based on: github.com/sittner/linuxcnc-ethercat/tree/master/src
* lcec_el7342.h/.c
* lcec_el7041_1000.h/.c
* lcec_em7004.h/.c
I found that:
* Most of HAL pins come from PDO objects as stated in (Beckhoff) device manual.
* But there are some mysterious HAL pins, such as:
--- hd->reset; hd->raw-count; hd->set_raw_count, etc.
Anybody got hints on these pins?
Thanks!
Last edit: 22 Nov 2016 18:57 by jerryCNC.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19209
- Thank you received: 6438
27 Nov 2016 18:19 #83374
by tommylight
Replied by tommylight on topic How: Add more (Beckhoff) devices to EtherCAT HAL driver?
www.google.com/#q=ethercat+site:linuxcnc.org
Have a read through this, hope it helps.
I have no experience with Beckhoff devices, but i am thinking of ordering some to play with.
Have a read through this, hope it helps.
I have no experience with Beckhoff devices, but i am thinking of ordering some to play with.
Please Log in or Create an account to join the conversation.
30 Nov 2016 21:32 #83507
by jerryCNC
Replied by jerryCNC on topic How: Add more (Beckhoff) devices to EtherCAT HAL driver?
Thanks, but still got no clue:
* I am basically confused how the HAL pins are defined for servo drive? based on ESI files?
* I am basically confused how the HAL pins are defined for servo drive? based on ESI files?
Please Log in or Create an account to join the conversation.
20 Feb 2017 00:22 #88313
by wrightsh
Replied by wrightsh on topic How: Add more (Beckhoff) devices to EtherCAT HAL driver?
Have you made any progress with this? I need to figure out how to add a EL3064 and a EL2624, but I'm not sure where I can find some of the needed info. For instance in lcec_30x4.h there's a line:
#define LCEC_EL3162_PID 0x0C5A3052
where is the "0x0C5A3052" from?
Thanks!
#define LCEC_EL3162_PID 0x0C5A3052
where is the "0x0C5A3052" from?
Thanks!
Please Log in or Create an account to join the conversation.
20 Feb 2017 15:38 #88353
by jerryCNC
Replied by jerryCNC on topic How: Add more (Beckhoff) devices to EtherCAT HAL driver?
"0x0C5A3052" comes from the EtherCAT Slave Information file (ESI, *.xml), which you can download from Beckhoff website.
The following user(s) said Thank You: superbird688
Please Log in or Create an account to join the conversation.
26 Feb 2017 01:43 #88625
by wrightsh
Replied by wrightsh on topic How: Add more (Beckhoff) devices to EtherCAT HAL driver?
Thanks! Somehow I managed to miss that xml file when going through Beckhoffs site, I figured the definitions for a slice would be under the slices page, not the EK1100. Anyways I got a EL3062, EL3064 and EL2624 added without too much trouble. github.com/wrightsh/linuxcnc-ethercat
Please Log in or Create an account to join the conversation.
02 Jul 2020 13:40 #173415
by charly
Replied by charly on topic How: Add more (Beckhoff) devices to EtherCAT HAL driver?
I have my ethercat master running
I have the linuxcnc 2.9 compiled and running
but i don't understand how add ethercat-hal driver support to connect both part
The publishing on github.com/wrightsh/linuxcnc-ethercat must be added to ethercat master or linuxcnc and compiled
Thanks
I have the linuxcnc 2.9 compiled and running
but i don't understand how add ethercat-hal driver support to connect both part
The publishing on github.com/wrightsh/linuxcnc-ethercat must be added to ethercat master or linuxcnc and compiled
Thanks
Please Log in or Create an account to join the conversation.
03 Jul 2020 21:34 #173554
by Grotius
Replied by Grotius on topic How: Add more (Beckhoff) devices to EtherCAT HAL driver?
@Wrightsh,
#define LCEC_EL3162_PID 0x0C5A3052
The adres or id 0x0C5A3052 is given a easyer name by the command #define into LCEC_EL3162
Both names will work anyway when a define is done.
another example : #define PI 3.14
now you can type "double result=PI*2;"
@Jerry,
* I am basically confused how the HAL pins are defined for servo drive? based on ESI files?
Maybe look in the lcec code.
@Charly,
The publishing on github.com/wrightsh/linuxcnc-ethercat must be added to ethercat master or linuxcnc and compiled
Thanks
It is something for the near future to make a debian 9 or 10 iso 64 bit. Including a working linuxcnc and ethercat.
A good idea is to have a additional ethercat driver download site. Now custom ethercat drivers are spreaded everywhere.
#define LCEC_EL3162_PID 0x0C5A3052
The adres or id 0x0C5A3052 is given a easyer name by the command #define into LCEC_EL3162
Both names will work anyway when a define is done.
another example : #define PI 3.14
now you can type "double result=PI*2;"
@Jerry,
* I am basically confused how the HAL pins are defined for servo drive? based on ESI files?
Maybe look in the lcec code.
@Charly,
The publishing on github.com/wrightsh/linuxcnc-ethercat must be added to ethercat master or linuxcnc and compiled
Thanks
It is something for the near future to make a debian 9 or 10 iso 64 bit. Including a working linuxcnc and ethercat.
A good idea is to have a additional ethercat driver download site. Now custom ethercat drivers are spreaded everywhere.
Please Log in or Create an account to join the conversation.
22 Apr 2021 11:53 #206783
by Stormholt
Replied by Stormholt on topic How: Add more (Beckhoff) devices to EtherCAT HAL driver?
I am attempting to write a driver for the EL6021,
I have read couple of drivers, but cant quite understand how to decide which entries to use LCEC_PDO_INIT() on in the init function.
As far as i can read it is for the entries that are not a full byte in size, but i am unsure. Can anyone explain this to me ?
Thank you in advance
Stormholt
I have read couple of drivers, but cant quite understand how to decide which entries to use LCEC_PDO_INIT() on in the init function.
As far as i can read it is for the entries that are not a full byte in size, but i am unsure. Can anyone explain this to me ?
Thank you in advance
Stormholt
Please Log in or Create an account to join the conversation.
23 Apr 2021 23:59 - 24 Apr 2021 00:02 #206902
by Grotius
Replied by Grotius on topic How: Add more (Beckhoff) devices to EtherCAT HAL driver?
Hi Stormhold,
When i compare all the lcec_pdo_init's(..) of the project, i think you can maybe quess what the entry should look like.
I don't know anything about the el6021. There is some online documentation with details.
Attached some pictures, maybe it help's you.
The pdo init is to tell something about the product, the vendor, the index etc. In lcec.h :
P.s i remember the command : "ethercat cstruct" gives this kind of info from the online slaves.
When i compare all the lcec_pdo_init's(..) of the project, i think you can maybe quess what the entry should look like.
I don't know anything about the el6021. There is some online documentation with details.
Attached some pictures, maybe it help's you.
The pdo init is to tell something about the product, the vendor, the index etc. In lcec.h :
// pdo macros
#define LCEC_PDO_INIT(pdo, pos, vid, pid, idx, sidx, off, bpos) \
do { \
pdo->position = pos; \
pdo->vendor_id = vid; \
pdo->product_code = pid; \
pdo->index = idx; \
pdo->subindex = sidx; \
pdo->offset = off; \
pdo->bit_position = bpos; \
pdo++; \
} while (0); \
P.s i remember the command : "ethercat cstruct" gives this kind of info from the online slaves.
Last edit: 24 Apr 2021 00:02 by Grotius.
Please Log in or Create an account to join the conversation.
Time to create page: 0.084 seconds