General Questions about using ethercat

More
1 year 7 months ago - 1 year 7 months ago #324299 by Tntmold
Is there a place that has instructions for new users on how to set up an ethercat machine once lcnc and ethercat is installed?
Last edit: 1 year 7 months ago by Tntmold.

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

More
1 year 7 months ago #324310 by rodw

Is there a place that has instructions for new users on how to set up an ethercat machine once lcnc and ethercat is installed?
Not really except the sticky posts here. Ethercat works with a master and slaves (devices). There is an open source Ethercat master from Etherlab that runs on Linux. A user wrote a hal driver that allows Linuxcnc to interface with the Ethercat master. There is a licence incompatibility between Linuxcnc and Ethercat itself so we have never been able to openly support it. Plus you had to compile source code to get the master installed. In recent times, Etherlab made their master available in  a Linux repository and kindly agreed to host our hal driver on that repository, So now anybody can install Ethercat easilly and we can configure apt in our installers on the downloads page so anybody who wants Ethercat can access that repository.

Once Ethercat is installed its set and forget but the installation is more complex because you need to configure two different systems.

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

More
1 year 7 months ago #324327 by Tntmold
Thank you for the reply. Following the video on this thread, I installed the xml provided by the manufacturer but when I try to run linuxcnc I get the error:

~/linuxcnc/configs/sim.axis$ linuxcnc lathe.ini
LINUXCNC - 2.9.3
Machine configuration directory is '/home/phil/linuxcnc/configs/sim.axis'
Machine configuration file is 'lathe.ini'
Starting LinuxCNC...
libnml/buffer/shmem.cc 320: Shared memory buffers toolCmd and toolCmd may conflict. (key=1004(0x3EC))
libnml/buffer/shmem.cc 320: Shared memory buffers toolSts and toolSts may conflict. (key=1005(0x3ED))
libnml/buffer/shmem.cc 320: Shared memory buffers emcError and emcError may conflict. (key=1003(0x3EB))
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Note: Using POSIX realtime
Found file(LIB): /usr/share/linuxcnc/hallib/basic_sim.tcl
setup_kins: cmd=loadrt trivkins coordinates=xz
Found file(REL): ./ethercat.hal
./ethercat.hal:1: lcec_conf exited without becoming ready
Shutting down and cleaning up LinuxCNC...
Note: Using POSIX realtime
LinuxCNC terminated with an error. You can find more information in the log:
/home/phil/linuxcnc_debug.txt
and
/home/phil/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal


linuxcnc_debug.txt contains:
13223
Stopping realtime threads
Unloading hal components

Linuxcnc_print.txt contains:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc/modules
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/lib/tcltk/linuxcnc/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
INIFILE=/home/phil/linuxcnc/configs/sim.axis/lathe.ini
VERSION=1.1
PARAMETER_FILE=sim-lathe.var
TPMOD=
HOMEMOD=
TASK=milltask
HALUI=halui
DISPLAY=axis
COORDINATES=X Z
KINEMATICS=trivkins coordinates=xz
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting HAL User Interface program: halui
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

Please help, where do I go from here?

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

More
1 year 7 months ago #324343 by rodw
need hal, ini and xml files.
Sounds like something is set wrong

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

More
1 year 7 months ago #324345 by Hakan
If you got an xml file from the manufacturer it is most likely an ESI file. Linuxcnc doesn't use that.
Linuxcnc reads out all necessary info from the drive itself. You can see most of that info yourself with the commands
Code:
ethercat pdos ethercat sdos ethercat -v slaves

You do need to connect pdos to hal pins and that is (mostly) what you do in the linuxcnc ethercat-conf.xml file.
A good starting point for that is often the output from the "lcec_configgen" command.
Which happens to use the three commands above and rearranges that info into a workable ethercat-conf.xml that you can then modify if needed and you don't like the naming etc.

I wonder how one can describe the configuration of a linuxcnc ethercat system. There isn't any stepconf or pncconf and it isn't realistic to create one due to the large variety and number of devices. I hope to get proven wrong there.
Starting point is a linuxcnc config from the linuxcnc simulator examples and then substitute pins.
lcec and ethercat-conf.xml, how to create the ethercat-conf.xml
Special on Cia402 drives
Modifications to hal


 

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

More
1 year 7 months ago #324358 by Tntmold
please see attached files

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

Time to create page: 0.082 seconds
Powered by Kunena Forum