Ethercat drive configuration woes

More
3 years 11 months ago #258260 by mwc
So I've put the H3 to the side for now, and have managed to get LinuxCNC installed on a Pi4 as per Hakan's and psuedo's posts.

I've created a new machine profile, and have LinuxCNC loading, and the drives going to OP state, but I have so far failed to get any movement.
The first obvious issue is when I click Machine On, it takes over 50seconds for the Jog/Home buttons to become active.
If I try jogging, I get a following error, and it takes the same 50second plus for the Jog/Home buttons to deactivate.

There are no standout issues in any of the outputs mentioned in pseudo's thread.

Terminal output from linuxcnc -v -
Code:
pi@linuxcnc:~ $ linuxcnc -v Verbose mode on RUN_IN_PLACE=no LINUXCNC_DIR= LINUXCNC_BIN_DIR=/usr/bin LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc LINUXCNC_SCRIPT_DIR= LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc/modules LINUXCNC_CONFIG_DIR= LINUXCNC_LANG_DIR=/usr/lib/tcltk/linuxcnc/msgs INIVAR=inivar HALCMD=halcmd LINUXCNC_EMCSH=/usr/bin/wish8.6 LINUXCNC - 2.8.4 Machine configuration directory is '/home/pi/linuxcnc/configs/my_EtherCAT' Machine configuration file is 'my_EtherCAT.ini' INIFILE=/home/pi/linuxcnc/configs/my_EtherCAT/my_EtherCAT.ini VERSION=1.1 PARAMETER_FILE=linuxcnc.var TASK=milltask HALUI=halui DISPLAY=axis COORDINATES=XYZ KINEMATICS=trivkins coordinates=XYZ Starting LinuxCNC... Starting LinuxCNC server program: linuxcncsvr Loading Real Time OS, RTAPI, and HAL_LIB modules Starting LinuxCNC IO program: io Starting HAL User Interface program: halui Found file(REL): ./my_EtherCAT.hal Note: Using POSIX realtime Found file(REL): ./custom.hal Starting TASK program: milltask Starting DISPLAY program: axis note: MAXV     max: 25.000 units/sec 1500.000 units/min note: LJOG     max: 25.000 units/sec 1500.000 units/min note: LJOG default: 6.000 units/sec 360.000 units/min note: jog_order='XYZ' note: jog_invert=set() joint 2 following error emc/task/taskintf.cc 942: Error on joint 2, command number 85 Running HAL shutdown script task: 32360 cycles, min=0.000164, max=0.031864, avg=0.010082, 0 latency excursions (> 10x expected cycle time of 0.010000s) Removing HAL_LIB, RTAPI, and Real Time OS modules Note: Using POSIX realtime Removing NML shared memory segments pi@linuxcnc:~ $


ethercat slaves before starting LinuxCNC-
Code:
pi@linuxcnc:~ $ ethercat slaves 0  0:0  PREOP  +  CL3-E57H 1  0:1  PREOP  +  CL3-E57H 2  0:2  PREOP  +  CL3-E57H pi@linuxcnc:~ $ ethercat slaves -v === Master 0, Slave 0 === Device: Main State: PREOP Flag: + Identity:   Vendor Id:       0x00000a79   Product code:    0x00001000   Revision number: 0x00000001   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             -   3940305729           0           0    1  MII   up    open    yes             1   3940308529        2800         680    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: CL3-E57H   CoE details:     Enable SDO: yes     Enable SDO Info: no     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 === Master 0, Slave 1 === Device: Main State: PREOP Flag: + Identity:   Vendor Id:       0x00000a79   Product code:    0x00001000   Revision number: 0x00000001   Serial number:   0x00000000 DL information:   FMMU bit operation: no   Distributed clocks: yes, 64 bit   DC system time transmission delay: 680 ns Port  Type  Link  Loop    Signal  NextSlave  RxTime [ns]  Diff [ns]   NextDc [ns]    0  MII   up    open    yes             0   3922788069           0         680    1  MII   up    open    yes             2   3922789508        1439         719    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: CL3-E57H   CoE details:     Enable SDO: yes     Enable SDO Info: no     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 === Master 0, Slave 2 === Device: Main State: PREOP Flag: + Identity:   Vendor Id:       0x00000a79   Product code:    0x00001000   Revision number: 0x00000001   Serial number:   0x00000000 DL information:   FMMU bit operation: no   Distributed clocks: yes, 64 bit   DC system time transmission delay: 1399 ns Port  Type  Link  Loop    Signal  NextSlave  RxTime [ns]  Diff [ns]   NextDc [ns]    0  MII   up    open    yes             1   3902518293           0         719    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: CL3-E57H   CoE details:     Enable SDO: yes     Enable SDO Info: no     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

