Problems with Lichuan Ethercat servo drive
I have now received my drive as well and tested with the config of yours. Unfortunately no luck so far. Here is what is reported back with "sudo dmesg -wH":
[Apr20 19:33] EtherCAT: Requesting master 0...
[ +0.000002] EtherCAT: Successfully requested master 0.
[ +0.000175] EtherCAT 0: Domain0: Logical address 0x00000000, 196 byte, expected working counter 1.
[ +0.000002] EtherCAT 0: Datagram domain0-0-main: Logical offset 0x00000000, 196 byte, type LWR.
[ +0.000006] EtherCAT 0: Master thread exited.
[ +0.000001] EtherCAT 0: Starting EtherCAT-OP thread.
[ +0.000021] EtherCAT WARNING 0: 1 datagram UNMATCHED!
[ +4.295428] EtherCAT ERROR 0-0: Timeout while setting state OP.
[ +0.007773] EtherCAT 0: Slave states on main device: SAFEOP.
[ +12.904002] EtherCAT 0: Slave states on main device: SAFEOP + ERROR.
ethercat slaves -v reports the following, so address should be correct:
Sorry I don't know how to format code here.=== Master 0, Slave 0 ===
Device: Main
State: PREOP
Flag: +
Identity:
Vendor Id: 0x00000766
Product code: 0x00000402
Revision number: 0x00000204
Serial number: 0x00000000
DL information:
FMMU bit operation: no
Distributed clocks: yes, 64 bit
DC system time transmission delay: 0 ns
Port Type Link Loop Signal NextSlave RxTime [ns] Diff [ns] NextDc [ns]
0 MII up open yes - 3652581971 0 0
1 MII down closed no - - - -
2 N/A down closed no - - - -
3 N/A down closed no - - - -
Mailboxes:
Bootstrap RX: 0x0000/0, TX: 0x0000/0
Standard RX: 0x1000/128, TX: 0x1100/128
Supported protocols: CoE
General:
Group: EtherCAT Driver
Image name:
Order number:
Device name: LC10E_V1.04
CoE details:
Enable SDO: yes
Enable SDO Info: yes
Enable PDO Assign: yes
Enable PDO Configuration: yes
Enable Upload at startup: no
Enable SDO complete access: no
Flags:
Enable SafeOp: no
Enable notLRW: no
Current consumption: 0 mA
Please Log in or Create an account to join the conversation.
sudo halcompile --install cia402.comp
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
ethercat state -p0 PREOP
Please Log in or Create an account to join the conversation.
Did you have to do some special configuration on the driver end?
Please Log in or Create an account to join the conversation.
Tried:
ethercat state -p0 PREOP -> drive shows 20ry, 2 is flashing
ethercat state -p0 INIT -> drive shows 10ry
ethercat state -p0 SAFEOP -> drive shows 20ry, 2 is flashing
ethercat state -p0 OP -> drive shows 20ry, 2 is flashing
Linuxcnc startup:
20ry
Switch machine on
40ry
10s later
F0ry and log shows safeop+error
Log Shows:
+3,998716] EtherCAT WARNING 0-0: Slave did not sync after 5000 ms.
[ +5,004000] EtherCAT ERROR 0-0: Timeout while setting state OP.
Please Log in or Create an account to join the conversation.
ethercat state -p0 INIT
Display shows "_10ry", not flashing, and dmesg:
[Apr27 15:54] EtherCAT DEBUG 0-0: Changing state from PREOP to INIT.
[ +0.000003] EtherCAT DEBUG 0-0: Configuring...
[ +0.000874] EtherCAT DEBUG 0-0: Now in INIT.
[ +0.000001] EtherCAT DEBUG 0-0: Clearing FMMU configurations...
[ +0.000277] EtherCAT DEBUG 0-0: Clearing sync manager configurations...
[ +0.000277] EtherCAT DEBUG 0-0: Clearing DC assignment...
[ +0.000278] EtherCAT DEBUG 0-0: Finished configuration.
[ +0.010270] EtherCAT 0: Slave states on main device: INIT.
ethercat state -p0 SAFEOP
Display shows "_20ry", the two is flashing, and dmesg:
[Apr27 15:57] EtherCAT DEBUG 0-0: Changing state from INIT to SAFEOP.
[ +0.000008] EtherCAT DEBUG 0-0: Configuring...
[ +0.000692] EtherCAT DEBUG 0-0: Now in INIT.
[ +0.000003] EtherCAT DEBUG 0-0: Clearing FMMU configurations...
[ +0.000297] EtherCAT DEBUG 0-0: Clearing sync manager configurations...
[ +0.000305] EtherCAT DEBUG 0-0: Clearing DC assignment...
[ +0.000304] EtherCAT DEBUG 0-0: Configuring mailbox sync managers...
[ +0.000003] EtherCAT DEBUG 0-0: SM0: Addr 0x1000, Size 128, Ctrl 0x26, En 1
[ +0.000007] EtherCAT DEBUG 0-0: SM1: Addr 0x1100, Size 128, Ctrl 0x22, En 1
[ +0.000294] EtherCAT DEBUG 0-0: Assigning SII access to PDI.
[ +0.001423] EtherCAT DEBUG 0-0: Now in PREOP.
[ +0.000003] EtherCAT DEBUG 0-0: Assigning SII access back to EtherCAT.
[ +0.000261] EtherCAT DEBUG 0-0: SM2: Addr 0x1200, Size 0, Ctrl 0x64, En 0
[ +0.000005] EtherCAT DEBUG 0-0: SM3: Addr 0x1300, Size 0, Ctrl 0x20, En 0
[ +0.000808] EtherCAT ERROR 0-0: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
[ +0.000311] EtherCAT ERROR 0-0: AL status message 0x001E: "Invalid input configuration".
[ +0.000537] EtherCAT 0-0: Acknowledged state PREOP.
[ +0.006737] EtherCAT 0: Slave states on main device: PREOP.
ethercat state -p0 OP
Display shows "_20ry", the two is flashing, and dmesg:
[Apr27 16:00] EtherCAT DEBUG 0-0: Changing state from PREOP to OP.
[ +0.000002] EtherCAT DEBUG 0-0: Configuring...
[ +0.000881] EtherCAT DEBUG 0-0: Now in INIT.
[ +0.000000] EtherCAT DEBUG 0-0: Clearing FMMU configurations...
[ +0.000277] EtherCAT DEBUG 0-0: Clearing sync manager configurations...
[ +0.000278] EtherCAT DEBUG 0-0: Clearing DC assignment...
[ +0.000279] EtherCAT DEBUG 0-0: Configuring mailbox sync managers...
[ +0.000001] EtherCAT DEBUG 0-0: SM0: Addr 0x1000, Size 128, Ctrl 0x26, En 1
[ +0.000001] EtherCAT DEBUG 0-0: SM1: Addr 0x1100, Size 128, Ctrl 0x22, En 1
[ +0.000274] EtherCAT DEBUG 0-0: Assigning SII access to PDI.
[ +0.000802] EtherCAT DEBUG 0-0: Now in PREOP.
[ +0.000001] EtherCAT DEBUG 0-0: Assigning SII access back to EtherCAT.
[ +0.000272] EtherCAT DEBUG 0-0: SM2: Addr 0x1200, Size 0, Ctrl 0x64, En 0
[ +0.000001] EtherCAT DEBUG 0-0: SM3: Addr 0x1300, Size 0, Ctrl 0x20, En 0
[ +0.000838] EtherCAT ERROR 0-0: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
[ +0.000274] EtherCAT ERROR 0-0: AL status message 0x001E: "Invalid input configuration".
[ +0.000835] EtherCAT 0-0: Acknowledged state PREOP.
Startup of LCNC:
Display shows "_F0ry", not flashing, and dmesg:
.
.
.
[ +0.001993] EtherCAT WARNING 0-0: Slave did not sync after 5000 ms.
[ +0.000001] EtherCAT DEBUG 0-0: ref_time=767542016736603000
[ +0.000001] EtherCAT DEBUG 0-0: app_time=767542021916008181
[ +0.000001] EtherCAT DEBUG 0-0: start_time=767542022016008181
[ +0.000001] EtherCAT DEBUG 0-0: cycle=1000000
[ +0.000001] EtherCAT DEBUG 0-0: shift_time=0
[ +0.000001] EtherCAT DEBUG 0-0: remainder=405181
[ +0.000001] EtherCAT DEBUG 0-0: start=767542022016603000
[ +0.000000] EtherCAT DEBUG 0-0: Setting DC cyclic operation start time to 767542022016603000.
[ +0.001992] EtherCAT DEBUG 0-0: Setting DC AssignActivate to 0x0300.
[ +0.004009] EtherCAT DEBUG 0-0: Now in SAFEOP.
[ +5.001992] EtherCAT ERROR 0-0: Timeout while setting state OP.
[ +0.007631] EtherCAT 0: Slave states on main device: SAFEOP.
[ +12.904001] EtherCAT 0: Slave states on main device: SAFEOP + ERROR.
[ +0.007998] EtherCAT DEBUG 0-0: SAFEOP -> SAFEOP + ERROR.
I find this interesting when manually switching states:
[ +0.000274] EtherCAT ERROR 0-0: AL status message 0x001E: "Invalid input configuration".
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Then i deleted the PDO mapping with command:
ethercat -p0 --type uint8 download 0x1600 0 0
ethercat -p0 --type uint8 download 0x1a00 0 0
Now im able to get the servo in OP mode using:
ethercat states OP
After starting linuxcnc, the pdos are remapped and the same error (previus post) occurs.
Really dont know what to do now, that doesnt make sense to me, espacially that it doesnt work when i set the pdos with twincat.
Please Log in or Create an account to join the conversation.
- scottlaird
- Offline
- Premium Member
- Posts: 136
- Thank you received: 155
- RTelligent ECT60. Supports 3x RX and TX PDOs with 12 entries each, at 0x1600, 0x1601, and 0x1602.
- RTelligent ECT60X2. Supports 2x RX and TX PDOs with 12 entries each, at 0x1600 and 0x1610. 0x1601 returns an error. 0x1620 returns an error.
- Leadshine 2CS3E-D507. Supports 3x RX and TX PDOs with 8 entries each at 0x1600, 0x1601, etc. Setting 0x1600:09 returns an error.
- Omron MX2. Supports 512x (!) RX and TX PDOs with 2 (!) entries each, at 0x1600-0x17ff. Setting 0x1600:03 returns an error.
I suspect there are some devices that will let you use anything in that general range for PDOs, and just follow whatever you put into the sync manager config. Others are *extremely* limited. Even better, a lot of this depends on the exact firmware involved, and the firmware doesn't always match the documentation. For example, RTelligent's ESI claims that the ECT60X2 has the same config as the ECT60, but mine *really* doesn't.
Deleting the PDO config mostly just means that there's no way to tell the device what to do; that's the important part of the config .
To start with, what does `ethercat pdos` show *after power-cycling but before running LinuxCNC*? And what does your XML file look like?
I just broke down and ordered a cheap Lichuan LC10E, so hopefully there will be a driver for it by late May, but that depends on shipping and my work schedule.
Please Log in or Create an account to join the conversation.