Ethercat HAL driver

More
16 Mar 2021 20:43 #202514 by jc2ktr
Replied by jc2ktr on topic Ethercat HAL driver

Gut ist schon mal das der EoE Port auch wirklich die eingestellte Adresse vom Regler bekommt, dann läuft auf der Seite schon mal alles.
Ist die Adresse mit der 42 am Ende die von dem USB Adapter? Ist das dann der Adapter Ethercat ENXE89.... ?

Kannst du denn die .42 vom Indraworks PC aus pingen? (Der Indraworks Rechner ist aber im gleichen IP Subnetz oder?)


Die .42 war der im PC eingebaute WLAN Adapter, welchen ich auch anpingen konnte, aber der ENXE89... kann ich sobald ich die Brücke eingerichtet habe nicht mehr anpingen.

Bin grad am versuchen ob es evt einfacher ist eine Windows VM zu machen und die Verbindung direkt in diese zu brücken.

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

More
16 Mar 2021 21:42 #202520 by db1981
Replied by db1981 on topic Ethercat HAL driver
das müsste eigentlich auch richtig sein. Das der usb nicht mehr gepingt werden kann wenn der in der Bridge ist, weil der ja dann die Brücke ist.(vielleicht.....)
Stimmt dann evtl. doch was mit der Brücke noch nicht.
Ich habe mich damit aber noch nicht beschäftigen müssen, daher kein fundiertes Wissen im Moment, kann ich mich am WE mal reinlesen...

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

More
19 Mar 2021 14:33 #202839 by bkt
Replied by bkt on topic Ethercat HAL driver
I still have this boring problem that happens to me every 2/3 days .... when switching from PREOP to OP status something goes wrong and the IDs are remapped generating this error:

Warning: Spoiler!


The cables are checked, the earth is made on a copper bar .... I don't know what else to check .... it's a nightmare.

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

More
19 Mar 2021 14:51 #202844 by db1981
Replied by db1981 on topic Ethercat HAL driver

[ 79.332714] EtherCAT WARNING 0-main-10: Slave does not support changing the PDO mapping!
[ 79.332716] EtherCAT WARNING 0-main-10: Currently mapped PDO entries: 0x6000:01/1 0x6000:02/1 0x6000:03/1 0x0000:00/4 0x6000:08/1 0x6000:09/1 0x6000:0A/1 0x6000:0B/1 0x0000:00/1 0x6000:0D/1 0x6000:0E/1 0x0000:00/1 0x6000:10/1 0x6000:11/32 0x6000:12/32. Entries to map: 0x6000:01/1 0x6000:02/1 0x6000:03/1 0x0000:00/4 0x6000:08/1 0x6000:09/1 0x6000:0A/1 0x6000:0B/1 0x0000:00/1 0x6000:0D/1 0x1C32:20/1 0x0000:00/1 0x1800:09/1 0x6000:11/32 0x6000:12/32


this two lines appers only when the error ocours ?
The following user(s) said Thank You: bkt

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

More
19 Mar 2021 16:39 - 19 Mar 2021 16:46 #202856 by bkt
Replied by bkt on topic Ethercat HAL driver
Yes for sure .... but from 3 hour I have only these error .... not possible to put slave 1 and 2 in OP state.

now at start of pc, ethercat dmesg:
[   21.675777] EtherCAT: Master driver 1.5.2 unknown
[   21.675946] EtherCAT: 1 master waiting for devices.
[   21.676658] ec_generic: EtherCAT master generic Ethernet device module 1.5.2 unknown
[   21.676668] EtherCAT: Accepting 68:ED:A6:00:12:45 as main device for master 0.
[   21.699672] EtherCAT 0: Starting EtherCAT-IDLE thread.
[  126.041284] EtherCAT 0: Link state of ecm0 changed to UP.
[  126.045355] EtherCAT 0: 11 slave(s) responding on main device.
[  126.045356] EtherCAT 0: Slave states on main device: PREOP.
[  126.048351] EtherCAT 0: Scanning bus.
[  126.430824] EtherCAT 0: Bus scanning completed in 388 ms.
[  126.430826] EtherCAT 0: Using slave main-0 as DC reference clock.
[  126.484722] EtherCAT 0: Slave states on main device: INIT, PREOP.
[  126.534700] EtherCAT 0: Slave states on main device: PREOP.

seems all ok ... so try to launch my Lcnc config (the only one in ethercat) :
Warning: Spoiler!


