- Posts: 127
- Thank you received: 0
using HAL to correct axis errors
When I built the mill (mid-90s?) it didn't occur to me that I might not get the axis alignment exactly correct on the first try, and I provided no means for adjustment. So yes, I've been living with this for forever. You might guess, correctly, that I don't use the mill much.
It occurred to me that there was probably a way to fix this error from within linuxcnc, and sure enough I found this post:
forum.linuxcnc.org/10-advanced-configura...on-with-2-7-11#99833
which proposes a simple HAL component to work around an uneven table.
So I'd like to try it, but I'm stuck.
Based on that post of Andy Pugh's, my component looks like:
It builds and installs fine with halcompile. But then what? There's obviously some other configuration required to get this into the pipeline.
As an initial step, I've added a line with
Debug:
22841
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components
and print:
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/pgf/linuxcnc/configs/my-mill/my-mill.ini
PARAMETER_FILE=linuxcnc.var
TASK=milltask
HALUI=
DISPLAY=axis
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Killing task linuxcncsvr, PID=22841
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Any suggestions appreciated!
paul
Please Log in to join the conversation.
Please Log in to join the conversation.
[833862.224577] I-pipe: head domain RTAI registered.
[833862.224588] RTAI[hal]: compiled with gcc version 4.7.2 (Debian 4.7.2-5) .
[833862.224597] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[833862.224602] SYSINFO: CPUs 1, LINUX APIC IRQ 2312, TIM_FREQ 12498508, CLK_FREQ 1799736000, CPU_FREQ 1799736000
[833862.224606] RTAI_APIC_TIMER_IPI: RTAI DEFINED 2314, VECTOR 2314; LINUX_APIC_TIMER_IPI: RTAI DEFINED 2312, VECTOR 2312
[833862.224611] TIMER NAME: lapic; VARIOUSLY FOUND APIC FREQs: 12498508, 12498508, 12406500
[833862.248194] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[833862.248251] , <uses LINUX SYSCALLs>, kstacks pool size = 524288 bytes.
[833862.248257] RTAI[sched]: hard timer type/freq = APIC/12498508(Hz); default timing: oneshot; linear timed lists.
[833862.248262] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 1799736000 hz.
[833862.248266] RTAI[sched]: timer setup = 999 ns, resched latency = 2944 ns.
[833862.265376] RTAI[math]: loaded.
[833862.448021] config string '0x378 out'
[833865.181952] RTAI[math]: unloaded.
[833865.185313] SCHED releases registered named ALIEN PEDV$D
[833865.193131] RTAI[malloc]: unloaded.
[833865.292023] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[833865.294674] I-pipe: head domain RTAI unregistered.
[833865.294688] RTAI[hal]: unmounted.
Please Log in to join the conversation.
Please Log in to join the conversation.
You might try a bit further with halrun, that is setting up a thread and
addf'ing your components function to that thread (this would alo let you test the math)
Please Log in to join the conversation.
paul
Please Log in to join the conversation.
During a failed startup, I get:
This reminded me that perhaps the clue is elsewhere in the rest of my mill's config, so here are the .ini and .hal files:
and
Please Log in to join the conversation.
It looks like its been accidentally pasted in.It appears to be invalid syntax to me.
Please Log in to join the conversation.
If you're referring to some other line, can you be more specific?
Thanks!
paul
Please Log in to join the conversation.
The only other thing i noticed is in your first post you said you used
Did you also add it to your hal file with addf?I have had some odd errors where I've forgotten to do that.
did you compile and install as follows?
Please Log in to join the conversation.