ethercat slaves once LinuxCNC has loaded -
Code:
pi@linuxcnc:~ $ ethercat slaves 0  0:0  OP  +  CL3-E57H 1  0:1  OP  +  CL3-E57H 2  0:2  OP  +  CL3-E57H pi@linuxcnc:~ $ ethercat slaves -v === Master 0, Slave 0 === Device: Main State: OP Flag: + Identity:   Vendor Id:       0x00000a79   Product code:    0x00001000   Revision number: 0x00000001   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             -   3940305729           0           0    1  MII   up    open    yes             1   3940308529        2800         680    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: CL3-E57H   CoE details:     Enable SDO: yes     Enable SDO Info: no     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 === Master 0, Slave 1 === Device: Main State: OP Flag: + Identity:   Vendor Id:       0x00000a79   Product code:    0x00001000   Revision number: 0x00000001   Serial number:   0x00000000 DL information:   FMMU bit operation: no   Distributed clocks: yes, 64 bit   DC system time transmission delay: 680 ns Port  Type  Link  Loop    Signal  NextSlave  RxTime [ns]  Diff [ns]   NextDc [ns]    0  MII   up    open    yes             0   3922788069           0         680    1  MII   up    open    yes             2   3922789508        1439         719    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: CL3-E57H   CoE details:     Enable SDO: yes     Enable SDO Info: no     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 === Master 0, Slave 2 === Device: Main State: OP Flag: + Identity:   Vendor Id:       0x00000a79   Product code:    0x00001000   Revision number: 0x00000001   Serial number:   0x00000000 DL information:   FMMU bit operation: no   Distributed clocks: yes, 64 bit   DC system time transmission delay: 1399 ns Port  Type  Link  Loop    Signal  NextSlave  RxTime [ns]  Diff [ns]   NextDc [ns]    0  MII   up    open    yes             1   3902518293           0         719    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: CL3-E57H   CoE details:     Enable SDO: yes     Enable SDO Info: no     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

dmesg - wH while loading LinuxCNC-
Code:
[Dec 1 20:39] EtherCAT: Requesting master 0... [  +0.000015] EtherCAT: Successfully requested master 0. [  +0.001595] EtherCAT 0: Domain0: Logical address 0x00000000, 168 byte, expected working counter 9. [  +0.000009] EtherCAT 0:   Datagram domain0-0-main: Logical offset 0x00000000, 168 byte, type LRW. [  +0.000081] EtherCAT 0: Master thread exited. [  +0.000011] EtherCAT 0: Starting EtherCAT-OP thread. [  +0.349635] EtherCAT 0: Domain 0: Working counter changed to 2/9 [  +0.000010] . [  +3.897046] EtherCAT 0: Domain 0: Working counter changed to 3/9 [  +0.000009] . [  +1.003017] EtherCAT 0: Domain 0: 4 working counter changes - now 9/9 [  +0.000008] . [  +0.089112] EtherCAT 0: Slave states on main device: OP.
 

dmesg once LinuxCNC is closed-
Code:
[Dec 1 20:46] EtherCAT 0: Master thread exited. [  +0.000086] EtherCAT 0: Starting EtherCAT-IDLE thread. [  +0.000129] EtherCAT ERROR 0-2: Failed to receive AL state datagram:  [  +0.000007] Datagram  [  +0.000005] initialized [  +0.000006] . [  +0.000033] EtherCAT 0: Releasing master... [  +0.000009] EtherCAT 0: Released. [  +0.017978] EtherCAT 0: Slave states on main device: SAFEOP + ERROR. [  +0.020154] EtherCAT ERROR 0-0: AL status message 0x001A: "Synchronization error". [  +0.000120] EtherCAT 0-0: Acknowledged state SAFEOP. [  +0.019835] EtherCAT ERROR 0-1: AL status message 0x001A: "Synchronization error". [  +0.000133] EtherCAT 0-1: Acknowledged state SAFEOP. [  +0.020074] EtherCAT ERROR 0-2: AL status message 0x001A: "Synchronization error". [  +0.000142] EtherCAT 0-2: Acknowledged state SAFEOP. [  +0.019528] EtherCAT 0: Slave states on main device: PREOP. [  +0.459963] EtherCAT WARNING: Datagram b81dad78 (master-fsm) was SKIPPED 1 time.


 

File Attachment:

File Name: my_EtherCAT.ini
File Size:4.01 KB

File Attachment:

File Name: my_EtherCAT.hal
File Size:4.58 KB

File Attachment:

File Name: myethercat-conf.xml
File Size:3.75 KB

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

More
3 years 11 months ago #258262 by mwc
And now I've fixed the formatting, the drives are Lichuan CL53-E57H Closed loop.
I have the manual, and they're CoE/CIA402 compliant.

If i look at the halmeter for the relevant pins, the drives show as enabled.

I'm wondering if it's an operating mode issue, as the driver manual does include a flow diagram for CSP mode, but the final outcome is the drives show as operational, so I'm pretty sure CSP mode is being configured correctly.

Anybody got any ideas?

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

More
3 years 10 months ago #258274 by db1981
all files you have attached look ok.

but there is something that seems to slow down the linuxcnc thread.

what is the content of custom.hal and custom_postgui.hal

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

More
3 years 10 months ago #258276 by mwc
I've just checked, and both hals are empty except for two comment lines.

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

More
3 years 10 months ago #258313 by db1981
Can you try if the problem is ethercat related or an general problem with the pi?

start one of the sample realtime configurations with stepgen, and check if linuxcnc / gui reacts as expected .

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

More
3 years 10 months ago #258366 by mwc
As I wasn't entirely happy with the Pi setup, I've temporarily removed the Mini-ITX board from my mill, stuck a new SSD in it, done a fresh install using the stable ISO (Debian Buster with linuxcnc 2.8.4), and installed EtherCAT as per Rod's guide.

Now I've done that, I've still got the exact same slow response from LinuxCNC.

Response is fine when using the Axis Sim profile.

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

Time to create page: 0.402 seconds
Powered by Kunena Forum