General Questions about using ethercat

More
1 year 5 months ago #327517 by Tntmold
Thanks for the reply but I believe I made all those changes and it made no difference, did I do it wrong or is the problem something else?

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

More
1 year 5 months ago - 1 year 5 months ago #327527 by Hakan
Maybe lcec doesn't find the device or it doesn't go to OP.
From "ethercat slaves", are they in OP?
In halshow, can you see the pin lcec.0.0.statusword?
Any clues from "sudo dmesg", the last say 50 lines are of interest.

Edit. I looked a bit closer at the ethercat-conf.xml file.
You have double info, which I haven't seen before. Where does the info in that file come from?
I am not used to see a lot of PDOs in syncManager 0 and 1, but always have the PDOs
in SM 2 and SM 3. And you have the info there as well.

Can you test to replace the contents in ethercat-conf.xml of the clients with this
Code:
    <slave idx="0" fill in the rest in this line       <dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>       <syncManager idx="2" dir="out">         <pdo idx="1600">           <pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="controlword" halType="u32"/>           <pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="opmode" halType="s32"/>           <pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32"/> <pdoEntry idx="60FF" subIdx="00" bitLen="32" halPin="target-velocity" halType="s32"/>       </pdo>       </syncManager>       <syncManager idx="3" dir="in">         <pdo idx="1a00">           <pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="statusword" halType="u32"/>           <pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="opmode-display" halType="s32"/>           <pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-position" halType="s32"/> <pdoEntry idx="60FF" subIdx="00" bitLen="32" halPin="target-velocity" halType="s32"/>         </pdo>       </syncManager>     </slave>
Last edit: 1 year 5 months ago by Hakan.

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

More
1 year 5 months ago #327542 by Tntmold
ethercat slaves indicates drives are in PREOP
halshow shows no pins

sudo dmesg output:
[3991690.001706] EtherCAT DEBUG 0: ec_master_send_datagrams(device_index = 0)
[3991690.001707] EtherCAT DEBUG 0: Adding datagram 0x0B
[3991690.001708] EtherCAT DEBUG 0: frame size: 46
[3991690.001709] EtherCAT DEBUG 0: Sending frame:
[3991690.001709] EtherCAT DEBUG: FF FF FF FF FF FF 2C 44 FD 25 D0 28 88 A4 0E 10
[3991690.001714] EtherCAT DEBUG: 04 0B 01 00 30 01 02 00 00 00 00 00 00 00 00 00
[3991690.001719] EtherCAT DEBUG: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[3991690.001723] EtherCAT DEBUG: 00 00 00 00 00 00 00 00 00 00 00 00
[3991690.009637] EtherCAT DEBUG 0: Received frame:
[3991690.009639] EtherCAT DEBUG: FF FF FF FF FF FF 2E 44 FD 25 D0 28 88 A4 0E 10
[3991690.009645] EtherCAT DEBUG: 04 0B 01 00 30 01 02 40 00 00 02 00 01 00 00 00
[3991690.009650] EtherCAT DEBUG: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[3991690.009655] EtherCAT DEBUG: 00 00 00 00 00 00 00 00 00 00 00 00
[3991690.009663] EtherCAT DEBUG 0: ec_master_send_datagrams(device_index = 0)
[3991690.009664] EtherCAT DEBUG 0: Adding datagram 0x0C
[3991690.009665] EtherCAT DEBUG 0: frame size: 46
[3991690.009666] EtherCAT DEBUG 0: Sending frame:
[3991690.009666] EtherCAT DEBUG: FF FF FF FF FF FF 2C 44 FD 25 D0 28 88 A4 0E 10
[3991690.009671] EtherCAT DEBUG: 04 0C 02 00 30 01 02 00 00 00 00 00 00 00 00 00
[3991690.009676] EtherCAT DEBUG: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[3991690.009681] EtherCAT DEBUG: 00 00 00 00 00 00 00 00 00 00 00 00

The ethercat-conf.xml file came from the output of the command lcec_configgen


I replaced ethercat-conf.xml with your suggestions, and still get the same error

phil@SodickA:~/linuxcnc/configs/sim.axis$ linuxcnc lathe.ini
LINUXCNC - 2.9.3
Machine configuration directory is '/home/phil/linuxcnc/configs/sim.axis'
Machine configuration file is 'lathe.ini'
Starting LinuxCNC...
libnml/buffer/shmem.cc 320: Shared memory buffers toolCmd and toolCmd may conflict. (key=1004(0x3EC))
libnml/buffer/shmem.cc 320: Shared memory buffers toolSts and toolSts may conflict. (key=1005(0x3ED))
libnml/buffer/shmem.cc 320: Shared memory buffers emcError and emcError may conflict. (key=1003(0x3EB))
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Note: Using POSIX realtime
Found file(REL): ./ethercat.hal
./ethercat.hal:50: Pin 'lcec.0.0.statusword' does not exist
Shutting down and cleaning up LinuxCNC...
Note: Using POSIX realtime
LinuxCNC terminated with an error.  You can find more information in the log:
    /home/phil/linuxcnc_debug.txt
and
    /home/phil/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal
 

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

More
1 year 5 months ago #327551 by rodw
This is not an Ethercat issue. Its your syntax error in hal
Use standard debugging.
Run Linuxcnc from the command line so errors are reported in the console.
Read the error message, Comment out the offending line (line 50) with a #
Continue to comment out errors until the config loads.
Use Halshow to review pin names. Work out what the correct pin name is and correct your hal file.
easy!
 
The following user(s) said Thank You: Tntmold

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

More
1 year 5 months ago #327555 by Hakan
Maybe not ethercat as such but an lcec issue.
There are so many places this can go wrong, syntax mistakes.
Now I saw another thing. There is a name="D1" in the client line.
Then you should use lcec.0.D1 instead of lcec.0.0
The following user(s) said Thank You: Tntmold

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

More
1 year 5 months ago #327557 by rodw

Maybe not ethercat as such but an lcec issue.
 
lcec is Ethercat (the Linuxcnc ethercat hal driver)

following the troubleshooting I outlined would unearth it all.
The following user(s) said Thank You: Tntmold

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

Time to create page: 0.252 seconds
Powered by Kunena Forum