- Posts: 40
- Thank you received: 0
Ethercat HAL driver
Please Log in to join the conversation.
- CNCDestroyer
- Offline
- New Member
-
- Posts: 2
- Thank you received: 0
the slaves are shown in terminal.
i cant start the example.
I searched for a solution but i found nothing in the web.
i want to test the i/o for a new solution for my milling machine. don't now how without example.
Print file information:
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
LINUXCNC - 2.7.0
Machine configuration directory is '/home/ethercat/linuxcnc/configs/examples/swm-fm45a'
Machine configuration file is 'swm-fm45a.ini'
INIFILE=/home/ethercat/linuxcnc/configs/examples/swm-fm45a/swm-fm45a.ini
PARAMETER_FILE=linuxcnc.var
TASK=milltask
HALUI=
DISPLAY=axis
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Found file(REL): ./swm-fm45a.hal
Shutting down and cleaning up LinuxCNC...
Killing task linuxcncsvr, PID=7148
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Debug file information:
.
Error: could not insert module /usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/lcec.ko: Invalid parameters
./swm-fm45a.hal:22: exit value: 1
./swm-fm45a.hal:22: insmod for lcec failed, returned -1
See the output of 'dmesg' for more information.
7148
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components
Kernel message information:
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.4-9-rtai-686-pae (Debian 3.4.55-4linuxcnc) () (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP PREEMPT Debian 3.4.55-4linuxcnc
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
[ 0.000000] BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
[ 0.000000] BIOS-e820: 00000000000e8000 - 0000000000100000 (reserved)
[ 0.000000] BIOS-e820: 0000000000100000 - 000000003f7e4000 (usable)
[ 0.000000] BIOS-e820: 000000003f7e4000 - 0000000040000000 (reserved)
[ 0.000000] BIOS-e820: 00000000d0000000 - 00000000e0000000 (reserved)
[ 0.000000] BIOS-e820: 00000000fec00000 - 0000000100000000 (reserved)
[ 0.000000] Notice: NX (Execute Disable) protection missing in CPU!
[ 0.000000] SMBIOS 2.3 present.
[ 0.000000] DMI: Hewlett-Packard HP Compaq dc5100 MT(PW099ET)/09E0h, BIOS 786C2 v01.07 08/25/2005
[ 0.000000] e820 update range: 0000000000000000 - 0000000000010000 (usable) ==> (reserved)
[ 0.000000] e820 remove range: 00000000000a0000 - 0000000000100000 (usable)
[ 0.000000] last_pfn = 0x3f7e4 max_arch_pfn = 0x100000
[ 0.000000] MTRR default type: uncachable
[ 0.000000] MTRR fixed ranges enabled:
[ 0.000000] 00000-9FFFF write-back
[ 0.000000] A0000-BFFFF uncachable
[ 0.000000] C0000-E7FFF write-protect
[ 0.000000] E8000-EFFFF write-back
[ 0.000000] F0000-FFFFF write-protect
[ 0.000000] MTRR variable ranges enabled:
[ 0.000000] 0 base 000000000 mask FC0000000 write-back
[ 0.000000] 1 base 03F800000 mask FFF800000 uncachable
[ 0.000000] 2 disabled
[ 0.000000] 3 disabled
[ 0.000000] 4 disabled
[ 0.000000] 5 disabled
[ 0.000000] 6 disabled
[ 0.000000] 7 disabled
[ 0.000000] x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
[ 0.000000] found SMP MP-table at [c00fe700] fe700
[ 0.000000] initial memory mapped : 0 - 01800000
[ 0.000000] Base memory trampoline at [c009b000] 9b000 size 16384
[ 0.000000] init_memory_mapping: 0000000000000000-00000000377fe000
[ 0.000000] 0000000000 - 0000400000 page 4k
[ 0.000000] 0000400000 - 0037400000 page 2M
[ 0.000000] 0037400000 - 00377fe000 page 4k
[ 0.000000] kernel direct mapping tables up to 0x377fdfff @ [mem 0x017f8000-0x017fffff]
[ 0.000000] RAMDISK: 36530000 - 37290000
[ 0.000000] ACPI: RSDP 000e9c10 00014 (v00 COMPAQ)
[ 0.000000] ACPI: RSDT 3f7f4040 00038 (v01 COMPAQ CPQ0968 20050825 00000000)
[ 0.000000] ACPI: FACP 3f7f40ec 00074 (v01 COMPAQ GRANTSD 00000001 00000000)
[ 0.000000] ACPI: DSDT 3f7f4267 013F3 (v01 COMPAQ DSDT 00000001 MSFT 0100000E)
[ 0.000000] ACPI: FACS 3f7f4000 00040
[ 0.000000] ACPI: SSDT 3f7f565a 0303F (v01 COMPAQ PROJECT 00000001 MSFT 0100000E)
[ 0.000000] ACPI: APIC 3f7f4160 00068 (v01 COMPAQ GRANTSD 00000001 00000000)
[ 0.000000] ACPI: ASF! 3f7f41c8 00063 (v32 COMPAQ GRANTSD 00000001 00000000)
[ 0.000000] ACPI: MCFG 3f7f422b 0003C (v01 COMPAQ GRANTSD 00000001 00000000)
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] 127MB HIGHMEM available.
[ 0.000000] 887MB LOWMEM available.
[ 0.000000] mapped low ram: 0 - 377fe000
[ 0.000000] low ram: 0 - 377fe000
[ 0.000000] Zone PFN ranges:
[ 0.000000] DMA 0x00000010 -> 0x00001000
[ 0.000000] Normal 0x00001000 -> 0x000377fe
[ 0.000000] HighMem 0x000377fe -> 0x0003f7e4
[ 0.000000] Movable zone start PFN for each node
[ 0.000000] Early memory PFN ranges
[ 0.000000] 0: 0x00000010 -> 0x0000009f
[ 0.000000] 0: 0x00000100 -> 0x0003f7e4
[ 0.000000] On node 0 totalpages: 259955
[ 0.000000] free_area_init_node: node 0, pgdat c1498a00, node_mem_map f5d40200
[ 0.000000] DMA zone: 32 pages used for memmap
[ 0.000000] DMA zone: 0 pages reserved
[ 0.000000] DMA zone: 3951 pages, LIFO batch:0
[ 0.000000] Normal zone: 1744 pages used for memmap
[ 0.000000] Normal zone: 221486 pages, LIFO batch:31
[ 0.000000] HighMem zone: 256 pages used for memmap
[ 0.000000] HighMem zone: 32486 pages, LIFO batch:7
[ 0.000000] Using APIC driver default
[ 0.000000] ACPI: PM-Timer IO Port: 0xf808
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1])
[ 0.000000] ACPI: IOAPIC (id[0x01] address[0xfec00000] gsi_base[0])
[ 0.000000] IOAPIC[0]: apic_id 1, version 32, address 0xfec00000, GSI 0-23
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[ 0.000000] ACPI: IRQ0 used by override.
[ 0.000000] ACPI: IRQ2 used by override.
[ 0.000000] ACPI: IRQ9 used by override.
[ 0.000000] Using ACPI (MADT) for SMP configuration information
[ 0.000000] SMP: Allowing 2 CPUs, 0 hotplug CPUs
[ 0.000000] nr_irqs_gsi: 40
[ 0.000000] PM: Registered nosave memory: 000000000009f000 - 00000000000a0000
[ 0.000000] PM: Registered nosave memory: 00000000000a0000 - 00000000000e8000
[ 0.000000] PM: Registered nosave memory: 00000000000e8000 - 0000000000100000
[ 0.000000] Allocating PCI resources starting at 40000000 (gap: 40000000:90000000)
[ 0.000000] setup_percpu: NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:2 nr_node_ids:1
[ 0.000000] PERCPU: Embedded 17 pages/cpu @f77d5000 s48384 r0 d21248 u69632
[ 0.000000] pcpu-alloc: s48384 r0 d21248 u69632 alloc=17*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 257923
[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.4-9-rtai-686-pae root=UUID=d791916b-7e0e-4b0c-b54a-c726988ef12e ro
Thanks for helping
Please Log in to join the conversation.
Hello,
I installed LinuxCNC fresh from LiveCD 2.7. Then I installed ethercat as from wiki.linuxcnc.org/cgi-bin/wiki.pl?EtherCatDriver
I connect Beckhoff devices and issue comand:
ethercat slaves
0 7:0 PREOP + EK1100 EtherCAT-Koppler (2A E-Bus)
1 7:1 PREOP + EL2008 8K. Dig. Ausgang 24V, 0.5A
2 7:2 PREOP + EL1008 8Ch. Dig. Input 24V, 3ms
I created test-conf.xml:
<masters>
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="1000">
<slave idx="0" type="EK1100" />
<slave idx="1" type="EL2008" />
<slave idx="2" type="EL1008" />
</master>
</masters>
and created test.hal:
loadrt trivkins
loadrt motmod servo_period_nsec=1000000 num_joints=3
loadusr -W lcec_conf test-conf.xml
loadrt lcec
then I issue: halrun test.hal:
Error: could not insert module /usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/lcec.ko: Invalid parameters
test.hal:20: exit value: 1
test.hal:20: insmod for lcec failed, returned -1
See the output of 'dmesg' for more information.
relevant dmseg output (before all is OK):
[15258.829139] RTAI[math]: loaded.
[15258.987667] lcec: disagrees about version of symbol hal_param_float_newf
[15258.987678] lcec: Unknown symbol hal_param_float_newf (err -22)
[15258.987689] lcec: disagrees about version of symbol hal_pin_u32_newf
[15258.987694] lcec: Unknown symbol hal_pin_u32_newf (err -22)
[15258.987769] lcec: disagrees about version of symbol hal_param_bit_newf
[15258.987775] lcec: Unknown symbol hal_param_bit_newf (err -22)
[15258.987809] lcec: disagrees about version of symbol hal_param_s32_newf
[15258.987815] lcec: Unknown symbol hal_param_s32_newf (err -22)
[15258.987854] lcec: disagrees about version of symbol hal_pin_s32_newf
[15258.987860] lcec: Unknown symbol hal_pin_s32_newf (err -22)
[15258.987917] lcec: disagrees about version of symbol hal_pin_bit_newf
[15258.987923] lcec: Unknown symbol hal_pin_bit_newf (err -22)
[15258.988121] lcec: disagrees about version of symbol hal_param_u32_newf
[15258.988127] lcec: Unknown symbol hal_param_u32_newf (err -22)
[15259.125902] RTAI[math]: unloaded.
Anybody any suggestion?
Thanks for help
Please Log in to join the conversation.
regards Frank
Please Log in to join the conversation.
What I think is that I should work with linuxcnc 2.6, not 2.7. I did fresh install 2.6, but now I can not install ethercat as it seems package repository is down. I get 502 Bad Gateway error.
Regards Bojan
Please Log in to join the conversation.
it is running with 2.7,
you need this in your hal-file: (with complete path to the xml !!)
loadusr -W lcec_conf /home/fb/linuxcnc/configs/ethercat/ethercat-conf.xml
loadrt lcec
loadrt trivkins
loadrt motmode base_period_nsec=0 servo_period_nsec=1000000 num_joints=3
#
addf lcec.read-all servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf lcec.write-all servo-thread
#
I think, the xml is ok
Please Log in to join the conversation.
cgc wrote: you need this in your hal-file: (with complete path to the xml !!)
loadusr -W lcec_conf /home/fb/linuxcnc/configs/ethercat/ethercat-conf.xml
I have my test-conf.xml in my current directory so I do not need path to xml.
I can not test as I do not have 2.7 anymore, and I can not install in 2.6 as I get 502 Bad Gateway error on package repository. Do you think addf would make the difference?
Please Log in to join the conversation.
Package repository is back. I install ethercat on 2.6 and I do not get any errors. It seems the driver is not compatible with 2.7.
Please Log in to join the conversation.
boyzo wrote: Package repository is back. I install ethercat on 2.6 and I do not get any errors. It seems the driver is not compatible with 2.7.
That seems strange. I can't off-hand think of anything which would have changed to affect that.
Please Log in to join the conversation.
boyzo wrote: It seems the driver is not compatible with 2.7.
You're right, I have the same errors with 2.7
[15258.987667] lcec: disagrees about version of symbol hal_param_float_newf
[15258.987678] lcec: Unknown symbol hal_param_float_newf (err -22)
[15258.987689] lcec: disagrees about version of symbol hal_pin_u32_newf
[15258.987694] lcec: Unknown symbol hal_pin_u32_newf (err -22)
[15258.987769] lcec: disagrees about version of symbol hal_param_bit_newf
[15258.987775] lcec: Unknown symbol hal_param_bit_newf (err -22)
[15258.987809] lcec: disagrees about version of symbol hal_param_s32_newf
[15258.987815] lcec: Unknown symbol hal_param_s32_newf (err -22)
[15258.987854] lcec: disagrees about version of symbol hal_pin_s32_newf
[15258.987860] lcec: Unknown symbol hal_pin_s32_newf (err -22)
[15258.987917] lcec: disagrees about version of symbol hal_pin_bit_newf
[15258.987923] lcec: Unknown symbol hal_pin_bit_newf (err -22)
[15258.988121] lcec: disagrees about version of symbol hal_param_u32_newf
[15258.988127] lcec: Unknown symbol hal_param_u32_newf (err -22)
regards Frank
Please Log in to join the conversation.
