Ethercat HAL driver

More
5 years 5 months ago #209306 by besriworld
Replied by besriworld on topic Ethercat HAL driver
Hello ,
i installed linuxc and EtherCAT and i can connect to the servo driver.
I'm trying to control the servo motor from the terminal, but I have a problem. The driver responds to these commands:

ethercat slaves

ethercat download -t int8 0x6060 0 3
ethercat upload -t int8 0x6061 0

I can change operation mode from terminal . but when I try to get information about the position of the axis I get 0x000000000 0

I think the problem comes from here:
The PDO is distributed in the CoE communication protocol area. In the EtherCAT system, the
master-to-slave data is transmitted using RxPDO (0X1600). The data length is 14 bytes and the
sub-index is 0x00~0x0D. The slave-to-master data is transmitted using TxPDO (0X1A00) and the
data length is 14 bytes.

How can I send / receive a larger data length (type). Now I can only upload/download commands type int8

Thansk!

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

More
5 years 5 months ago #209375 by db1981
Replied by db1981 on topic Ethercat HAL driver
Hello,

you can't access pdo communication from terminal.
Ethercat download/upload is sdo communication, which is not realtime.

For getting access to your pdos you would have to setup an read/write function in an realtime task.
In an linuxcnc environment you can do this with the linuxcnc-ethercat hal driver.
Using lcec_conf with an ethercat_config xml file created by you for your application, sets up this communication in your ethercat master and maps your pdos to linuxcnc hal pins.

the realtime part lcec read and write then reads and writes the pdos to/from your halpins.

read through this thread how to create an ethercat config xml file, also take a look at the example folder in linuxcnc-ethercat and the linuxcnc wiki.
The following user(s) said Thank You: besriworld

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

More
5 years 5 months ago #209735 by besriworld
Replied by besriworld on topic Ethercat HAL driver
Thanks ,
I tried to deal with the problem myself, but I can't handle it. I attach the configuration files. I'm trying to make one driver work with LinuxCNC. There can be a lot of nonsense inside. I'm just new to the world of Linux / LinuxCNC

File Attachment:

File Name: ethercat_c...5-21.hal
File Size:827 B

File Attachment:

File Name: ethercat_c...5-21.xml
File Size:1 KB

File Attachment:

File Name: ethercat_c...5-21.ini
File Size:1.46 KB

File Attachment:

File Name: linuxcnc.r...5-21.txt
File Size:4.71 KB

File Attachment:

File Name: dmesg_2021-05-21.txt
File Size:51.91 KB

File Attachment:

File Name: 6_ADTECH_X...21-2.xml
File Size:192.96 KB

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

More
5 years 5 months ago #209737 by db1981
Replied by db1981 on topic Ethercat HAL driver
Hello,

i am not completly shure whats wrong, how die you linuxcnc 2.9.(master) install? deb package ?

-first change the haltypes "special32" to "float" in your ethercat conf.xml . There exists no haltype "special32", haltypes are "bit,s32,u32,float,float-unsigned,complex" ...

if this not works, remove in your halfile the path before lcec_conf , if you have installed linuxcnc-ethercat correctly this is not neccesary.

post dmesg and linuxcnc output again....
The following user(s) said Thank You: besriworld

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

More
5 years 5 months ago #209783 by besriworld
Replied by besriworld on topic Ethercat HAL driver
Nothing changes

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

More
5 years 5 months ago #209795 by db1981
Replied by db1981 on topic Ethercat HAL driver
hmmm,

please go to your linuxcnc-ethercat folder, do an make clean and then
make install again.
are there any errors at compiling?

this is a little bit strange in dmesg :
[ 352.618901] lcec_conf[1094]: segfault at 5 ip 00007fd2b0e32fca sp 00007ffd37755b28 error 4 in libc-2.28.so[7fd2b0d1e000+148000]
The following user(s) said Thank You: besriworld

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

Time to create page: 0.638 seconds
Powered by Kunena Forum