lcec and Operation not permitted

More
26 Sep 2025 10:19 - 26 Sep 2025 10:23 #335449 by Ri
I launched linuxcnc, "ethercat slaves" are in OP state, everything seems correct in the XML configuration, what could be the problem?

0  0:0  OP  +  2DM880-EC
1  0:1  OP  +  2DM880-EC
2  0:2  OP  +  2DM880-EC
3  0:3  OP  +  2DM556-EC
4  0:4  OP  +  2DM556-EC
5  0:5  OP  +  DIEWU EtherCAT-IO (Digital 16-Input/16-Output)

When running the configuration, such errors occur:

Debug file information:
Note: Using POSIX realtime

HAL: ERROR: duplicate thread name servo-thread
THREADS: ERROR: could not create thread 'servo-thread'
threads: rtapi_app_main: Operation not permitted (-1)
./Sodick.hal:20: waitpid failed /usr/bin/rtapi_app threads
./Sodick.hal:20: /usr/bin/rtapi_app exited without becoming ready
./Sodick.hal:20: insmod for threads failed, returned -1
shutdown.hal:4: parameter or pin 'lcec.0.0.enable' not found
3184
Stopping realtime threads
Unloading hal componentsNote: Using POSIX realtime

I tried to fix the access error:

groups
sodick lp dialout cdrom sudo audio video plugdev users ethercat linuxcnc ecusers realtime

And all lcec files installed from linuxcnc:

/usr/bin/lcec_configgen
/usr/bin/lcec_conf
/usr/lib/linuxcnc/modules/lcec.so
/etc/linuxcnc/lcec.conf
/usr/lib/linuxcnc/modules/lcec.so


Hal file:

# Загрузка EtherCAT компонента
loadusr -W lcec_conf /home/sodick/linuxcnc/configs/Sodick/ethercat-conf.xml
loadrt lcec

# Загрузка дополнительных HAL компонентов
loadrt siggen
loadrt or2
loadrt and2
loadrt not

# Создание thread с уникальным именем
loadrt threads name1=servo-thread period1=1000000 fp1=0

# Добавление функций в поток (правильный порядок)
addf motion-command-handler servo-thread  
addf motion-controller servo-thread
addf lcec.0.read servo-thread
addf lcec.read-all servo-thread
addf lcec.write-all servo-thread
addf lcec.0.write servo-thread

Last edit: 26 Sep 2025 10:23 by Ri.

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
26 Sep 2025 12:42 #335452 by tommylight
Replied by tommylight on topic lcec and Operation not permitted

# Создание thread с уникальным именем
loadrt threads name1=servo-thread period1=1000000 fp1=0

Seems like trying to load servo period twice, so try omitting the above line.

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

Time to create page: 0.050 seconds
Powered by Kunena Forum