Problems with Lichuan Ethercat servo drive

More
2 years 5 months ago #301174 by LCR
I have one servo setup on my desk.
I've gotten to:

sudo ../../linuxcnc-dev/bin/halcmd show pin lcec
Component Pins:
Owner Type Dir Value Name
4 u32 OUT 0x00000001 lcec.conf.master-count
4 u32 OUT 0x00000004 lcec.conf.slave-count

I installed from source. This is my first LinuxCNC install.
I'm unclear about how to proceed from here.
If there are any specific tests I can run that will help get this drive going, please let me know.

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

More
2 years 5 months ago #301180 by burnie
If you already have Linuxcnc-EtherCAT and CIA402 components installed, download LinuxCNC configs files from trisa25 , and put that in linuxcnc/configs. Launch LinuxCNC, then select CIA402 from the list. After LinuxCNC is running plug in the servo driver, it should say 88ry, enable the LinuxCNC machine, then you should be able to control the servo.

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

More
2 years 5 months ago #301210 by LCR
I am trying the configs from Trisa25,
I have only 1 motor hooked up.
Could this cause a problem? is there an easy way to modify this assuming 1 axis?

The following happens when I launch linuxcnc:

the drive starts out  _20ry, with the 2 flashing
switches to  _40ry , when  linuxcnc starts, with the 4 flashing
then to  _F0ry, shortly after
The y will flash when I turn the motor

I get no position feedback to linuxcnc when turning the motor.
The following is what linuxcnc prints to the screen.
I'm not sure about the USRMOT: ERROR command 30 timeout
doug@MillingMachine:~$ linuxcnc
LINUXCNC - 2.10.0~pre0
Machine configuration directory is '/home/doug/linuxcnc-dev/configs/my_ethercat_gantry'
Machine configuration file is 'cia402.ini'
Starting LinuxCNC...
linuxcncsvr (10034) emcsvr: machine 'EtherCAT Machine'  version '1.1'
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Note: Using POSIX realtime
milltask (10048) task: machine 'EtherCAT Machine'  version '1.1'
halui (10050) halui: machine 'EtherCAT Machine'  version '1.1'
Found file(REL): ./cia402.hal
USRMOT: ERROR: command 30 timeout
emcMotionInit: emcTrajInit failed
note: MAXV     max: 100.000 units/sec 6000.000 units/min
note: LJOG     max: 100.000 units/sec 6000.000 units/min
note: LJOG default: 50.000 units/sec 3000.000 units/min
note: jog_order='XYZ'
note: jog_invert=set()
task: main loop took 0.074680 seconds
Shutting down and cleaning up LinuxCNC...
Running HAL shutdown script
HAL: ERROR: pin 'lcec.0.3.out-01' not found
shutdown.hal:2: unlink failed
task: 0 cycles, min=0.000005, max=0.074680, avg=-1.000000, 1 latency excursions (> 10x expected cycle time of 0.005000s)
Note: Using POSIX realtime
doug@MillingMachine:~$
 

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

