Ethercat HAL driver

More
14 Aug 2016 15:03 #78748 by sirop
Replied by sirop on topic Ethercat HAL driver
Try
ethercat slaves -v
or
ethercat master -v

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

More
14 Aug 2016 15:10 - 14 Aug 2016 15:16 #78750 by REEEN
Replied by REEEN on topic Ethercat HAL driver
Just tried it out and got a command not found error

I think some linking is missing probably
Last edit: 14 Aug 2016 15:16 by REEEN.

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

More
16 Aug 2016 12:55 - 16 Aug 2016 12:56 #78843 by narogon
Replied by narogon on topic Ethercat HAL driver
Hi everyone,

I'm trying to configure a machine with 37 servos HIWIN. I created my own lcec_hiwin and everything is fine for many machines with 3, 4 or 5 servos.

I get some kind of problem when I connect more than 13 slaves. The 13th and 14th get stuck on PRE-OP with error and the following not even try to get OP.

the output of ethercat slaves for 15 servos:
0  0:0   OP     +  D2 CoE Drive
 1  0:1   OP     +  D2 CoE Drive
 2  0:2   OP     +  D2 CoE Drive
 3  0:3   OP     +  D2 CoE Drive
 4  0:4   OP     +  D2 CoE Drive
 5  0:5   OP     +  D2 CoE Drive
 6  0:6   OP     +  D2 CoE Drive
 7  0:7   OP     +  D2 CoE Drive
 8  0:8   OP     +  D2 CoE Drive
 9  0:9   OP     +  D2 CoE Drive
10  0:10  OP     +  D2 CoE Drive
11  0:11  OP     +  D2 CoE Drive
12  0:12  OP     +  D2 CoE Drive
13  0:13  PREOP  E  D2 CoE Drive
14  0:14  PREOP  E  D2 CoE Drive

The dmesg output:
6342.759097] EtherCAT: Requesting master 0...
[ 6342.759100] EtherCAT: Successfully requested master 0.
[ 6342.761933] EtherCAT 0: Domain0: Logical address 0x00000000, 405 byte, expected working counter 45.
[ 6342.761935] EtherCAT 0:   Datagram domain0-0-main: Logical offset 0x00000000, 405 byte, type LRW.
[ 6342.761944] EtherCAT 0: Master thread exited.
[ 6342.761946] EtherCAT 0: Starting EtherCAT-OP thread.
[ 6342.761973] EtherCAT WARNING 0: 124 datagrams TIMED OUT!
[ 6342.772916] EtherCAT WARNING 0: No app_time received up to now, but master already active.
[ 6343.443818] EtherCAT 0: Domain 0: Working counter changed to 2/45.
[ 6344.446208] EtherCAT 0: Domain 0: Working counter changed to 4/45.
[ 6345.448598] EtherCAT 0: Domain 0: Working counter changed to 6/45.
[ 6346.450989] EtherCAT 0: Domain 0: 2 working counter changes - now 10/45.
[ 6347.453380] EtherCAT 0: Domain 0: Working counter changed to 12/45.
[ 6348.455770] EtherCAT 0: Domain 0: 2 working counter changes - now 16/45.
[ 6349.456163] EtherCAT 0: Domain 0: Working counter changed to 18/45.
[ 6350.460551] EtherCAT 0: Domain 0: 2 working counter changes - now 22/45.
[ 6351.462941] EtherCAT 0: Domain 0: Working counter changed to 24/45.
[ 6352.219727] EtherCAT ERROR 0-13: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
[ 6352.223721] EtherCAT ERROR 0-13: Unknown AL status code 0x002E.
[ 6352.231707] EtherCAT 0-13: Acknowledged state PREOP.
[ 6352.463336] EtherCAT 0: Domain 0: Working counter changed to 26/45.
[ 6352.575153] EtherCAT ERROR 0-14: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
[ 6352.579146] EtherCAT ERROR 0-14: Unknown AL status code 0x002E.
[ 6352.585136] EtherCAT 0-14: Acknowledged state PREOP.
[ 6352.591149] EtherCAT 0: Slave states on main device: PREOP, OP.

Hal configuration:
loadusr -W lcec_conf ./hiwinD2.xml
loadrt lcec
loadrt trivkins
loadrt motmod base_period_nsec=0 servo_period_nsec=2000000 num_joints=1
addf lcec.read-all servo-thread
addf lcec.write-all servo-thread
start

And the xml:
<masters>
<master idx="0" appTimePeriod="2000000" refClockSyncCycles="100">
	<slave idx="0" type="HiwinD2">
		<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
	</slave>
...
...

I've tried to change all the xml parameters, refClockSyncCycles, Dc values... with no result. Has anybody any idea of how to solve this?
Last edit: 16 Aug 2016 12:56 by narogon.

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

More
16 Aug 2016 14:07 #78853 by sirop
Replied by sirop on topic Ethercat HAL driver
Do you get this
[ 6342.761973] EtherCAT WARNING 0: 124 datagrams TIMED OUT!
...
[ 6352.575153] EtherCAT ERROR 0-14: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
[ 6352.579146] EtherCAT ERROR 0-14: Unknown AL status code 0x002E.
before starting the threads of the HAL script?

Do you see
EtherCAT WARNING 0: 124 datagrams TIMED OUT!
also if you use less slaves?

AL status code 0x002E is indeed unknown.

Besides all that:

0055-fsm_slave_config_scan-to-fsm_slave.patch
...
The motivating case was a network of about 100 slave devices; while scanning
is fast (under a second, after prior SII patches), the configuration process
to bring the slaves from PREOP to OP took about 80 seconds (and you could
see the lights coming on each slave in sequence). After the patch it takes
about 20 seconds.

