linuxcnc-ethercat icon indicating copy to clipboard operation
linuxcnc-ethercat copied to clipboard

could not insert module lcec.ko

Open ilyaq opened this issue 6 years ago • 17 comments

Hello sittner Thank you for your work I installed your driver using deb http://repo.modusoft.de/linuxcnc/wheezy ./ My problem is running the program using loadrt lcec in the hal file. I getting that: Error: could not insert module /usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/lcec.ko: Unknown symbol in module linuxcnc_debug.txt linuxcnc_print.txt

I know little about this and I hope for Your help. Would you mind pointing me in the right direction?

ilyaq avatar Mar 30 '18 14:03 ilyaq

Hi, ilyaq Are you using RTAI, are not you? I think the new version only works for RP-PREEMPT .. regards Chimeno

robochime avatar Mar 31 '18 16:03 robochime

Hi, chimeno I think you're right. I'm using the LinuxCNC distribute 2.7.12. Can you tell me where to find knowledge about RP-PREEMPT? uname -a Linux debian 3.4-9-rtai-686-pae #1 SMP PREEMPT Debian 3.4.55-4linuxcnc i686 GNU/Linux SMP PREEMPT is this not appropriate? regards ilyaq

ilyaq avatar Apr 02 '18 05:04 ilyaq

hi ilyaq important is "debian 3.4-9-rtai-686-pae" your core kernel is rtai, there are two options or re-copy the kenner or if you do not have much experience install linuxcnc again from this location that is formed by 4.9.5 with core RT-PREEMPT http://www.linuxcnc.org/testing-stretch-rtpreempt/ regards Chimeno

robochime avatar Apr 02 '18 07:04 robochime

Hi, chimeno I used the second option and installed linuxcnc which you advised me. It helped, thank you! But now I get another error. I am trying to run swm-fm45a example

To run under a debugger with I/O, use e.g., sudo env RTAPI_UID=id -u RTAPI_FIFO_PATH=$HOME/.rtapi_fifo gdb rtapi_app ./swm-fm45a.hal:16: waitpid failed /usr/bin/rtapi_app trivkins ./swm-fm45a.hal:16: /usr/bin/rtapi_app exited without becoming ready ./swm-fm45a.hal:16: insmod for trivkins failed, returned -1

I'm not sure I installed the HAL-driver correctly

regards ilyaq

ilyaq avatar Apr 02 '18 14:04 ilyaq

hi ilyaq, If you are running it and the configuration is not correct, it will give you an error, start with a module and gradually add it. regards Albert

robochime avatar Apr 03 '18 20:04 robochime

Hi, chimeno First, Thank you for your help May I clarify? What configuration do you mean? I can't use loadrt lcec in my hal file. I get the error Do you know what this is about? XML, ini, hal or are there other configurations I could skip? thanks ilya

ilyaq avatar Apr 04 '18 09:04 ilyaq

hi ilyaq, what modules do you have?

.hal file

load ethercat config parser

loadusr -W lcec_conf ethercat-conf.xml "edit with the modules you have"

load ethercat realtime module

loadrt lcec addf lcec.read-all servo-thread addf lcec.write-all servo-thread

regards Chimeno

robochime avatar Apr 04 '18 20:04 robochime

Hi Chimeno, i have two servo drive Delta ASDA A2-E. If I don't edit .xml file, then the program will not start? I mean. I used loadusr -W lcec_conf ethercat-conf.xml and loadrt lcec in .hal file, but I get an error when the program reaches the line containing loadrt lcec. But I didn't edit the .xml file. Can whether the reason be in this? Thanks Ilya

================================================

Yeah, I made sure it was. Now I need to figure out how to properly create this .xml file for my modules

ilyaq avatar Apr 05 '18 06:04 ilyaq

hi ilyaq, sure the error comes from the .XML file, if you only have two modules you would have to edit it in this way I think, I do not use the DELTA servo, I do not know if I can help you a lot, regards Chimeno

edit .xml

masters>    master idx = "0" appTimePeriod = "1000000" refClockSyncCycles = "1000">        slave idx = "0" type = "DeASDA" name = "3A1">        dcConf assignActivate = "300" sync0Cycle = "* 1" sync0Shift = "- 25000" />      / slave>      slave idx = "1" type = "DeASDA" name = "3A2">        dcConf assignActivate = "300" sync0Cycle = "* 1" sync0Shift = "- 25000" />      / slave>    / master> / masters>

robochime avatar Apr 05 '18 18:04 robochime

Hi chimeno, You've already helped me a lot. And I'm ashamed of myself, but I still need help. I've been trying to figure it out on my own, but so far, it's not working.

I get this error message: ./swm-fm45a-io.hal:41: parameter or pin 'lcec.0.3A1.srv-pos-scale' not found Do you know what this is about?

Regards, Ilya

ilyaq avatar Apr 10 '18 08:04 ilyaq

Hello Ilya,    if it is a common error, it means that in your .hal file you have connected a pin to 'lcec.0.3A1.srv-pos-scale that does not exist, looking at the file src / lcec_deasda.c I think it would be "lcec.0.3A1. pos-scale ", prove if it works for you now.

regards Chimeno

robochime avatar Apr 11 '18 19:04 robochime

Hello Chimeno, Yes, It worked! Many thanks! Following your example, i found in file lcec_deasda.c this parameter - pos-scale and used it instead of srv-pos-scale.

Now I get the following error: ./swm-fm45a-io.hal:70: Pin 'lcec.0.3A1.srv-pos-extenc' does not exist In the hal file is written as follows: # motor encoder position is used as joint # position feedback net x-pos-fb <= lcec.0.3A1.srv-pos-extenc

I tried to find information in the lcec_deasda.c and lcec_deasda.h files, and tried using different parameters from them, but so far without success.

regards Ilya

ilyaq avatar Apr 12 '18 07:04 ilyaq

Hello Ilya, It's the same mistake that happened before, I think it would be something like this:

#motor encoder position is used as joint #position feedback net x-post-fb <= lcec.0.3A1.srv-vel-fb

regards Chimeno

robochime avatar Apr 12 '18 19:04 robochime

Hello chimeno, Thank you for your time and help

It works, but it's wrong. This is a speed feedback, not a position. and when the engine stops, the data on this axis is reset to zero. So far, I'm still looking for the right parameter

Regards Ilya

ilyaq avatar Apr 16 '18 05:04 ilyaq

Hello Ilya, you can look at the issue of the "generic" driver, it can help you with the tests. regards Chimeno

robochime avatar Apr 16 '18 21:04 robochime

Hello chimeno I found the right pin. If anyone needs it, then you need to use the following net x-post-fb <= lcec.0.3A1.enc-pos

I am very grateful to you, chimeno! regards Ilya

ilyaq avatar Apr 18 '18 08:04 ilyaq

Hello Ilya, I'm glad you finally work well! It has been a pleasure to help you! regards Chimeno

robochime avatar Apr 18 '18 20:04 robochime