Ethercat HAL driver

More
10 years 3 months ago #77429 by zerix
Replied by zerix on topic Ethercat HAL driver

sirop wrote:

zerix wrote: Servo invertores uses usual ethernet cable. Error LEDs don't blink or switch on.
Command "ethercat slaves" does nothing. it seems like:
#ethercat slaves
#
And nothing more.


Sometime IN and OUT ports of an EtherCAT drive are mixed up,
see page 11 of www.delta.com.tw/product/em/motion/motio...E_UM_EN_20150430.pdf .
Did you also follow Chapter 2 of the user manual?

You might try look through dmesg output... Nothing else comes to my mind.

what should i see? when use
Code:
dmesg output
i saw many strings. and find two strings, in that written "ethercat master 1.5.2..." and "master waiting devices..."

Please Log in to join the conversation.

More
10 years 3 months ago #77475 by Roger
Replied by Roger on topic Ethercat HAL driver
Thought I better report we had some success a some weeks ago :) Ver happy to report the motors now run via linuxcnc.

But perhaps you can try it with EOE.
You have a running EtherCAT Master and the possibility to connect via IndraWorks over EOE. Then you have the possibility to get more information via the gui.


Thanks that was a very good idea. I was able to replicate the problem using TwinCat instead of linuxcnc - in Free run/Config mode, not in Run mode - and monitoring with IndraWorks over EoE.
The two key points:


The first problem was I was using the wrong position register for the positioning mode.
The other problem with our linuxcnc config was the NC cycle time TwinCat was using was not the same as the value we extracted from the xml file as per the tutorial. Once I realised that difference the remaining issues were reasonably straightforward to solve.
The issue in my previous post turned out to be a red herring.

Thanks for your help Andreas

Please Log in to join the conversation.

More
10 years 3 months ago #77480 by zerix
Replied by zerix on topic Ethercat HAL driver

sirop wrote:

zerix wrote: Servo invertores uses usual ethernet cable. Error LEDs don't blink or switch on.
Command "ethercat slaves" does nothing. it seems like:
#ethercat slaves
#
And nothing more.


Sometime IN and OUT ports of an EtherCAT drive are mixed up,
see page 11 of www.delta.com.tw/product/em/motion/motio...E_UM_EN_20150430.pdf .
Did you also follow Chapter 2 of the user manual?

You might try look through dmesg output... Nothing else comes to my mind.

I found problem. ethernet-port haven't contact. i put paper in port and now i can see device. But now I am having other problem. when I write
Code:
ethercat upload -t int8 0x6061 0
it is showing me
Code:
Failed to upload SDO: input/output error

Please Log in to join the conversation.

More
10 years 3 months ago #77486 by sirop
Replied by sirop on topic Ethercat HAL driver

zerix wrote: I found problem. ethernet-port haven't contact. i put paper in port and now i can see device. But now I am having other problem. when I write

Code:
ethercat upload -t int8 0x6061 0
it is showing me
Code:
Failed to upload SDO: input/output error


In my case:
Code:
$ ethercat upload -p1 -t int8 0x6061 0 0x08 8

So your line without position argument would work if the master sees only 1 slave on the network.

Please Log in to join the conversation.

More
10 years 3 months ago #77681 by kehaar
Replied by kehaar on topic Ethercat HAL driver
Hello, everyone! Thank you for sharing your knowledge on this topic. I am a newbie in LinuxCNC and I managed to control Yaskawa servo drives through EtherCAT by following your advices!
Now I have an Ethernet device, and I have bought a Beckhoff EOE port switch, EL6601, for my system to communicate with this Ethernet device through EtherCAT. I believe that I need to write a driver for EL6601 to enable the communication. May I know how to write this driver? Is there any documents or other information I can refer to?
Thank you!

Please Log in to join the conversation.

More
10 years 3 months ago #77694 by sirop
Replied by sirop on topic Ethercat HAL driver

kehaar wrote: Hello, everyone! Thank you for sharing your knowledge on this topic. I am a newbie in LinuxCNC and I managed to control Yaskawa servo drives through EtherCAT by following your advices!
Now I have an Ethernet device, and I have bought a Beckhoff EOE port switch, EL6601, for my system to communicate with this Ethernet device through EtherCAT. I believe that I need to write a driver for EL6601 to enable the communication. May I know how to write this driver? Is there any documents or other information I can refer to?
Thank you!


