Joystick
- no-bug
- Offline
- New Member
- Posts: 19
- Thank you received: 0
I'm trying to install a Logitec Dual Action joystick whith EMC2 2.5.1 on ubuntu Hardy Heron using this link wiki.linuxcnc.org/cgi-bin/wiki.pl?Simple_Remote_Pendant..
Step 4, EMC crashes when starting.
The joystick has been calibrated whith no problem (jscalibrator).
i've tried other solutions (discribed in wiki.linuxcnc.org/cgi-bin/wiki.pl?LinuxCNCKnowledgeBase) whith never endind problems of missing packages, wrong version of installed packages and install errors.
Is there a solution?
Please Log in or Create an account to join the conversation.
- BigJohnT
- Offline
- Administrator
- Posts: 7106
- Thank you received: 1177
Please Log in or Create an account to join the conversation.
- no-bug
- Offline
- New Member
- Posts: 19
- Thank you received: 0
Here are the attachments. I also add the error message when EMC crashes at start. If a copy of my machine.ini and hal files or custom_postgui.hal could be helpfull, I can send them.
ps : EMC crashes when hal is modified as discribed in the help link.
Please Log in or Create an account to join the conversation.
- no-bug
- Offline
- New Member
- Posts: 19
- Thank you received: 0
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-2.6.24-16-rtai/modules/linuxcnc
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/share/linuxcnc/tcl/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.4
LINUXCNC - 2.5.1
Machine configuration directory is '/home/jp/linuxcnc/configs/ma-machine'
Machine configuration file is 'ma-machine.ini'
INIFILE=/home/jp/linuxcnc/configs/ma-machine/ma-machine.ini
PARAMETER_FILE=linuxcnc.var
TASK=milltask
HALUI=halui
DISPLAY=axis
Starting LinuxCNC...
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
Shared memory conflict or RT component not loaded!
ERROR CLASSICLADDER- Ladder memory allocation error
Shutting down and cleaning up LinuxCNC...
Running HAL shutdown script
Killing task linuxcncsvr, PID=5894
Killing task milltask, PID=6031
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Cleanup done
Debug file information:
Can not find -sec MOT -var MOT -num 1
Can not find -sec IO -var IO -num 1
Can not find -sec LINUXCNC -var NML_FILE -num 1
Can not find -sec EMC -var NML_FILE -num 1
custom_postgui.hal:18: Pin 'input.0.btn-trigger' does not exist
5894
PID TTY STAT TIME COMMAND
6031
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components
Kernel message information:
[ 1188.706297] I-pipe: Domain RTAI registered.
[ 1188.706326] RTAI[hal]: <3.6.1> mounted over IPIPE-NOTHREADS 2.0-04.
[ 1188.706330] RTAI[hal]: compiled with gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3).
[ 1188.706339] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 1188.706343] PIPELINE layers:
[ 1188.706346] d0dc9000 9ac15d93 RTAI 200
[ 1188.706350] c0383180 0 Linux 100
[ 1188.788842] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 1188.790000] RTAI[sched]: loaded (IMMEDIATE, UP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[ 1188.790016] RTAI[sched]: hard timer type/freq = 8254-PIT/1193180(Hz); default timing: periodic; linear timed lists.
[ 1188.790022] RTAI[sched]: Linux timer freq = 250 (Hz), CPU freq = 1395800000 hz.
[ 1188.790026] RTAI[sched]: timer setup = 2010 ns, resched latency = 2689 ns.
[ 1188.923997] RTAI[math]: loaded.
[ 1189.909627] config string '0x378 out '
[ 1200.171521] RTAI[math]: unloaded.
[ 1200.246793] SCHED releases registered named ALIEN RTGLBH
[ 1200.263644] RTAI[malloc]: unloaded.
[ 1200.362759] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 1200.367613] I-pipe: Domain RTAI unregistered.
[ 1200.367632] RTAI[hal]: unmounted.
Please Log in or Create an account to join the conversation.
- ArcEye
- Offline
- Junior Member
- Posts: 25
- Thank you received: 761
custom_postgui.hal:18: Pin 'input.0.btn-trigger' does not exist
See this thread
www.linuxcnc.org/index.php/english/forum...g-215-from-243#28091
The name of the button changed at version 2.5 or 2.5.1
regards
Please Log in or Create an account to join the conversation.
- BigJohnT
- Offline
- Administrator
- Posts: 7106
- Thank you received: 1177
John
Please Log in or Create an account to join the conversation.
- no-bug
- Offline
- New Member
- Posts: 19
- Thank you received: 0
I've tried to rename trigger in joystick, but emc crashes. In attachement, hal file, EMC error message and halcmd show pin. I've very poor knowledges whith Linux and I do my best to understand !
I can't attache doc, so I do a copy
EMC error msg
=============
Debug file information:
Can not find -sec MOT -var MOT -num 1
Can not find -sec IO -var IO -num 1
Can not find -sec LINUXCNC -var NML_FILE -num 1
Can not find -sec EMC -var NML_FILE -num 1
insmod: error inserting '/usr/realtime-2.6.24-16-rtai/modules/rtai_hal.ko': -1 File exists
5007
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components
ERROR: Module hal_lib does not exist in /proc/modules
ERROR: Module rtapi does not exist in /proc/modules
ERROR: Module rtai_math does not exist in /proc/modules
ERROR: Module rtai_sem does not exist in /proc/modules
ERROR: Module rtai_fifos does not exist in /proc/modules
ERROR: Module rtai_sched does not exist in /proc/modules
ERROR: Module rtai_hal does not exist in /proc/modules
custom_postgui.hal
==================
loadrt or2 count=2
loadrt mux4 count=1
addf or2.0 servo-thread
addf or2.1 servo-thread
addf mux4.0 servo-thread
# set the jog speed for the joypad again use numbers that make sense for your machine
setp mux4.0.in0 0 # this one must be 0 to prevent motion unless a button is pressed
setp mux4.0.in1 25
setp mux4.0.in2 100
setp mux4.0.in3 200
# the following does the magic of setting the jog speeds
net remote-speed-slow or2.0.in0 input.0.btn-joystick
net remote-speed-medium or2.1.in0 input.0.btn-thumb
net remote-speed-fast or2.0.in1 or2.1.in1 input.0.btn-thumb2
net joy-speed-1 mux4.0.sel0 <= or2.0.out
net joy-speed-2 mux4.0.sel1 <= or2.1.out
net joy-speed-final halui.jog-speed <= mux4.0.out
net joy-x-jog halui.jog.0.analog <= input.0.abs-x-position
net joy-y-jog halui.jog.1.analog <= input.0.abs-y-position
net joy-z-jog halui.jog.2.analog <= input.0.abs-rz-position
halcmd: show pin
================
Component Pins:
Owner Type Dir Value Name
5 s32 OUT 0 input.0.abs-hat0x-counts
5 s32 IN 0 input.0.abs-hat0x-flat
5 s32 IN 0 input.0.abs-hat0x-fuzz
5 bit OUT FALSE input.0.abs-hat0x-is-neg
5 bit OUT FALSE input.0.abs-hat0x-is-pos
5 float IN 0 input.0.abs-hat0x-offset
5 float OUT 0 input.0.abs-hat0x-position
5 float IN 1 input.0.abs-hat0x-scale
5 s32 OUT 0 input.0.abs-hat0y-counts
5 s32 IN 0 input.0.abs-hat0y-flat
5 s32 IN 0 input.0.abs-hat0y-fuzz
5 bit OUT FALSE input.0.abs-hat0y-is-neg
5 bit OUT FALSE input.0.abs-hat0y-is-pos
5 float IN 0 input.0.abs-hat0y-offset
5 float OUT 0 input.0.abs-hat0y-position
5 float IN 1 input.0.abs-hat0y-scale
5 s32 OUT 127 input.0.abs-rz-counts
5 s32 IN 15 input.0.abs-rz-flat
5 s32 IN 0 input.0.abs-rz-fuzz
5 bit OUT FALSE input.0.abs-rz-is-neg
5 bit OUT FALSE input.0.abs-rz-is-pos
5 float IN 127.5 input.0.abs-rz-offset
5 float OUT -0.003921569 input.0.abs-rz-position
5 float IN 127.5 input.0.abs-rz-scale
5 s32 OUT 127 input.0.abs-x-counts
5 s32 IN 15 input.0.abs-x-flat
5 s32 IN 0 input.0.abs-x-fuzz
5 bit OUT FALSE input.0.abs-x-is-neg
5 bit OUT FALSE input.0.abs-x-is-pos
5 float IN 127.5 input.0.abs-x-offset
5 float OUT -0.003921569 input.0.abs-x-position
5 float IN 127.5 input.0.abs-x-scale
5 s32 OUT 127 input.0.abs-y-counts
5 s32 IN 15 input.0.abs-y-flat
5 s32 IN 0 input.0.abs-y-fuzz
5 bit OUT FALSE input.0.abs-y-is-neg
5 bit OUT FALSE input.0.abs-y-is-pos
5 float IN 127.5 input.0.abs-y-offset
5 float OUT -0.003921569 input.0.abs-y-position
5 float IN 127.5 input.0.abs-y-scale
5 s32 OUT 127 input.0.abs-z-counts
5 s32 IN 15 input.0.abs-z-flat
5 s32 IN 0 input.0.abs-z-fuzz
5 bit OUT FALSE input.0.abs-z-is-neg
5 bit OUT FALSE input.0.abs-z-is-pos
5 float IN 127.5 input.0.abs-z-offset
5 float OUT -0.003921569 input.0.abs-z-position
5 float IN 127.5 input.0.abs-z-scale
5 bit OUT FALSE input.0.btn-base
5 bit OUT TRUE input.0.btn-base-not
5 bit OUT FALSE input.0.btn-base2
5 bit OUT TRUE input.0.btn-base2-not
5 bit OUT FALSE input.0.btn-base3
5 bit OUT TRUE input.0.btn-base3-not
5 bit OUT FALSE input.0.btn-base4
5 bit OUT TRUE input.0.btn-base4-not
5 bit OUT FALSE input.0.btn-base5
5 bit OUT TRUE input.0.btn-base5-not
5 bit OUT FALSE input.0.btn-base6
5 bit OUT TRUE input.0.btn-base6-not
5 bit OUT FALSE input.0.btn-joystick
5 bit OUT TRUE input.0.btn-joystick-not
5 bit OUT FALSE input.0.btn-pinkie
5 bit OUT TRUE input.0.btn-pinkie-not
5 bit OUT FALSE input.0.btn-thumb
5 bit OUT TRUE input.0.btn-thumb-not
5 bit OUT FALSE input.0.btn-thumb2
5 bit OUT TRUE input.0.btn-thumb2-not
5 bit OUT FALSE input.0.btn-top
5 bit OUT TRUE input.0.btn-top-not
5 bit OUT FALSE input.0.btn-top2
5 bit OUT TRUE input.0.btn-top2-not
Please Log in or Create an account to join the conversation.
- ArcEye
- Offline
- Junior Member
- Posts: 25
- Thank you received: 761
insmod: error inserting '/usr/realtime-2.6.24-16-rtai/modules/rtai_hal.ko': -1 File exists
This normally occurs where a startup has failed but left modules not properly unloaded, the next time you try to start you get this error.
Your button is now recognised,
so this is a different error.5 bit OUT FALSE input.0.btn-joystick
5 bit OUT TRUE input.0.btn-joystick-not
Reboot to clear everything and try again
regards
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23313
- Thank you received: 4861
Restart the PC. HAL has crashed and left a mess behind.insmod: error inserting '/usr/realtime-2.6.24-16-rtai/modules/rtai_hal.ko': -1 File exists
In theory halrun -U is meant to clean it up, but I have never known it to work.
Please Log in or Create an account to join the conversation.
- no-bug
- Offline
- New Member
- Posts: 19
- Thank you received: 0
The joystick does not act in anyway and no error message!
notice ; the tutorial say "postgui.hal" but I only find a "custom_postgui.hal" in the directory.
Please Log in or Create an account to join the conversation.