and now all work and go to OP state but not slaves 1 and slaves 2 ...... :sick:

thanks regards
Last edit: 19 Mar 2021 16:46 by bkt.

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

More
19 Mar 2021 18:46 #202875 by db1981
Replied by db1981 on topic Ethercat HAL driver
this must be an jitter /nic based problem.
What kind of network cards do you have? (NICs?)
The following user(s) said Thank You: bkt

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

More
20 Mar 2021 07:10 - 20 Mar 2021 07:30 #202934 by bkt
Replied by bkt on topic Ethercat HAL driver
sorry .... I'm sorry I told the false about the errors .... I did not realize that the change of number takes place even when everything works as well as this morning ... to be precise, I report today's dmsg that everything is fine:

Warning: Spoiler!


about network card .... i have six I210 Gigabit on my pc ... "lspci" give my that response:
Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03)

from "ERROR" situations and "normal" situations I can see only two row of messages differences:
[color=red][  254.436885] EtherCAT 0: Domain 0: 3 working counter changes - now 18/21.[/color]
[  257.697493] EtherCAT 0: Domain 0: Working counter changed to 21/21.

because two slave not go to OP state .... but not see other interesting messages .... so I can assume as you say a problem on the ethernet card side, but also a power problem .... they are drives that are ready to be STO even if they do not have the specific function. My drive have logical power everytime ON and motor-power ON only when a breaker is on. Breaker is commanded from "halui.machine.is-on". I begin to assume that a delay in activating the power of the motor-power does not allow it to go to OP. If try with twincat to put my derive in OP state wit motor-power off the drive not go to OP state. However, I do not find the way to verify this so that it remains only a hypothesis (twincat not give a specific messages and drive the same). What happens with my_pyvcp.hal file is this:
net out1 halui.machine.is-on => pyvcp.led-01 lcec.0.7.dout-0

dout-0 command my breaker.
But for first is my.hal file that is read so:
net ec-slaves-responding <= lcec.slaves-responding
net ec-link-up <= lcec.link-up
net ec-all-op <= lcec.all-op

net ec_up lcec.state-op => iocontrol.0.emc-enable-in lcec.0.0.driverControl-0 lcec.0.1.driverControl-0 lcec.0.2.driverControl-0

Code on my.hal file is read and executed a little bit first and code on my_pyvcp.hal file is read and executed a little bit after ... so it maybe that OP state is commanded first but power line is powered with a little delay .... so some drive not go to OP because not powered yet.

On the other hand the halui commands are executed, in a theoretical temporal sequence, always after the motion commands so that my dout-0 should find a better parent than halui.machine.is-on to be activated.

@db1981 do you find this a sensible theory? How could i do to put my dout-0 in the correct sequence?

regards
bkt
Last edit: 20 Mar 2021 07:30 by bkt.

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

More
20 Mar 2021 13:28 #202975 by db1981
Replied by db1981 on topic Ethercat HAL driver

[ 254.436885] EtherCAT 0: Domain 0: 3 working counter changes - now 18/21.
[ 257.697493] EtherCAT 0: Domain 0: Working counter changed to 21/21.


this is ok ,the slaves don't go all to op state at the same time.....

You can't enable the drive when Motor Power is not on, there should be sufficent time between this to get the DC Power Section fully working. This will be your problem.

The normal way is that your power circuit should be related to the estop circuit. And your drives-enables are related to linuxcncs Joints -enable. what you did connetced makes no sense....

So:

Servo Drives enable : joint.N.amp-enable-out OUT BIT (TRUE if the amplifier for this joint should be enabled)

Power contactor : related to the hardware estop-chain. or iocontrol.0.user-enable-out
The following user(s) said Thank You: bkt

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

More
19 Apr 2021 09:39 #206373 by Stormholt
Replied by Stormholt on topic Ethercat HAL driver
Hello @chimeno

Did you manage to write a driver for the EL6021 ?
If so would you be willing to share it or any pointers as to how to proceed in writing a driver for it.

Thank you in advance
Stormholt

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

More
19 Apr 2021 11:42 #206376 by db1981
Replied by db1981 on topic Ethercat HAL driver
Hi,

what do you want to achieve with the driver?

how should the hal interface be designed? do you want to have an "virtual" com port for the device.
or simple rx and tx buffer arrays, with correspondending transmit and receive bits?

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

Time to create page: 0.501 seconds
Powered by Kunena Forum