Ethercat HAL driver

More
15 Jun 2021 19:41 #212138 by jc2ktr
Replied by jc2ktr on topic Ethercat HAL driver
Hi it´s been a while since i was last online,
but i have not found the time to work on my CNC lately.

I have now changed all my motors and drives at my CNC to EtherCAT Drives from Rexroth.
I had in january/february a functional setup on my Testbench.

After the changes to 3 Drives and reconfig of my Hal.

I am able to Enable all of the drives, but they don´t react on jog comands or MDI comands.
When i try to move the axis by hand the driver´s immediatly corrects the positions.

i upload my config and hal.

maybe someone could take a look at it, if there are some errors maybe.

Thanks a lot.

File Attachment:

File Name: EtherCAT_SOE.ini
File Size:2 KB

File Attachment:

File Name: EtherCAT_SOE.hal
File Size:7 KB

File Attachment:

File Name: ethercat_s...ives.xml
File Size:5 KB

File Attachment:

File Name: postgui_call_list.hal
File Size:0 KB

File Attachment:

File Name: custom_postgui.hal
File Size:0 KB
Attachments:

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

More
15 Jun 2021 20:33 #212141 by thomaseg
Replied by thomaseg on topic Ethercat HAL driver

EL5102 is not yet implemented.

I'm having the "same" issue with EL5112, it's missing from the library... is it possible to "bribe" someone to make it? I'm not clever enough myself :-/

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

More
16 Jun 2021 08:53 #212187 by db1981
Replied by db1981 on topic Ethercat HAL driver
hello,

EL5102 and EL5112 are lieing next to me on the desk....
I need them for one of the next projects, i estimat i will do the drivers in the last week of june.
The following user(s) said Thank You: besriworld, thomaseg

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

More
20 Jun 2021 05:31 #212462 by Masa
Replied by Masa on topic Ethercat HAL driver
I connect the encoder Z phase signal from the servo driver to the lacth input using a signal conversion circuit, but the HAL Pin connection fails.
net home-index-enable joint.0.index-enable lcec.0.1.enc-0-latch-ext-valid
error:
Signal'home-index-enable' can not add OUT pin'lcec.0.1.enc-0-latch-ext-valid', it already has I / O pin'joint.0.index-enable'

No change in the signal is felt when observing with the Halscope. When I connected it to the gate instead of the latch, I was able to see the change in the signal on the Hal Watch. However, I am having trouble connecting the Hal Pin with the same error.

Am I doing something wrong?

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

More
20 Jun 2021 09:00 #212468 by db1981
Replied by db1981 on topic Ethercat HAL driver
hello,

for homing you have to connect the joint.X.index-enable pin to enc-0-index-ext-pos-enable or neg-enable pin (homing at pos/neg edge of the latch input).

The latch-ext-valid pin is only the return for an real latch mesaurement function.
The following user(s) said Thank You: Masa

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

More
20 Jun 2021 09:18 #212470 by db1981
Replied by db1981 on topic Ethercat HAL driver
hello,

theres an bug in your hal file.

Move the line "addf lcec.write-all servo-thread" at the last position of the addf's, after your line "addf conv-float-s32.7 servo-thread ".
at the moment your are constantly writing zero to the drives, because you are sending the output (write-all) before you are doing scaling and calculations.

And you have to move all convertions that are related to inputs (feedback) between
lcec-read and motion, otherwise motion reads zero or old values to.


-addf lcec.read-all
-addf input conversions....
-addf motion, pids, classic ladder...
-addf output conversions....
-addf lcec.write-all (the last)

all modules are called in every cycle in the order you have placed addf in the hal.

read this answer again: forum.linuxcnc.org/24-hal-components/223...er?start=1140#199443

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

More
20 Jun 2021 09:34 #212472 by Masa
Replied by Masa on topic Ethercat HAL driver
Hi
I seem to have misunderstood. Homing seems to be successful. Since the operation is different from what you want, we will set it while trying the difference in parameters.
Thank you.

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

More
20 Jun 2021 10:43 #212474 by db1981
Replied by db1981 on topic Ethercat HAL driver
if it not works like expected, you have to set the parameter 8060:02 (Enable enc reset at latch) to true in the em7004 modul.

I cant remeber about that at the moment, it has been to long ago.
The following user(s) said Thank You: Masa

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

More
20 Jun 2021 14:14 #212486 by Masa
Replied by Masa on topic Ethercat HAL driver
Hi
The difference from the expected behavior is the behavior pattern of homing, not the behavior of em7004. Homing is working with the description of hal you pointed out. I want to reproduce the FANUC homing that is often done on Japanese machines, so I will devise the settings of linuxcnc.
Thanks for any further advice.

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

More
21 Jun 2021 12:11 #212551 by jc2ktr
Replied by jc2ktr on topic Ethercat HAL driver

hello,

theres an bug in your hal file.

Move the line "addf lcec.write-all servo-thread" at the last position of the addf's, after your line "addf conv-float-s32.7 servo-thread ".
at the moment your are constantly writing zero to the drives, because you are sending the output (write-all) before you are doing scaling and calculations.

And you have to move all convertions that are related to inputs (feedback) between
lcec-read and motion, otherwise motion reads zero or old values to.

-addf lcec.read-all
-addf input conversions....
-addf motion, pids, classic ladder...
-addf output conversions....
-addf lcec.write-all (the last)

all modules are called in every cycle in the order you have placed addf in the hal.

read this answer again: forum.linuxcnc.org/24-hal-components/223...er?start=1140#199443


Thanks, i wasn´t aware that this is also neccesary for conversion and scaling :)

My biggest issue was that my "S-0-0001 TNcyc" cycle time in my Rexroth drives were still 2000us :)
After setting it to 1000us i was able to jog the axis around ;)

I´ve edited my hal would you please take a look again if it is ok so?

File Attachment:

File Name: EtherCAT_SOE1.hal
File Size:7 KB
Attachments:

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

Time to create page: 0.284 seconds
Powered by Kunena Forum