Ethercat HAL driver

More
10 years 6 months ago #73885 by cgc
Replied by cgc on topic Ethercat HAL driver
<master idx="0" appTimePeriod="24770000" refClockSyncCycles="1">

"24770000", this is a very long time period, ~25ms
the servo period is more faster, servo_period_nsec=1000000, ~1ms
The following user(s) said Thank You: Cpk_Rbt

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

More
10 years 6 months ago - 10 years 6 months ago #73903 by Cpk_Rbt
Replied by Cpk_Rbt on topic Ethercat HAL driver
cgc,
I changed the ~25ms period to match the servo period at 1ms. It still hung up after running for a few minutes, so I changed them both to 25ms instead.

Andy,
I tried typing the HAL commands into the terminal one by one and tried to look at the kernel.log. It came back "file not found" but I am able to see some information using dmesg instead.
From dmesg output:
Code:
EtherCAT WARNING 0-0: Slave did not sync after 5028 ms.

Edit: I changed the periods back to 1ms and it did not display the "did not sync after 5000ms" message, but it did freeze the computer almost immediately.
Last edit: 10 years 6 months ago by Cpk_Rbt.

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

More
10 years 6 months ago #73905 by wazjebk
Replied by wazjebk on topic Ethercat HAL driver
Hi,

I had the same problem and than I changed the driver in ethercat configuration for my network card chip and after that I had no more problems.

Best regards.
The following user(s) said Thank You: Cpk_Rbt

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

More
10 years 6 months ago - 10 years 6 months ago #73912 by Cpk_Rbt
Replied by Cpk_Rbt on topic Ethercat HAL driver
wazjebk,
Thanks for the tip!
It looks like my network card is a Realtek RTL8111/8168B. I didn't see a driver option for that in the EtherCAT master, so I picked the r8169 driver.

In case anyone else has this problem in the future, I achieved the best results by re-installing the ethercat master using some flags on the configure step:
Code:
./configure --enable-r8169 --disable-generic --disable-e100 --disable-e1000 --disable-8139too
Last edit: 10 years 6 months ago by Cpk_Rbt.

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

More
10 years 6 months ago - 10 years 6 months ago #73936 by Cpk_Rbt
Replied by Cpk_Rbt on topic Ethercat HAL driver
Communications are now working between the master, HAL driver, and drive. Thanks everyone for the help!

HAL script:
Warning: Spoiler!


When I run the above script, I can run show pin lcec at the halcmd and it shows the current value of the motor position. Sometimes the value is 0, but if I run the command again it will update to the actual position.

The values next to lcec.read-all.time and lcec.write-all.time change every time I run show pin lcec, but the motor position never does.

If I quit and restart the hal script, it will update the position again (just the once) and then no more.
Checking dmesg shows the following:
Warning: Spoiler!


The "Slave did not sync after 5000ms" has me thinking that the watchdog timeout is not configured correctly. I have the divider at 0 and intervals at 1000, which I don't think is right, but I don't know what to put there instead. I tried changing the divider to 2498 based on a different configuration guide, but then get spam in dmesg about "Failed to set watchdog divider"

Thank you for reading through the wall of text! If you have any thoughts at this point, I would really appreciate it.
Last edit: 10 years 6 months ago by Cpk_Rbt.

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

More
10 years 6 months ago #73942 by cgc
Replied by cgc on topic Ethercat HAL driver
please disable this line for test:
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>

regards Frank

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

Time to create page: 0.473 seconds
Powered by Kunena Forum