Problems with Lichuan Ethercat servo drive

More
2 years 5 months ago #301712 by LCR
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.
Code:
 ~/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.

More
2 years 5 months ago #301757 by LCR
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.

More
2 years 5 months ago #301766 by LCR
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?

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

More
2 years 4 months ago #302285 by burnie
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.

More
2 years 4 months ago #302333 by LCR
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.

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

More
2 years 4 months ago - 2 years 4 months ago #303560 by crosjat
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.
Last edit: 2 years 4 months ago by crosjat.
The following user(s) said Thank You: Sandro, drboeller

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

Time to create page: 0.465 seconds
Powered by Kunena Forum