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.
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.
[ 21.674635] EtherCAT: 1 master waiting for devices.
[ 21.675501] ec_generic: EtherCAT master generic Ethernet device module 1.5.2 unknown
[ 21.675511] EtherCAT: Accepting 68:ED:A6:00:12:45 as main device for master 0.
[ 21.710641] EtherCAT 0: Starting EtherCAT-IDLE thread.
[ 26.109467] EtherCAT 0: Link state of ecm0 changed to UP.
[ 26.113556] EtherCAT 0: 11 slave(s) responding on main device.
[ 26.113558] EtherCAT 0: Slave states on main device: PREOP.
[ 26.117322] EtherCAT 0: Scanning bus.
[ 26.505876] EtherCAT 0: Bus scanning completed in 392 ms.
[ 26.505878] EtherCAT 0: Using slave main-0 as DC reference clock.
[ 26.559544] EtherCAT 0: Slave states on main device: INIT, PREOP.
[ 26.608291] EtherCAT 0: Slave states on main device: PREOP.
[ 78.983755] EtherCAT: Requesting master 0...
[ 78.983758] EtherCAT: Successfully requested master 0.
[ 78.984730] EtherCAT 0: Domain0: Logical address 0x00000000, 74 byte, expected working counter 21.
[ 78.984732] EtherCAT 0: Datagram domain0-0-main: Logical offset 0x00000000, 74 byte, type LRW at 00000000f6a2b26f.
[ 78.987365] EtherCAT 0: Master thread exited.
[ 78.987368] EtherCAT 0: Starting EtherCAT-OP thread.
[ 79.295159] EtherCAT 0: Domain 0: Working counter changed to 1/21.
[ 79.308589] EtherCAT 0: Slave states on main device: PREOP, SAFEOP.
[ 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
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.
[ 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 ?
Please Log in or Create an account to join the conversation.
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) :
[ 253.133646] EtherCAT: Requesting master 0...
[ 253.133648] EtherCAT: Successfully requested master 0.
[ 253.134625] EtherCAT 0: Domain0: Logical address 0x00000000, 74 byte, expected working counter 21.
[ 253.134627] EtherCAT 0: Datagram domain0-0-main: Logical offset 0x00000000, 74 byte, type LRW at 00000000d152165c.
[ 253.136820] EtherCAT 0: Master thread exited.
[ 253.136823] EtherCAT 0: Starting EtherCAT-OP thread.
[ 253.436020] EtherCAT 0: Domain 0: Working counter changed to 1/21.
[ 253.449541] EtherCAT 0: Slave states on main device: PREOP, SAFEOP.
[ 253.473618] EtherCAT WARNING 0-main-10: Slave does not support changing the PDO mapping!
[ 253.473620] 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
[ 253.497715] EtherCAT 0: Slave states on main device: PREOP, OP.
[ 253.738327] EtherCAT 0: Slave states on main device: PREOP, SAFEOP, OP.
[ 254.026924] EtherCAT 0: Slave states on main device: PREOP, OP.
[ 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.
[ 257.730605] EtherCAT 0: Slave states on main device: SAFEOP, OP.
[ 258.019191] EtherCAT 0: Slave states on main device: OP.
and now all work and go to OP state but not slaves 1 and slaves 2 ......
thanks regards
Please Log in or Create an account to join the conversation.
What kind of network cards do you have? (NICs?)
Please Log in or Create an account to join the conversation.
[ 22.506117] EtherCAT: Master driver 1.5.2 unknown
[ 22.506797] EtherCAT: 1 master waiting for devices.
[ 22.509738] ec_generic: EtherCAT master generic Ethernet device module 1.5.2 unknown
[ 22.509749] EtherCAT: Accepting 68:ED:A6:00:12:45 as main device for master 0.
[ 22.536389] EtherCAT 0: Starting EtherCAT-IDLE thread.
[ 27.168245] EtherCAT 0: Link state of ecm0 changed to UP.
[ 27.172302] EtherCAT 0: 11 slave(s) responding on main device.
[ 27.172304] EtherCAT 0: Slave states on main device: INIT.
[ 27.175320] EtherCAT 0: Scanning bus.
[ 27.569392] EtherCAT 0: Bus scanning completed in 396 ms.
[ 27.569394] EtherCAT 0: Using slave main-0 as DC reference clock.
[ 27.573467] EtherCAT 0: Slave states on main device: INIT, PREOP.
[ 27.670897] EtherCAT 0: Slave states on main device: PREOP.
[ 49.808357] EtherCAT: Requesting master 0...
[ 49.808359] EtherCAT: Successfully requested master 0.
[ 49.809350] EtherCAT 0: Domain0: Logical address 0x00000000, 74 byte, expected working counter 21.
[ 49.809352] EtherCAT 0: Datagram domain0-0-main: Logical offset 0x00000000, 74 byte, type LRW at 000000008832432d.
[ 49.811236] EtherCAT 0: Master thread exited.
[ 49.811238] EtherCAT 0: Starting EtherCAT-OP thread.
[ 50.118308] EtherCAT 0: Domain 0: Working counter changed to 1/21.
[ 50.132077] EtherCAT 0: Slave states on main device: PREOP, SAFEOP.
[ 50.156173] EtherCAT WARNING 0-main-10: Slave does not support changing the PDO mapping!
[ 50.156175] 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
[ 50.180361] EtherCAT 0: Slave states on main device: PREOP, OP.
[ 50.421006] EtherCAT 0: Slave states on main device: SAFEOP, OP.
[ 50.709713] EtherCAT 0: Slave states on main device: OP.
[ 51.119297] EtherCAT 0: Domain 0: 3 working counter changes - now 21/21.
[ 63.426764] EtherCAT 0: Master thread exited.
[ 63.426785] EtherCAT 0: Starting EtherCAT-IDLE thread.
[ 63.427075] EtherCAT 0: Releasing master...
[ 63.427076] EtherCAT 0: Released.
[ 63.471312] EtherCAT 0: Slave states on main device: PREOP.
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
Please Log in or Create an account to join the conversation.
[ 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
Please Log in or Create an account to join the conversation.
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.
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.