(Need Help) Linux CNC + EtherCat + RPi 4 Setup

More
4 years 9 months ago #232954 by Dj Junior
Hi everyone
I hope not to have the wrong section, this is my first post from Italy. I am installing linuxcnc on rpi with ethercat following the instructions of
Bouni whom I thank in advance for the work done
gist.github.com/Bouni/8b4532d0bdf012bd83c65d3eb62f8aa2
and MetalMusings


I followed the instructions step by step but arrived at the last stage:
halcmd setp lcec.0.<module-no>.dout-<output-no> <state>
halcmd setp lcec.0.3.dout-3 1 (knowing my el2008 device is the third slave)
I get the following error: <commandline>: 0: parameter or pin 'lcec.0.3.dout-3' not found

In addition, starting linuxcnc I get the following error:
HAL: ERROR: thread 'servo-thread' not found

I've searched for a file or function with the name servo-thread but can't find anything

I'm probably missing something.

Can anyone help me?

pi@linuxcnc:~ $ ethercat slaves
0 0:0 PREOP + EK1100 EtherCAT-Koppler (2A E-Bus)
1 0:1 PREOP + EL1018 8Ch. Dig. Input 24V, 10�s
2 0:2 PREOP + EL1104 4K. Dig. Eingang 24V, 3ms, Sensorversorgung
3 0:3 PREOP + EL2008 8K. Dig. Ausgang 24V, 0.5A
4 0:4 PREOP + TQ870(COE)
5 0:5 PREOP + TQ870(COE)

Attachment not found

Attachment not found




Thanks in advance.

Ps: Thanks to everyone who wrote source code to make our life easier

Please Log in to join the conversation.

More
4 years 9 months ago #232957 by tommylight
Edit the .INI file, there should be and entry for
servo-period
in the emcmot section, something like this:
Code:
[EMCMOT] EMCMOT = motmod SERVO_PERIOD = 1000000

Please Log in to join the conversation.

More
4 years 9 months ago #232960 by arvidb

Hi everyone
halcmd setp lcec.0.3.dout-3 1 (knowing my el2008 device is the third slave)
I get the following error: <commandline>: 0: parameter or pin 'lcec.0.3.dout-3' not found
If your device is the third slave it will have number 2, since slave numbers start at 0.

Please Log in to join the conversation.

More
4 years 9 months ago #232964 by Dj Junior
Thanks for your quick reply
I entered SERVO_PERIOD = 1000000 in the axis.ini file but I get the same error

Please Log in to join the conversation.

More
4 years 9 months ago #232965 by Dj Junior
Sorry I made a mistake. It is in the fourth position

pi@linuxcnc:~/linuxcnc/configs/sim.axis $ ethercat slave
0 0:0 PREOP + EK1100 EtherCAT-Koppler (2A E-Bus)
1 0:1 PREOP + EL1018 8Ch. Dig. Input 24V, 10�s
2 0:2 PREOP + EL1104 4K. Dig. Eingang 24V, 3ms, Sensorversorgung
3 0:3 PREOP + EL2008 8K. Dig. Ausgang 24V, 0.5A
4 0:4 PREOP + TQ870(COE)
5 0:5 PREOP + TQ870(COE)

Please Log in to join the conversation.

More
4 years 9 months ago #232967 by tommylight

Please Log in to join the conversation.

More
4 years 9 months ago #232968 by Dj Junior
This error thread 'servo-thread' not found

pi@linuxcnc:~/linuxcnc/configs/sim.axis $ linuxcnc axis.ini
LINUXCNC - 2.8.2
Machine configuration directory is '/home/pi/linuxcnc/configs/sim.axis'
Machine configuration file is 'axis.ini'
Starting LinuxCNC...
application-specific initialization failed: no display name and no $DISPLAY environment variable
Error in startup script: invalid command name "."
while executing
". configure -borderwidth 0 -highlightthickness 0"
(file "/usr/lib/tcltk/linuxcnc/bin/popimage" line 35)
Found file(REL): ./ethercat.hal
Note: Using POSIX realtime
HAL: ERROR: thread 'servo-thread' not found
./ethercat.hal:3: addf failed
Shutting down and cleaning up LinuxCNC...
Note: Using POSIX realtime
LinuxCNC terminated with an error. You can find more information in the log:
/home/pi/linuxcnc_debug.txt
and
/home/pi/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal

Please Log in to join the conversation.

More
4 years 9 months ago #232984 by tommylight
Well that should have gotten rid of that error, so do check again if it is added to the correct section, otherwise i can not think of anything causing that error.
Can you upload the ini file here ?

Please Log in to join the conversation.

More
4 years 9 months ago #232989 by Dj Junior
Here are the configuration files

I noticed that the SERVO_PERIOD variable was already present so one was removed

Please Log in to join the conversation.

More
4 years 9 months ago #232995 by Hakan
Hi Dj, I made that video.
I would think you should add the HALFILE line as the last line in this section
Code:
[HAL] HALFILE = ethercat.hal # The run script first uses halcmd to execute any HALFILE # files, and then to execute any individual HALCMD commands. # # list of hal config files to run through halcmd # files are executed in the order in which they appear HALFILE = core_sim.hal HALFILE = sim_spindle_encoder.hal HALFILE = axis_manualtoolchange.hal HALFILE = simulated_home.hal HALFILE = check_xyz_constraints.hal

Put it after the "HALFILE = check_xyz_constraints.hal" line.


Then there is something with the gui, are you running this without a display? Not sure how that works.

Also, with that specific ethercat-conf.xml you will not see the individual devices, just that ethercat is up and running. To get the devices in there is another ethercat-conf.xml; it is in a forum-posts further in that thread. As others already have pointed out, the devices in ethercat-conf.xml must be ordered the same way as you see in your listing.[/code]

Please Log in to join the conversation.

Time to create page: 0.100 seconds
Powered by Kunena Forum