Ethercat HAL driver

More
10 years 4 months ago - 10 years 4 months ago #76239 by sirop
Hallo.

Has anybody tried to run a CoE slave at 250 us?

[strike]I found out that the usage of
void ecrt_slave_config_state(const ec_slave_config_t *sc, ec_slave_config_state_t *state)
in github.com/sittner/linuxcnc-ethercat/blo...c_main.c#L1086-L1097
can cause problems....[/strike]

Sorry, it was false alarm, this alleged bug was because of my experimenting with the code.
Last edit: 10 years 4 months ago by sirop. Reason: false alarm

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

More
10 years 4 months ago #76467 by highbiker
Replied by highbiker on topic Ethercat HAL driver
Dear all,
I have got a Problem with the inputs of one slave in my EtherCAT Network. I'm using the Etherlab Master 1.5.2 and the latest lcec driver from the sittner-git.

My Network extends of the following slaves:
Slave 1: Bausano EasyCAT Arduino Shield (32 byte Output, 32 byte Input)
Slave 2: Beckhoff EK1100
Slave 3: Beckhoff EL1008 (1 byte Input)
Slave 4: Beckhoff EL2008 (1 byte Output)

With my configuration linuxcnc starts and everything works exept the Inputs of the EasyCAT Arduino Shield. In Hal-Meter they are always 0.

I tested the Network with the Beckoff EtherCAT Configurator and there the inputs worked. So the EasyCAT Shield must be ok.

my ethercat-conf.xml:
Warning: Spoiler!


The ESI (xml) File of the EasyCAT Shield could be found here:
www.bausano.net/images/arduino-easycat/EasyCAT.xml

while linuxcnc was running i read out the etherlab domain information (ethercat domain -v):
Warning: Spoiler!

The input section of the EasyCAT ist missing and I'm confused about the size of 34. I think i should get 32+32+1+1=66. Are the inputs completely dropped?

In my dmesg output i also find the domain size of 34:
Warning: Spoiler!


What am I doing wrong? I've run out of ideas. Could someone please help me to figure out a solution for my annoying problem.

Thanks and kind regards

Arndt
The following user(s) said Thank You: Nico2017

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

More
10 years 4 months ago #76469 by sirop
Replied by sirop on topic Ethercat HAL driver

highbiker wrote: In my dmesg output i also find the domain size of 34:

Code:
[Do Jun 23 01:58:17 2016] EtherCAT 0: Using slave 0 as DC reference clock.


Seems to have only two Sync Managers:
Code:
<!-- indirizzo fisico di base per gli output --> <Sm StartAddress="#x1000" ControlByte="#x64" Enable="1">Outputs</Sm> <!-- indirizzo fisico di base per gli input --> <Sm StartAddress="#x1200" ControlByte="#x20" Enable="1">Inputs</Sm>
www.bausano.net/images/arduino-easycat/EasyCAT.xml

You use however 4 Sync Managers.

BTW, what is the maximum cycle frequency this EasyCAT Arduino Shield can work with?

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

More
10 years 4 months ago #76474 by highbiker
Replied by highbiker on topic Ethercat HAL driver
Thanks for your fast reply!

The four Sync Managers were just a test. At first I tried only two Sync Managers (0 and 1) with no success.
I don't know the max cycle frequency of the EasyCAT Shield, so I have to ask the manufacturer. But in Beckhoff EtherCAT Configurator it worked with 1ms. In LinuxCNC I also tried a cycle time of 25ms with no success too.

It's a mystery to me, why only the outputs operate. So the communication couldn't be completely wrong.

BTW: is there any way to use the Etherlab Master (Slaves PREOP -> OP and reading Process Data) from Terminal without using the lcec driver, or do I have to write a C-Program?
I would like to test my Network without lcec in order to identify the point of failure.

kind regards

Arndt

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

More
10 years 4 months ago #76476 by sirop
Replied by sirop on topic Ethercat HAL driver

highbiker wrote: Thanks for your fast reply!

The four Sync Managers were just a test. At first I tried only two Sync Managers (0 and 1) with no success.


That's strange as the case of only 2 Sync Managers is allowed by the EtherCAT standard.

It's a mystery to me, why only the outputs operate. So the communication couldn't be completely wrong.


Are you sure that you use the latest linuxcnc-ethercat? This patch github.com/sittner/linuxcnc-ethercat/com...e59d9d70b46cb2c7f3cc solved the parsing problem of complex pins,
so it might help you too.

Do you use this patch github.com/sittner/ec-debianize/blob/mas...ead_pdo_count.dpatch with etherlabmaster-1.5.2 ?

BTW: is there any way to use the Etherlab Master (Slaves PREOP -> OP and reading Process Data) from Terminal without using the lcec driver, or do I have to write a C-Program?
I would like to test my Network without lcec in order to identify the point of failure.


ethercat command line utility can help you read SDOs, not PDOs as those are read and written in a real time cycle.

You can however insert something like rtapi_print_msg at any place of linuxcnc-ethercat for debugging.
The following user(s) said Thank You: highbiker

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

More
10 years 4 months ago #76821 by sirop
Replied by sirop on topic Ethercat HAL driver
@highbiker

I think my first answer was too fast and therefore incomplete.

1. Look, for example, at this line:
Code:
<pdoEntry idx="0005" subIdx="32" bitLen="8" halPin="out-31" halType="u32"/>
Not only idx , but also subIdx is meant to be hexadecimal, compare github.com/sittner/linuxcnc-ethercat/blo...ex/ethercat-conf.xml .

2. This Arduino slave has no DC functionality, however, this is the first slave on the physical ring in your case,
that's why it is chosen per default to be

[Do Jun 23 01:58:17 2016] EtherCAT 0: Using slave 0 as DC reference clock.


So rearrange your slaves so that this Arduino slave without DC is not slave 0 .
The following user(s) said Thank You: highbiker

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

Time to create page: 5.497 seconds
Powered by Kunena Forum