Problems with Lichuan Ethercat servo drive
23 May 2024 20:40 #301255
by LCR
Replied by LCR on topic Problems with Lichuan Ethercat servo drive
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">
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.
- scottlaird
- Offline
- Premium Member
Less
More
- Posts: 136
- Thank you received: 155
27 May 2024 23:40 #301626
by scottlaird
Replied by scottlaird on topic Problems with Lichuan Ethercat servo drive
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.
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.
29 May 2024 00:35 #301712
by LCR
Replied by LCR on topic Problems with Lichuan Ethercat servo drive
I have made some progress, I have LinucCNC reading in the index pulse on each revolution.
I still want to read and write the DIO. So far no luck. I also need to wire up another drive (at shop).
I've added
probe-cmd
probe-status
probe1-rising
DIN-cia, which is not doing anything
I am trying to use the index pulses to home a gantry system. If anyone has an idea about how to get there from here, please let me know.
Helpful doc,
docs.etherlab.org/ethercat/1.5/pdf/ethercat_doc.pdf
more LCLC-E Series Servo User Manual (detailed version)20240411 .pdf'
I still want to read and write the DIO. So far no luck. I also need to wire up another drive (at shop).
I've added
probe-cmd
probe-status
probe1-rising
DIN-cia, which is not doing anything
I am trying to use the index pulses to home a gantry system. If anyone has an idea about how to get there from here, please let me know.
~/linuxcnc/bin/halcmd show pin lcec
Component Pins:
Owner Type Dir Value Name
39 u32 OUT 0x00000000 lcec.0.0.DIN-cia ==> x-DIN-cia
39 s32 OUT -145501 lcec.0.0.actual-position ==> x-drv-act-pos
39 s32 OUT 0 lcec.0.0.actual-torque
39 s32 OUT -1966 lcec.0.0.actual-velocity
39 u32 IN 0x00000004 lcec.0.0.cia-controlword <== x-controlword
39 u32 OUT 0x00000250 lcec.0.0.cia-statusword ==> x-statusword
39 s32 IN 8 lcec.0.0.opmode <== x-modes-of-operation
39 s32 OUT 8 lcec.0.0.opmode-display ==> x-opmode-display
39 u32 IN 0x00000017 lcec.0.0.probe-cmd <== x-probe-cmd
39 u32 OUT 0x00000003 lcec.0.0.probe-status ==> x-probe-status
39 s32 OUT -123211 lcec.0.0.probe1-rising ==> x-probe1-rising
39 bit OUT TRUE lcec.0.0.slave-online
39 bit OUT TRUE lcec.0.0.slave-oper
39 bit OUT FALSE lcec.0.0.slave-state-init
39 bit OUT TRUE lcec.0.0.slave-state-op
39 bit OUT FALSE lcec.0.0.slave-state-preop
39 bit OUT FALSE lcec.0.0.slave-state-safeop
39 s32 IN -145500 lcec.0.0.target-position <== x-drv-target-pos
39 bit OUT TRUE lcec.0.all-op
39 bit OUT TRUE lcec.0.link-up
39 s32 OUT 0 lcec.0.pll-err
39 s32 OUT 0 lcec.0.pll-out
39 u32 OUT 0x00000000 lcec.0.pll-reset-count
39 s32 OUT 0 lcec.0.read.time
39 u32 OUT 0x00000001 lcec.0.slaves-responding
39 bit OUT FALSE lcec.0.state-init
39 bit OUT TRUE lcec.0.state-op
39 bit OUT FALSE lcec.0.state-preop
39 bit OUT FALSE lcec.0.state-safeop
39 s32 OUT 0 lcec.0.write.time
39 bit OUT TRUE lcec.all-op
36 u32 OUT 0x00000001 lcec.conf.master-count
36 u32 OUT 0x00000001 lcec.conf.slave-count
39 bit OUT TRUE lcec.link-up
39 s32 OUT 6596 lcec.read-all.time
39 u32 OUT 0x00000001 lcec.slaves-responding
39 bit OUT FALSE lcec.state-init
39 bit OUT TRUE lcec.state-op
39 bit OUT FALSE lcec.state-preop
39 bit OUT FALSE lcec.state-safeop
39 s32 OUT 16436 lcec.write-all.time
Helpful doc,
docs.etherlab.org/ethercat/1.5/pdf/ethercat_doc.pdf
more LCLC-E Series Servo User Manual (detailed version)20240411 .pdf'
Please Log in or Create an account to join the conversation.
29 May 2024 17:44 #301757
by LCR
Replied by LCR on topic Problems with Lichuan Ethercat servo drive
So I set P03.08 to 1 from the buttons on the amplifier. I also had DI3 jumped HI. This caused errors. I removed the jumper and it worked as normal. I then put the jumper back, and if if the linuxcnc enable button was off, the drive would start.
Please Log in or Create an account to join the conversation.
29 May 2024 19:31 #301766
by LCR
Replied by LCR on topic Problems with Lichuan Ethercat servo drive
I can read he first 3 DINs with
<pdoEntry idx="60FD" subIdx="00" bitLen="32" halPin="mydigitalin" halType="u32"/>
DIN 3 and 4 still do nothing.
Has anyone got the DINs 3/4 working?
<pdoEntry idx="60FD" subIdx="00" bitLen="32" halPin="mydigitalin" halType="u32"/>
DIN 3 and 4 still do nothing.
Has anyone got the DINs 3/4 working?
Please Log in or Create an account to join the conversation.
04 Jun 2024 01:24 #302285
by burnie
Replied by burnie on topic Problems with Lichuan Ethercat servo drive
The representative from Lichuan told me that the company has assigned engineers to work out the LCNC EtherCAT compatibility issues. I have sent them a few configurations from other LCNC EtherCAT examples and explained how we managed to get the servo to run. I’m new to LCNC and have zero knowledge of EtherCAT and won’t be able to help any further. If there’s anything you want to pass along to the engineers, such as documentation and configurations, or if you have any questions for them, including questions about missing information in the documentation, just leave them on this thread and I’ll pass them along.
The following user(s) said Thank You: tommylight, besriworld
Please Log in or Create an account to join the conversation.
04 Jun 2024 18:07 #302333
by LCR
Replied by LCR on topic Problems with Lichuan Ethercat servo drive
That is great that you have fostered a contact at Lichuan.
<pdoEntry idx="60FD" subIdx="00" bitLen="32" halPin="mydigitalin" halType="u32"/>
only returns the DIN values if the input is assigned to some function. Please ask if there is some null function that I can spoof the drive with, so it will return the present value of all the inputs even if the input is not assigned a real function. I am actually just going to add a parallel port card or use the arduino usb link project for IO so even this doesn't really matter.
What I am trying to accomplish for gantry homing is to use the home marker inputs and the index pulses from paired drives to home my gantry. What I want to do is to drive the gantry in the home direction until one home marker is triggered, then drive the gantry in the opposite direction, while capturing the Index pulses until the other drive is off it's home marker. I can then use one of the marker values as the home position, and the difference (modulus cnt ppr) of the two counters and an offset to zero the geared axis. Then all will be good. If anyone is a homing expert, any help is appreciated.
I do have one criticism, and that is that the drives do not have Safe Disable Inputs(dual). Yes you can program an input to stop the drive, and that does work, but it won't pass any Canadian safety inspection. With these drives you need 2 external relays in serial, with monitoring etc... to cut power to the drive. I will have to have a please stop button, and an EStop button.
<pdoEntry idx="60FD" subIdx="00" bitLen="32" halPin="mydigitalin" halType="u32"/>
only returns the DIN values if the input is assigned to some function. Please ask if there is some null function that I can spoof the drive with, so it will return the present value of all the inputs even if the input is not assigned a real function. I am actually just going to add a parallel port card or use the arduino usb link project for IO so even this doesn't really matter.
What I am trying to accomplish for gantry homing is to use the home marker inputs and the index pulses from paired drives to home my gantry. What I want to do is to drive the gantry in the home direction until one home marker is triggered, then drive the gantry in the opposite direction, while capturing the Index pulses until the other drive is off it's home marker. I can then use one of the marker values as the home position, and the difference (modulus cnt ppr) of the two counters and an offset to zero the geared axis. Then all will be good. If anyone is a homing expert, any help is appreciated.
I do have one criticism, and that is that the drives do not have Safe Disable Inputs(dual). Yes you can program an input to stop the drive, and that does work, but it won't pass any Canadian safety inspection. With these drives you need 2 external relays in serial, with monitoring etc... to cut power to the drive. I will have to have a please stop button, and an EStop button.
Please Log in or Create an account to join the conversation.
22 Jun 2024 18:32 - 22 Jun 2024 18:46 #303560
by crosjat
Replied by crosjat on topic Problems with Lichuan Ethercat servo drive
Hi,
I was able.to reproduce the problem.
linuxcnc tries to set the operational state before setting the synchronisation mode. This causes the drive to go into error state.
I was able to simulate this in the twincat shell.
By delaying operational mode(by default) until sync is started the drive can be put into OP mode. If the option "delaying OP mode until start of sync" is disabled in twincat the drive shows the same _f0 error after setting status to OP. See github.com/OpenEtherCATsociety/SOEM/issues/609
And
infosys.beckhoff.com/index.php?content=..../2469122443.html&id=
for more Info.
I was able.to reproduce the problem.
linuxcnc tries to set the operational state before setting the synchronisation mode. This causes the drive to go into error state.
I was able to simulate this in the twincat shell.
By delaying operational mode(by default) until sync is started the drive can be put into OP mode. If the option "delaying OP mode until start of sync" is disabled in twincat the drive shows the same _f0 error after setting status to OP. See github.com/OpenEtherCATsociety/SOEM/issues/609
And
infosys.beckhoff.com/index.php?content=..../2469122443.html&id=
for more Info.
Last edit: 22 Jun 2024 18:46 by crosjat.
Please Log in or Create an account to join the conversation.
26 Jun 2024 19:08 #303839
by drboeller
Replied by drboeller on topic Problems with Lichuan Ethercat servo drive
Very good crosjat, have you tried to use the openethercat master? Does it work with linuxcnc? Ive searched for the code which handles the synchronisation but didnt find it. I think its in the ethercat master lib.
Please Log in or Create an account to join the conversation.
- ihavenofish
- Offline
- Platinum Member
Less
More
- Posts: 686
- Thank you received: 124
29 Jun 2024 06:52 - 29 Jun 2024 08:11 #304004
by ihavenofish
Replied by ihavenofish on topic Problems with Lichuan Ethercat servo drive
just subscribing to this thread...
Anyone tune these up yet and move a machine? Very curious to see how they perform. When you factor cables and psus, these come out even cheaper than JMC integrated servos, and less than half of delta b3s, so id lover to see how they actually perform.
Anyone tune these up yet and move a machine? Very curious to see how they perform. When you factor cables and psus, these come out even cheaper than JMC integrated servos, and less than half of delta b3s, so id lover to see how they actually perform.
Last edit: 29 Jun 2024 08:11 by ihavenofish.
Please Log in or Create an account to join the conversation.
Time to create page: 0.103 seconds