Ethercat HAL driver

More
8 years 7 months ago #107970 by sqmathlete
Replied by sqmathlete on topic Ethercat HAL driver
@Chris B

Just a thought...what type of cables are you using to chain the servo's and the EK1100 Bus Coupler? Patch or Crossover?

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

More
8 years 7 months ago - 8 years 7 months ago #108094 by ChrisB
Replied by ChrisB on topic Ethercat HAL driver
Hi
i use Patchcables.
Now i solved the problem more ore less. i changed the networkcard. i used the 8169 chip and now i use the 8193c with the 8139too kernel driver. I read that some people had problems with the 8169 chip.
Now the slaves are found by the cmd-ethercat-tool in any combination.

But up to now i am very close to get it running.
With a small sync problem oder config problem.
But i can't find the mistake.

When i start linuxcnc my kollmorgen S300 has an errror. F29 invalid ECAT actual-value mapping length
So it seems to be a problem with my xml config.
I attach my config and the output of the cmd tool and my hal and ini file. And the pdos output

And how can i config the dcsync?


The IO's work well
0 0:0 OP + EK1100 EtherCAT Coupler (2A E-Bus)
1 0:1 OP + EL1018 8Ch. Dig. Input 24V, 10�s
2 0:2 OP + EL1018 8Ch. Dig. Input 24V, 10�s
3 0:3 OP + EL1018 8Ch. Dig. Input 24V, 10�s
4 0:4 OP + EL2008 8Ch. Dig. Output 24V, 0.5A
5 0:5 OP + EL2008 8Ch. Dig. Output 24V, 0.5A
6 0:6 PREOP E S700 EtherCAT Drive (CoE)
Last edit: 8 years 7 months ago by ChrisB.

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

More
8 years 7 months ago #108099 by sirop
Replied by sirop on topic Ethercat HAL driver

ChrisB wrote: Hi
i use Patchcables.


When i start linuxcnc my kollmorgen S300 has an errror. F29 invalid ECAT actual-value mapping length
So it seems to be a problem with my xml config.
I attach my config and the output of the cmd tool and my hal and ini file. And the pdos output

Code:
<pdoEntry idx="6040" subIdx="0" bitLen="16" halPin="Control_word" halType="bit"/>
and
Code:
<pdoEntry idx="6041" subIdx="0" bitLen="16" halPin="Status word" halType="bit"/>
So in both cases you map 16 bit pdoEntry to halType="bit" . Does this make sense?

I would use smth. like halType="u32" for control and status word, or if you need bitwise operation on control and status word,
then use halType="complex" as in github.com/sittner/linuxcnc-ethercat/blo...ercat-conf_X.xml#L98 .

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

More
8 years 7 months ago #108107 by sqmathlete
Replied by sqmathlete on topic Ethercat HAL driver
@ChrisB

I went through a similar issue a while back in this thread. My understanding is that if you see the slave in the PREOP state then you are able to communicate with the slave. I think that the problem is that you have not changed the amplifier control word (in hex) from
0x06 =>0x07=>0x0F,(in that order) i.e. you have not followed the 402 protocol to change the "state" to OP.
Try:
in xml file
define the control word

use halType="complex" as in github.com/sittner/linuxcnc-ethercat/blo...ercat-conf_X.xml#L98 .


define the status word as u32 or complex depending on what you want to do with it

in hal
halcmd setp SwitchOn 1
halcmd setp EnableVoltage 1
net quickstop QuickStop => connected to estop chain via classicladder
net enable enableop => some pin that you can control with classicladder or linuxcnc enable pin

If you look at Sittner's hal file, he does it a little differently but I think the amp should switch to the OP state either way.

Regards,
Dan
The following user(s) said Thank You: Nico2017

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

More
8 years 6 months ago - 8 years 6 months ago #108251 by Ilya
Replied by Ilya on topic Ethercat HAL driver
Hello all

I installed your driver using deb repo.modusoft.de/linuxcnc/wheezy ./
My problem is running the program using "loadrt lcec" in the hal file.
I getting that:
Error: could not insert module /usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/lcec.ko: Unknown symbol in module
I know little about this and I hope for Your help. Would you mind pointing me in the right direction?

regards
ilya
__________________________________________
decided
I used a RTAi, whereas it was necessary to use RT-PREEMPT
Last edit: 8 years 6 months ago by Ilya.

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

More
8 years 6 months ago - 8 years 6 months ago #109007 by ChrisB
Replied by ChrisB on topic Ethercat HAL driver
Thank you for your help.
i cant figure out the problem.
Datatype complex makes more sens, but this is not the problem.

i have two scenarios.
the first one is, if i use configpdos = false
Then linuxcnc does not stars and the debuginfo says failed to set safeop. 0x0017 invalid sync manager configuration.

The other one is configpdos = true
then the drives gets an error F29 invalid ECAT command-value mapping length.

can you imagine what the problem is?
Tanks
Last edit: 8 years 6 months ago by ChrisB.

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

Time to create page: 0.238 seconds
Powered by Kunena Forum