- Posts: 3
- Thank you received: 0
Ethercat HAL driver
- Doyle
- Offline
- New Member
-
Less
More
10 years 6 months ago #73981
by Doyle
Replied by Doyle on topic Ethercat HAL driver
Hi,
I'd be grateful for any help as I'm now completely stuck. I have 3 Indradrive Cs running through an EK1100 and get the following terminal error when trying to run my ini file:
Found file(REL): ./test4.hal
waiting for s.axes
waiting for s.axes
waiting for s.axes
waiting for s.axes
waiting for s.axes
waiting for s.axes
waiting for s.axes
USRMOT: ERROR: command timeout
waiting for s.axes
USRMOT: ERROR: command timeout
waiting for s.axes
USRMOT: ERROR: command timeout
USRMOT: ERROR: command timeout
A configuration error is preventing LinuxCNC from starting.
More information may be available when running from a terminal.
Shutting down and cleaning up LinuxCNC...
USRMOT: ERROR: command timeout
USRMOT: ERROR: command timeout
/usr/bin/linuxcnc: line 496: 22899 Killed $EMCTASK -ini "$INIFILE"
I have followed the tutorial as closely as possible but have probably gone wrong somewhere. I can see the drives in ethercat slave:
0 0:0 PREOP + EK1100 EtherCAT-Koppler (2A E-Bus)
1 0:1 PREOP + EL1008 8K. Dig. Eingang 24V, 3ms
2 0:2 PREOP + EL2008 8K. Dig. Ausgang 24V, 0.5A
3 4:0 PREOP + 0x00000024:0x00242804
4 3:0 PREOP + 0x00000024:0x00242804
5 1:0 PREOP + 0x00000024:0x00242804
linuxcnc_debug.txt has a whole load of these:
PID TTY STAT TIME COMMAND
22602 pts/0 S+ 0:00 milltask -ini /home/david/linuxcnc/configs/david/test4.ini
PID TTY STAT TIME COMMAND
22602 pts/0 S+ 0:00 milltask -ini /home/david/linuxcnc/configs/david/test4.ini
and linuxcnc_print.txt has:
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/realtime-3.4-9-rtai-686-pae/modules/linuxcnc
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/share/linuxcnc/tcl/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.5
INIFILE=/home/david/linuxcnc/configs/david/test4.ini
PARAMETER_FILE=linuxcnc.var
TASK=milltask
HALUI=halui
DISPLAY=axis
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
Starting TASK program: milltask
Starting DISPLAY program: axis
Killing task linuxcncsvr, PID=22557
Killing task milltask, PID=22602
Timeout, trying kill -9
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
The latency check shows this is probably not an ideal machine - servo jitter of around 15,000 when idle and 150,000 when (in particular) watching a Youtube video but it should at least load I think....
Many thanks,
David
I'd be grateful for any help as I'm now completely stuck. I have 3 Indradrive Cs running through an EK1100 and get the following terminal error when trying to run my ini file:
Found file(REL): ./test4.hal
waiting for s.axes
waiting for s.axes
waiting for s.axes
waiting for s.axes
waiting for s.axes
waiting for s.axes
waiting for s.axes
USRMOT: ERROR: command timeout
waiting for s.axes
USRMOT: ERROR: command timeout
waiting for s.axes
USRMOT: ERROR: command timeout
USRMOT: ERROR: command timeout
A configuration error is preventing LinuxCNC from starting.
More information may be available when running from a terminal.
Shutting down and cleaning up LinuxCNC...
USRMOT: ERROR: command timeout
USRMOT: ERROR: command timeout
/usr/bin/linuxcnc: line 496: 22899 Killed $EMCTASK -ini "$INIFILE"
I have followed the tutorial as closely as possible but have probably gone wrong somewhere. I can see the drives in ethercat slave:
0 0:0 PREOP + EK1100 EtherCAT-Koppler (2A E-Bus)
1 0:1 PREOP + EL1008 8K. Dig. Eingang 24V, 3ms
2 0:2 PREOP + EL2008 8K. Dig. Ausgang 24V, 0.5A
3 4:0 PREOP + 0x00000024:0x00242804
4 3:0 PREOP + 0x00000024:0x00242804
5 1:0 PREOP + 0x00000024:0x00242804
linuxcnc_debug.txt has a whole load of these:
PID TTY STAT TIME COMMAND
22602 pts/0 S+ 0:00 milltask -ini /home/david/linuxcnc/configs/david/test4.ini
PID TTY STAT TIME COMMAND
22602 pts/0 S+ 0:00 milltask -ini /home/david/linuxcnc/configs/david/test4.ini
and linuxcnc_print.txt has:
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/realtime-3.4-9-rtai-686-pae/modules/linuxcnc
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/share/linuxcnc/tcl/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.5
INIFILE=/home/david/linuxcnc/configs/david/test4.ini
PARAMETER_FILE=linuxcnc.var
TASK=milltask
HALUI=halui
DISPLAY=axis
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
Starting TASK program: milltask
Starting DISPLAY program: axis
Killing task linuxcncsvr, PID=22557
Killing task milltask, PID=22602
Timeout, trying kill -9
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
The latency check shows this is probably not an ideal machine - servo jitter of around 15,000 when idle and 150,000 when (in particular) watching a Youtube video but it should at least load I think....
Many thanks,
David
Please Log in or Create an account to join the conversation.
- Cpk_Rbt
- Offline
- Senior Member
-
Less
More
- Posts: 53
- Thank you received: 4
10 years 6 months ago - 10 years 6 months ago #74004
by Cpk_Rbt
Replied by Cpk_Rbt on topic Ethercat HAL driver
Frank,
Thanks for the suggestion!
This is the new output from dmesg after disabling the dcConf line of the config:
Then on shutdown of the HAL component, there is a datagram skipped warning:
Thanks for the suggestion!
This is the new output from dmesg after disabling the dcConf line of the config:
Warning: Spoiler!
[160612.811920] I-pipe: head domain RTAI registered.
[160612.811936] RTAI[hal]: compiled with gcc version 4.7.2 (Debian 4.7.2-5) .
[160612.812077] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[160612.812090] SYSINFO: CPUs 2, LINUX APIC IRQ 2312, TIM_FREQ 8333188, CLK_FREQ 1599883000, CPU_FREQ 1599883000
[160612.812101] RTAI_APIC_TIMER_IPI: RTAI DEFINED 2314, VECTOR 2314; LINUX_APIC_TIMER_IPI: RTAI DEFINED 2312, VECTOR 2312
[160612.812113] TIMER NAME: lapic; VARIOUSLY FOUND APIC FREQs: 8333188, 8333188, 8248250
[160612.832710] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[160612.832819] , <uses LINUX SYSCALLs>, kstacks pool size = 524288 bytes.
[160612.832832] RTAI[sched]: hard timer type/freq = APIC/8333188(Hz); default timing: oneshot; linear timed lists.
[160612.832842] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 1599883000 hz.
[160612.832849] RTAI[sched]: timer setup = 999 ns, resched latency = 2943 ns.
[160612.856924] RTAI[math]: loaded.
[160613.020555] EtherCAT: Requesting master 0...
[160613.020572] EtherCAT: Successfully requested master 0.
[160613.020640] EtherCAT 0: Domain0: Logical address 0x00000000, 12 byte, expected working counter 3.
[160613.020650] EtherCAT 0: Datagram domain0-0-main: Logical offset 0x00000000, 12 byte, type LRW.
[160613.020727] EtherCAT 0: Master thread exited.
[160613.020742] EtherCAT 0: Starting EtherCAT-OP thread.
[160613.147968] EtherCAT 0: Domain 0: Working counter changed to 2/3.
[160613.164990] EtherCAT 0: Slave states on main device: OP.
[160614.149824] EtherCAT 0: Domain 0: Working counter changed to 3/3.
[160612.811936] RTAI[hal]: compiled with gcc version 4.7.2 (Debian 4.7.2-5) .
[160612.812077] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[160612.812090] SYSINFO: CPUs 2, LINUX APIC IRQ 2312, TIM_FREQ 8333188, CLK_FREQ 1599883000, CPU_FREQ 1599883000
[160612.812101] RTAI_APIC_TIMER_IPI: RTAI DEFINED 2314, VECTOR 2314; LINUX_APIC_TIMER_IPI: RTAI DEFINED 2312, VECTOR 2312
[160612.812113] TIMER NAME: lapic; VARIOUSLY FOUND APIC FREQs: 8333188, 8333188, 8248250
[160612.832710] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[160612.832819] , <uses LINUX SYSCALLs>, kstacks pool size = 524288 bytes.
[160612.832832] RTAI[sched]: hard timer type/freq = APIC/8333188(Hz); default timing: oneshot; linear timed lists.
[160612.832842] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 1599883000 hz.
[160612.832849] RTAI[sched]: timer setup = 999 ns, resched latency = 2943 ns.
[160612.856924] RTAI[math]: loaded.
[160613.020555] EtherCAT: Requesting master 0...
[160613.020572] EtherCAT: Successfully requested master 0.
[160613.020640] EtherCAT 0: Domain0: Logical address 0x00000000, 12 byte, expected working counter 3.
[160613.020650] EtherCAT 0: Datagram domain0-0-main: Logical offset 0x00000000, 12 byte, type LRW.
[160613.020727] EtherCAT 0: Master thread exited.
[160613.020742] EtherCAT 0: Starting EtherCAT-OP thread.
[160613.147968] EtherCAT 0: Domain 0: Working counter changed to 2/3.
[160613.164990] EtherCAT 0: Slave states on main device: OP.
[160614.149824] EtherCAT 0: Domain 0: Working counter changed to 3/3.
Then on shutdown of the HAL component, there is a datagram skipped warning:
Code:
EtherCAT WARNING: Datagram def48420 (master-fsm) was SKIPPED 1 time.
Last edit: 10 years 6 months ago by Cpk_Rbt.
Please Log in or Create an account to join the conversation.
- Cpk_Rbt
- Offline
- Senior Member
-
Less
More
- Posts: 53
- Thank you received: 4
10 years 6 months ago #74070
by Cpk_Rbt
Replied by Cpk_Rbt on topic Ethercat HAL driver
We started tweaking the various configuration files and trying different things, and it seems like the drive didn't like the poll rate it was set at. The appTimePeriod in the EC config .xml is fine at 1ms (1000000), but the thread speed of the lcec.read-all and lcec.write-all functions doesn't like being at 1ms. I set it up to 1.5ms instead and it works great now.
Thanks again everyone for your help!
Thanks again everyone for your help!
Please Log in or Create an account to join the conversation.
- cgc
- Offline
- Senior Member
-
Less
More
- Posts: 40
- Thank you received: 10
10 years 6 months ago #74072
by cgc
Replied by cgc on topic Ethercat HAL driver
Please look at the discription of the servo amplifier.
I use Beckhoff AX2003 amplifier and the answere time of this is only 2,5ms.
regards Frank
I use Beckhoff AX2003 amplifier and the answere time of this is only 2,5ms.
regards Frank
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
Less
More
- Posts: 19899
- Thank you received: 4655
10 years 5 months ago #74365
by andypugh
Replied by andypugh on topic Ethercat HAL driver
Could the EtherCAT experts take a look at this forum post?
forum.linuxcnc.org/forum/18-computer/309...-with-linuxcnc#74300
forum.linuxcnc.org/forum/18-computer/309...-with-linuxcnc#74300
Please Log in or Create an account to join the conversation.
- Roger
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 1
10 years 5 months ago #74541
by Roger
Replied by Roger on topic Ethercat HAL driver
I'm trying to get a single axis Indradrive servo on Ethercat working and have a little problem - the servo won't rotate!
The config (attached) seems ok in that the axis gui comes up, motors homed and jogged etc. However the motor itself never moves
Comms to and from the drive works - the drive mode changes to OP (display on drive shows Ab then AF), I can see the torque change in the gui when force is applied to the shaft.
The servo works correctly in Indraworks and TwinCat.
Wireshark shows the position value is being sent to the drive. I have also sniffed the data from Twincat and there are some differences, I do not know enough about ethercat to determine if these differences are important or not. I can post extracts from those traces tomorrow if it will assist.
Can anyone assist? Sorry I'm new to this so please let me know what extra information I need to post.
Attached are the config files in use.
Regards,
Roger
The config (attached) seems ok in that the axis gui comes up, motors homed and jogged etc. However the motor itself never moves
Comms to and from the drive works - the drive mode changes to OP (display on drive shows Ab then AF), I can see the torque change in the gui when force is applied to the shaft.
The servo works correctly in Indraworks and TwinCat.
Wireshark shows the position value is being sent to the drive. I have also sniffed the data from Twincat and there are some differences, I do not know enough about ethercat to determine if these differences are important or not. I can post extracts from those traces tomorrow if it will assist.
Can anyone assist? Sorry I'm new to this so please let me know what extra information I need to post.
Attached are the config files in use.
Regards,
Roger
Please Log in or Create an account to join the conversation.
Time to create page: 5.395 seconds