- Posts: 790
- Thank you received: 276
Ethercat HAL driver
- db1981
- Offline
- Platinum Member
-
Less
More
5 years 7 months ago #202844
by db1981
this two lines appers only when the error ocours ?
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
- bkt
- Offline
- Platinum Member
-
Less
More
- Posts: 1111
- Thank you received: 114
5 years 7 months ago - 5 years 7 months ago #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:
seems all ok ... so try to launch my Lcnc config (the only one in ethercat) :
and now all work and go to OP state but not slaves 1 and slaves 2 ...... :sick:
thanks regards
now at start of pc, ethercat dmesg:
Code:
[ 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!
Code:
[ 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 ...... :sick:
thanks regards
Last edit: 5 years 7 months ago by bkt.
- db1981
- Offline
- Platinum Member
-
Less
More
- Posts: 790
- Thank you received: 276
5 years 7 months ago #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?)
What kind of network cards do you have? (NICs?)
The following user(s) said Thank You: bkt
- bkt
- Offline
- Platinum Member
-
Less
More
- Posts: 1111
- Thank you received: 114
5 years 7 months ago - 5 years 7 months ago #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:
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:
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:
dout-0 command my breaker.
But for first is my.hal file that is read so:
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
Warning: Spoiler!
Code:
[ 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:
Code:
[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:
Code:
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:
Code:
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: 5 years 7 months ago by bkt.
- db1981
- Offline
- Platinum Member
-
Less
More
- Posts: 790
- Thank you received: 276
5 years 7 months ago #202975
by db1981
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
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
- Stormholt
- Offline
- Senior Member
-
Less
More
- Posts: 58
- Thank you received: 8
5 years 6 months ago #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
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
Time to create page: 5.916 seconds