Ethercat drive configuration woes

More
3 years 10 months ago #258760 by petervg
I took your files, only changed the PID/VID in the XML file to match the leadschine, fired up linuxcnc with these config files and my drive is working using your config files. So the config seems to be ok. I only have 1 drive, so only X is actually working. The other ones obviously produce a "joint following error".

On the other hand, the problem I have with my motor not running smoothly remains also with your files.

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

More
3 years 10 months ago #258762 by db1981
lcec.0.N.cia-statuswords should show the same as the ethercat upload command.

are there any errors in dmesg?

can you read out the interpolation period after linuxcnc start . with ethercat upload command

0x60C1 0x01 interpolation time period unit
0x60C1 0x02 interpolation time period index

has to be 1ms, like the servo_period and lcec apptimeperiod

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

More
3 years 10 months ago #258764 by db1981
Have you ever tested the native ASDA driver? "DeASDA"

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

More
3 years 10 months ago #258771 by mwc
I think it's something to do with clocks and drives not synchronising.

If I power the drives, but leave 2 and 3 disconnected (unplug CAT cable from drive 1 out), load up LinuxCNC, nothing works. Trying jog any axis results in a following error.
If I then reconnect the CAT cable, drives 2 and 3 (Y and Z) get configured, and are controllable under LinuxCNC.

This is the dmesg output -
Code:
[Dec 6 23:56]  [ +0.000006] EtherCAT 0: Starting EtherCAT-OP thread. [ +0.169449] EtherCAT 0: Domain 0: Working counter changed to 2/9. [ +0.308421] EtherCAT 0: Slave states on main device: OP. [ +0.692942] EtherCAT 0: Domain 0: Working counter changed to 3/9. [Dec 6 23:57] EtherCAT 0: 3 slave(s) responding on main device. [ +0.000005] EtherCAT 0: Slave states on main device: INIT, OP. [ +0.002685] EtherCAT 0: Scanning bus. [ +1.533575] EtherCAT 0: Bus scanning completed in 1532 ms. [ +0.000005] EtherCAT 0: Using slave 0 as DC reference clock. [ +0.012266] EtherCAT 0: Slave states on main device: PREOP, OP. [ +5.086653] EtherCAT WARNING 0-1: Slave did not sync after 5000 ms. [ +0.004006] EtherCAT 0: Domain 0: Working counter changed to 6/9. [ +1.004464] EtherCAT 0: Domain 0: Working counter changed to 9/9. [ +0.039295] EtherCAT 0: Slave states on main device: OP.

LinuxCNC triggers the ethercat master to start.
Master finds the first slave, and the working counter stops at 3/9.
I then plug in the extra two slaves, the master realises all 3 slaves are now online, then scans/configures them, at which point I can control those two drives/axes with LinuxCNC.

The warning about Slaves not syncing appears quite often. Is this likely to be related to the problem?


db1982,
0x60C1 comes up as an invalid dictionary object. I tried various sub-registers, but always the same response.
I've had a quick search of the manufacturer supplied XML for sync (180 hits!), and it looks like the 1C32 and 1C33 registers have various sync/time variables.

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

More
3 years 10 months ago #258892 by mwc
Just been having another go at this.
The connectivity as per the last post is repeatable (power up all drives with drives 2&3 CAT cable disconnected, load LinuxCNC, reconnect cable, and drives 2&3 will work).

Looking at some of the frames (ethercat debug 2), when the drives appear to not be working, you can see they are all returning the statusword in the raw frame data (in this case, they are reporting 0x0231 - decimal 561), yet this never shows up in the Hal Config lcec.0.N.cia-statusword. Hal config always shows the value as 0.
Yet when I get drives 2&3 operational, the statusword is reported correctly for those drives.

It's like there is something in the ethercat driver that isn't being correctly intialised.
Is there any kind of debug mode for the linuxcnc ethercat driver?

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

More
3 years 10 months ago #258907 by mwc
One other thing I've noticed, is if I try reading the controlword (6040) back from the drives via the terminal, if the drive isn't working, it returns 0.
When the drive is working correctly, it returns the value that LinuxCNC is writing.

Out of curiosity, I added 6040 to the read/in values in the xml, and it always returned the same value as LinuxCNC was writing (only ever 4 or 6), yet if I queried the drive via the terminal, it returned 0.
Looking at the frame data, the drive was also returning 0, so I'm assuming there is some form of state machine the ethercatmaster is maintaining, that the ethercat driver is querying.
Also, I can't get any drives to operate if I'm reading the controlword back as part of the pdos. Remove it from the pdos, and I can get drives 2 & 3 to enable.

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

Time to create page: 0.070 seconds
Powered by Kunena Forum