lists.etherlab.org/pipermail/etherlab-dev/2016/000553.html

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

More
16 Aug 2016 14:15 #78854 by mfalcon
Replied by mfalcon on topic Ethercat HAL driver

[  133.613219] EtherCAT ERROR 0 0:1: PDO entry 0x6000:01 is not mapped.
[  133.613226] LCEC: master 0 PDO entry registration failed

That's the point to research.


thanks for help.
but I searched over here and in internet and still and I could not figure out what is the cause or remedy of this problem. I used the example xml file by sascha, so where is the mistake?

one more question too: Am I supposed to be connected online to all devices that are defined in xml file during start up of linuxcnc with hal driver?? may be this what causes error ?

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

More
16 Aug 2016 14:20 #78855 by sirop
Replied by sirop on topic Ethercat HAL driver

[  133.613219] EtherCAT ERROR 0 0:1: PDO entry 0x6000:01 is not mapped.
[  133.613226] LCEC: master 0 PDO entry registration failed

That's the point to research.


thanks for help.
but I searched over here and in internet and still and I could not figure out what is the cause or remedy of this problem. I used the example xml file by sascha, so where is the mistake?

one more question too: Am I supposed to be connected online to all devices that are defined in xml file during start up of linuxcnc with hal driver?? may be this what causes error ?


Which xml file by sascha is that?

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

More
16 Aug 2016 14:24 #78856 by mfalcon
Replied by mfalcon on topic Ethercat HAL driver

[  133.613219] EtherCAT ERROR 0 0:1: PDO entry 0x6000:01 is not mapped.
[  133.613226] LCEC: master 0 PDO entry registration failed

That's the point to research.


thanks for help.
but I searched over here and in internet and still and I could not figure out what is the cause or remedy of this problem. I used the example xml file by sascha, so where is the mistake?

one more question too: Am I supposed to be connected online to all devices that are defined in xml file during start up of linuxcnc with hal driver?? may be this what causes error ?


Which xml file by sascha is that?



this one:
github.com/sittner/linuxcnc-ethercat/blo.../ethercat-conf_X.xml

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

More
16 Aug 2016 14:26 #78857 by sirop
Replied by sirop on topic Ethercat HAL driver
And what slaves do you really have on the EtherCAT network?

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

More
16 Aug 2016 14:30 #78859 by narogon
Replied by narogon on topic Ethercat HAL driver

Do you get this
[ 6342.761973] EtherCAT WARNING 0: 124 datagrams TIMED OUT!
...
[ 6352.575153] EtherCAT ERROR 0-14: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
[ 6352.579146] EtherCAT ERROR 0-14: Unknown AL status code 0x002E.
before starting the threads of the HAL script?


No, I get that after start HAL script.


Do you see
EtherCAT WARNING 0: 124 datagrams TIMED OUT!
also if you use less slaves?


That doesn't appears always. Here is other test:
[   45.523043] EtherCAT: Requesting master 0...
[   45.523046] EtherCAT: Successfully requested master 0.
[   45.525861] EtherCAT 0: Domain0: Logical address 0x00000000, 405 byte, expected working counter 45.
[   45.525863] EtherCAT 0:   Datagram domain0-0-main: Logical offset 0x00000000, 405 byte, type LRW.
[   45.525870] EtherCAT 0: Master thread exited.
[   45.525872] EtherCAT 0: Starting EtherCAT-OP thread.
[   45.539360] EtherCAT WARNING 0: No app_time received up to now, but master already active.
[   50.882757] EtherCAT WARNING 0-0: Slave did not sync after 5000 ms.
[   50.892744] EtherCAT 0: Domain 0: Working counter changed to 2/45.
[   51.895136] EtherCAT 0: Domain 0: 2 working counter changes - now 6/45.
[   52.897526] EtherCAT 0: Domain 0: 3 working counter changes - now 12/45.
[   53.899916] EtherCAT 0: Domain 0: 3 working counter changes - now 18/45.
[   54.902308] EtherCAT 0: Domain 0: 3 working counter changes - now 24/45.
[   55.449424] EtherCAT ERROR 0-13: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
[   55.453418] EtherCAT ERROR 0-13: Unknown AL status code 0x002E.
[   55.459407] EtherCAT 0-13: Acknowledged state PREOP.
[   55.906692] EtherCAT 0: Domain 0: Working counter changed to 26/45.
[   56.136324] EtherCAT ERROR 0-14: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
[   56.140319] EtherCAT ERROR 0-14: Unknown AL status code 0x002E.
[   56.148304] EtherCAT 0-14: Acknowledged state PREOP.
[   56.152327] EtherCAT 0: Slave states on main device: PREOP, OP.


AL status code 0x002E is indeed unknown.

Besides all that:

0055-fsm_slave_config_scan-to-fsm_slave.patch
...
The motivating case was a network of about 100 slave devices; while scanning
is fast (under a second, after prior SII patches), the configuration process
to bring the slaves from PREOP to OP took about 80 seconds (and you could
see the lights coming on each slave in sequence). After the patch it takes
about 20 seconds.

lists.etherlab.org/pipermail/etherlab-dev/2016/000553.html


I'm going to read the last link, test it and comment the results.

BR

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

More
16 Aug 2016 14:33 - 16 Aug 2016 14:34 #78861 by mfalcon
Replied by mfalcon on topic Ethercat HAL driver
@sirop
currently EK1100 coupler, but I did not connect it during starting of linuxcnc , because i was thinking that xml file will be used to check the slaves when I press "run" button in linuxcnc gui.
Last edit: 16 Aug 2016 14:34 by mfalcon.

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

Time to create page: 0.802 seconds
Powered by Kunena Forum