More
2 years 5 months ago - 2 years 5 months ago #301224 by LCR
OK I re-read your instructions and turned the drive on after LinuxCNC was up. How long did that take to figure out?
Now I get feedback, and can jog my axis!
I still get the following on startup of Linux CNC
Code:
doug@MillingMachine:~$ linuxcnc LINUXCNC - 2.10.0~pre0 Machine configuration directory is '/home/doug/linuxcnc-dev/configs/my_ethercat_gantry' Machine configuration file is 'cia402.ini' Starting LinuxCNC... linuxcncsvr (29025) emcsvr: machine 'EtherCAT Machine' version '1.1' linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod Note: Using POSIX realtime milltask (29039) task: machine 'EtherCAT Machine' version '1.1' halui (29041) halui: machine 'EtherCAT Machine' version '1.1' Found file(REL): ./cia402.hal USRMOT: ERROR: command 30 timeout emcMotionInit: emcTrajInit failed note: MAXV max: 100.000 units/sec 6000.000 units/min note: LJOG max: 100.000 units/sec 6000.000 units/min note: LJOG default: 50.000 units/sec 3000.000 units/min note: jog_order='XYZ' note: jog_invert=set() I'm also getting the following dmesg. [code][ 6089.134705] nouveau 0000:4b:00.0: DRM: skipped size 0000000000000000 [ 6089.134828] nouveau 0000:4b:00.0: DRM: skipped size 0000000000000000 [ 6089.135004] nouveau 0000:4b:00.0: DRM: skipped size 0000000000000000 [ 6089.135156] nouveau 0000:4b:00.0: DRM: skipped size 0000000000000000 [ 6089.135339] nouveau 0000:4b:00.0: DRM: skipped size 0000000000000000 [ 6089.135460] nouveau 0000:4b:00.0: DRM: skipped size 0000000000000000 [ 6089.135636] nouveau 0000:4b:00.0: DRM: skipped size 0000000000000000 [ 6089.135758] nouveau 0000:4b:00.0: DRM: skipped size 0000000000000000 [ 6089.135970] nouveau 0000:4b:00.0: DRM: skipped size 0000000000000000 [ 6089.136098] nouveau 0000:4b:00.0: DRM: skipped size 0000000000000000 [ 6113.503156] pcieport 0000:00:01.1: AER: Corrected error message received from 0000:02:00.0 [ 6113.503163] pcieport 0000:02:00.0: PCIe Bus Error: severity=Corrected, type=Data Link Layer, (Receiver ID) [ 6113.503165] pcieport 0000:02:00.0:   device [8086:1578] error status/mask=00000080/00002000 [ 6113.503166] pcieport 0000:02:00.0:    [ 7] BadDLLP                [ 6115.367488] pcieport 0000:00:01.1: AER: Corrected error message received from 0000:02:00.0 [ 6115.367493] pcieport 0000:02:00.0: PCIe Bus Error: severity=Corrected, type=Data Link Layer, (Receiver ID) [ 6115.367494] pcieport 0000:02:00.0:   device [8086:1578] error status/mask=00000080/00002000 [ 6115.367496] pcieport 0000:02:00.0:    [ 7] BadDLLP                [ 6115.427946] pcieport 0000:00:01.1: AER: Corrected error message received from 0000:02:00.0 [ 6115.427949] pcieport 0000:02:00.0: PCIe Bus Error: severity=Corrected, type=Data Link Layer, (Receiver ID) [ 6115.427950] pcieport 0000:02:00.0:   device [8086:1578] error status/mask=00000080/00002000 [ 6115.427952] pcieport 0000:02:00.0:    [ 7] BadDLLP                [ 6116.261124] e1000e 0000:00:19.0 eno1: NIC Link is Up 100 Mbps Full Duplex, Flow Control: None [ 6116.262082] EtherCAT 0: Link state of ecm0 changed to UP. [ 6116.274523] EtherCAT 0: 1 slave(s) responding on main device. [ 6116.274525] EtherCAT 0: Slave states on main device: INIT. [ 6116.277082] EtherCAT 0: Scanning bus. [ 6117.346091] EtherCAT ERROR 0-0: Invalid data size 2 at uploading SDO 0x1703:01. [ 6117.346095] EtherCAT ERROR 0-0: Failed to read mapped PDO entries for PDO 0x1703. [ 6117.395092] EtherCAT ERROR 0-0: Invalid data size 1 at uploading SDO 0x1B03:09. [ 6117.395093] EtherCAT ERROR 0-0: Failed to read mapped PDO entries for PDO 0x1B03. [ 6117.395094] EtherCAT 0: Bus scanning completed in 1120 ms. [ 6117.395096] EtherCAT 0: Using slave 0 as DC reference clock. [ 6117.406527] EtherCAT 0: Slave states on main device: PREOP. [ 6117.505093] EtherCAT 0: Domain 0: Working counter changed to 3/3. [ 6118.006537] EtherCAT 0: Slave states on main device: OP. [ 6166.764350] perf: interrupt took too long (2501 > 2500), lowering kernel.perf_event_max_sample_rate to 79750 [ 6168.102308] pcieport 0000:00:01.1: AER: Corrected error message received from 0000:02:00.0 [ 6168.102315] pcieport 0000:02:00.0: PCIe Bus Error: severity=Corrected, type=Data Link Layer, (Receiver ID) [ 6168.102316] pcieport 0000:02:00.0:   device [8086:1578] error status/mask=00000080/00002000 [ 6168.102318] pcieport 0000:02:00.0:    [ 7] BadDLLP                [ 6196.476804] pcieport 0000:00:01.1: AER: Corrected error message received from 0000:02:00.0 [ 6196.476811] pcieport 0000:02:00.0: PCIe Bus Error: severity=Corrected, type=Data Link Layer, (Receiver ID) [ 6196.476813] pcieport 0000:02:00.0:   device [8086:1578] error status/mask=00000080/00002000 [ 6196.476815] pcieport 0000:02:00.0:    [ 7] BadDLLP                [ 6205.396524] pcieport 0000:00:01.1: AER: Corrected error message received from 0000:02:00.0 [ 6205.396531] pcieport 0000:02:00.0: PCIe Bus Error: severity=Corrected, type=Data Link Layer, (Receiver ID) [ 6205.396532] pcieport 0000:02:00.0:   device [8086:1578] error status/mask=00000080/00002000 [ 6205.396534] pcieport 0000:02:00.0:    [ 7] BadDLLP                [ 6209.327376] pcieport 0000:00:01.1: AER: Corrected error message received from 0000:02:00.0 [ 6209.327382] pcieport 0000:02:00.0: PCIe Bus Error: severity=Corrected, type=Data Link Layer, (Receiver ID) [ 6209.327383] pcieport 0000:02:00.0:   device [8086:1578] error status/mask=00000080/00002000 [ 6209.327385] pcieport 0000:02:00.0:    [ 7] BadDLLP                [ 6223.901992] pcieport 0000:00:01.1: AER: Corrected error message received from 0000:02:00.0 [ 6223.901998] pcieport 0000:02:00.0: PCIe Bus Error: severity=Corrected, type=Data Link Layer, (Receiver ID) [ 6223.901999] pcieport 0000:02:00.0:   device [8086:1578] error status/mask=00000080/00002000 [ 6223.902001] pcieport 0000:02:00.0:    [ 7] BadDLLP                [ 6229.783301] pcieport 0000:00:01.1: AER: Corrected error message received from 0000:02:00.0 [ 6229.783308] pcieport 0000:02:00.0: PCIe Bus Error: severity=Corrected, type=Data Link Layer, (Receiver ID) [ 6229.783310] pcieport 0000:02:00.0:   device [8086:1578] error status/mask=00000080/00002000 [ 6229.783311] pcieport 0000:02:00.0:    [ 7] BadDLLP                [ 6239.971656] pcieport 0000:00:01.1: AER: Corrected error message received from 0000:02:00.0 [ 6239.971663] pcieport 0000:02:00.0: PCIe Bus Error: severity=Corrected, type=Data Link Layer, (Receiver ID) [ 6239.971664] pcieport 0000:02:00.0:   device [8086:1578] error status/mask=00000080/00002000 [ 6239.971666] pcieport 0000:02:00.0:    [ 7] BadDLLP                [ 6254.141327] pcieport 0000:00:01.1: AER: Corrected error message received from 0000:02:00.0 [ 6254.141333] pcieport 0000:02:00.0: PCIe Bus Error: severity=Corrected, type=Data Link Layer, (Receiver ID) [ 6254.141335] pcieport 0000:02:00.0:   device [8086:1578] error status/mask=00000080/00002000 [ 6254.141336] pcieport 0000:02:00.0:    [ 7] BadDLLP                [ 6263.020591] pcieport 0000:00:01.1: AER: Corrected error message received from 0000:02:00.0 [ 6263.020598] pcieport 0000:02:00.0: PCIe Bus Error: severity=Corrected, type=Data Link Layer, (Receiver ID) [ 6263.020599] pcieport 0000:02:00.0:   device [8086:1578] error status/mask=00000080/00002000 [ 6263.020601] pcieport 0000:02:00.0:    [ 7] BadDLLP                [ 6268.594608] pcieport 0000:00:01.1: AER: Corrected error message received from 0000:02:00.0 [ 6268.594615] pcieport 0000:02:00.0: PCIe Bus Error: severity=Corrected, type=Data Link Layer, (Receiver ID) [ 6268.594616] pcieport 0000:02:00.0:   device [8086:1578] error status/mask=00000080/00002000 [ 6268.594618] pcieport 0000:02:00.0:    [ 7] BadDLLP                [ 6287.102398] pcieport 0000:00:01.1: AER: Corrected error message received from 0000:02:00.0 [ 6287.102404] pcieport 0000:02:00.0: PCIe Bus Error: severity=Corrected, type=Data Link Layer, (Receiver ID) [ 6287.102406] pcieport 0000:02:00.0:   device [8086:1578] error status/mask=00000080/00002000 [ 6287.102407] pcieport 0000:02:00.0:    [ 7] BadDLLP                [ 6290.480436] pcieport 0000:00:01.1: AER: Corrected error message received from 0000:02:00.0 [ 6290.480443] pcieport 0000:02:00.0: PCIe Bus Error: severity=Corrected, type=Data Link Layer, (Receiver ID) [ 6290.480444] pcieport 0000:02:00.0:   device [8086:1578] error status/mask=00000080/00002000 [ 6290.480446] pcieport 0000:02:00.0:    [ 7] BadDLLP                 
[/code]
Last edit: 2 years 5 months ago by LCR.

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

More
2 years 5 months ago #301255 by LCR
Can someone point me to documentation on ethercat-conf.xml?
I believe this need to be modified for multiple drives?
Does someone have an example for multiple drives?

How is pid determined, what is configPdos
<slave idx="0" type="generic" vid="00000766" pid="00000402" configPdos="true">

What does this do?
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>

How is idx determined in
<syncManager idx="2" dir="out"> / <syncManager idx="3" dir="in"> /<pdo idx="1a00">



 

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

More
2 years 5 months ago #301626 by scottlaird
Let's start with the easy answer: the `idx="XXX"` value needs to match your slave ID, as shown in `ethercat slaves`.

Now for the fun answer: dcConf. This enabled "distributed clock" mode, without which most (but not all) servo drives won't work. *Generally* you need to use settings that match whatever the servo vendor says to use in their documentation. The problem is that Lichuan docs are kind of sparse right now. However, the values listed (assignActivate=300, sync0Cycle="*1", sync0Shift=0) are probably the most common.
The following user(s) said Thank You: tommylight, LCR

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

Time to create page: 0.086 seconds
Powered by Kunena Forum