If you download the source code of the IgH EtherCAT-Master, you can run Doxygen over it.
It seems to me from the Doxygen output of eoe_request.c that you can run EoE only as a kernel space application,
so in principle it should be possible on RTAI to build such a kernel space component.

If you are on rt-preempt, then it might be worth having a look at userspace port of the IgH EtherCAT-Master
fh-soft.de/src/ethercat-userspace.html .

Please Log in to join the conversation.

More
10 years 3 months ago #77758 by zerix
Replied by zerix on topic Ethercat HAL driver

sirop wrote:

zerix wrote: I found problem. ethernet-port haven't contact. i put paper in port and now i can see device. But now I am having other problem. when I write

Code:
ethercat upload -t int8 0x6061 0
it is showing me
Code:
Failed to upload SDO: input/output error


In my case:
Code:
$ ethercat upload -p1 -t int8 0x6061 0 0x08 8

So your line without position argument would work if the master sees only 1 slave on the network.


I have two servo. and one servo works normal. but second servo doesn't can work with ethercat. Green LED blinks, but orange LED doesn't blink or switch on. Can you also help me with command
Code:
ethercat reg_read
? i dont understand what i should write. when i wrote
Code:
ethercat reg_read -t int8 0x040e 1
it shows me
Code:
Failed to read register: Input/output error
when i wrote
Code:
ethercat reg_read -t int16 0x040e 1
it shows me last error again.

Please Log in to join the conversation.

More
10 years 3 months ago #77761 by sirop
Replied by sirop on topic Ethercat HAL driver

zerix wrote: I have two servo. and one servo works normal. but second servo doesn't can work with ethercat. Green LED blinks, but orange LED doesn't blink or switch on. Can you also help me with command

Code:
ethercat reg_read
? i dont understand what i should write. when i wrote
Code:
ethercat reg_read -t int8 0x040e 1
it shows me
Code:
Failed to read register: Input/output error
when i wrote
Code:
ethercat reg_read -t int16 0x040e 1
it shows me last error again.


1. Please always use a position argument to avoid confusion as one cannot know if you have only 1 or more slaves on the
EtherCAT network.

2. You mentioned some hardware problems like loose contacts on the NIC ports.
So first do
Code:
ethercat slaves
just to know if the master can really see all slaves.

3.
Code:
ethercat reg_read [OPTIONS] <ADDRESS> [SIZE]
so your command should be either
Code:
ethercat reg_read -p$SLAVEPOSITION -t int8 0x040e 1
or
Code:
ethercat reg_read -p$SLAVEPOSITION -t int16 0x040e 2
But what is 0x40e register about? Never seen it...

As for LED indicators of the slave's states - rather consult the manual.

Please Log in to join the conversation.

More
10 years 3 months ago #77967 by kehaar
Replied by kehaar on topic Ethercat HAL driver
Thank you for your reply!

Currently, apart from EL6601(Ethernet switch port from Beckhoff), I still have several EtherCAT devices to control simultaneously. Previously, I have written a HAL driver for EL3008, an 8 channel analog input I/Os from Beckhoff. However, I do not have any clue and experience in writing one for the EL6601, do you have any advice in writing an EtherCAT HAL driver for EL6601 under the LinuxCNC environment?

Thank you for your time !

Please Log in to join the conversation.

More
10 years 3 months ago #77968 by sirop
Replied by sirop on topic Ethercat HAL driver

kehaar wrote: Thank you for your reply!

Currently, apart from EL6601(Ethernet switch port from Beckhoff), I still have several EtherCAT devices to control simultaneously. Previously, I have written a HAL driver for EL3008, an 8 channel analog input I/Os from Beckhoff. However, I do not have any clue and experience in writing one for the EL6601, do you have any advice in writing an EtherCAT HAL driver for EL6601 under the LinuxCNC environment?

Thank you for your time !


First of all, it is worth looking at this docs patch:
sourceforge.net/p/etherlabmaster/code/ci...d87dcbc43fd04cffbea/

I cannot tell you more as I never used EoE functions of IgH EtherCAT-Master .
Besides this EL6601 manual makes a difference between Real-time data exchange and Non-real-time data exchange.
Non-real-time data exchange is the actual EoE.

So I would begin with standalone app just to learn how to "speak" with this slave either in real time or acyclic in terms of EL66601 manual.

Please Log in to join the conversation.

Time to create page: 0.221 seconds
Powered by Kunena Forum