can't open after fixing smi issues

More
23 May 2012 01:48 - 23 May 2012 01:50 #20278 by Banana Jack

File Attachment:

File Name: 3axismdf.hal
File Size:3 KB

it won't let me upload .conf files...any way around this?

# DO NOT EDIT THIS FILE !
#
# ../scripts/rtapi.conf. Generated from rtapi.conf.in by configure.
# on Sat Oct 15 18:51:38 UTC 2011
#

# A few parameters from emc2/Makefile.inc
EMC2_HOME=/usr
KERNELDIR=/usr/src/linux-headers-2.6.32-122-rtai
RTLIB_DIR=/usr/realtime-2.6.32-122-rtai/modules/emc2
MODULE_EXT=.ko
RTPREFIX=rtai

# Sets the default DEBUG level
DEBUG='1'

# Path to the realtime kernel modules
MODPATH=/usr/realtime-2.6.32-122-rtai/modules

#List of realtime kernel modules to be loaded
if [ "3" = "3" ] ; then \
MODULES="adeos rtai_hal rtai_ksched rtai_fifos rtai_shm rtai_sem rtai_math rtai_smi"
RTAI=3
MODPATH_adeos=
MODPATH_rtai_smi=/usr/realtime-$(uname -r)/modules/rtai_smi.ko
MODPATH_rtai_hal=/usr/realtime-$(uname -r)/modules/rtai_hal.ko
MODPATH_rtai_ksched=/usr/realtime-$(uname -r)/modules/rtai_ksched.ko
MODPATH_rtai_fifos=/usr/realtime-$(uname -r)/modules/rtai_fifos.ko
MODPATH_rtai_shm=/usr/realtime-$(uname -r)/modules/rtai_shm.ko
MODPATH_rtai_sem=/usr/realtime-$(uname -r)/modules/rtai_sem.ko
MODPATH_rtai_math=/usr/realtime-$(uname -r)/modules/rtai_math.ko

elif [ $RTPREFIX = rtai ] ; then
MODULES="adeos rtai rt_mem_mgr rtai_sched rtai_fifos rtai_shm rtai_libm"
MODPATH_adeos=
MODPATH_rtai=
MODPATH_rt_mem_mgr=
MODPATH_rtai_sched=/usr/realtime-$(uname -r)/modules/rtai_sched.ko
MODPATH_rtai_shm=
MODPATH_rtai_libm=
elif [ $RTPREFIX = rtl ] ; then
MODULES="rtl mbuff rtl_time rtl_sched rtl_posixio rtl_fifo"
MODPATH_rtl=
MODPATH_mbuff=
MODPATH_rtl_time=
MODPATH_rtl_sched=
MODPATH_rtl_posixio=
MODPATH_rtl_fifo=
fi
Attachments:
Last edit: 23 May 2012 01:50 by Banana Jack.

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

More
23 May 2012 09:39 - 23 May 2012 09:59 #20280 by ArcEye
Hi

it won't let me upload .conf files...any way around this?

Just rename the extension to .txt. Easiest way would have been to zip all the files into one, its quite happy with zips.

I still haven't figured out how to get several pictures in one post though:}

Your errors specified a problem with loading rtai_shm.ko

/etc/emc2/rtapi.conf: line 21: : command not found
insmod: can't read '/usr/realtime-2.6.32-122-rtai/modules/rtai_shm.ko': No such file or directory

In your rtai.conf file the MODPATH entry for rtai_shm is
MODPATH_rtai_shm=/usr/realtime-$(uname -r)/modules/rtai_shm.ko

In my rtai.conf file and that of a fresh install it is
MODPATH_rtai_shm=

Don't ask me why, but this appears to be correct and that line is what insmod had trouble with.
(It is possible that rtai_shm is a dependency of other modules and automatically loaded, so does not need to be specifically addressed?)

Also your rtai,conf has a corrupted line here

#List of realtime kernel modules to be loaded
if [ "3" = "3" ] ; then

which should be "3" = "3"
(again don't ask me why bother testing if 3 = 3, why not just dispense with the rest of the options in the file ?)

Looks like a HTML mark up, don't know if that is how it is in the original, because we only have a paste of it, the paste into the forum might have done that bit.

I have attached my rtapi.conf file (you will have to rename it to that) which you can substitute for yours.
It does not load rtai_smi.ko by default, but I have included the lines commented out for substitution later.

Regards the .ini and .hal files, they look pretty standard stepconf generated ones.

The only thing that strikes me in the .hal file are the figures

setp stepgen.1.dirhold 42000
setp stepgen.1.dirsetup 42000

If those are the manufacturers figures then so be it, they are 3 times the size of the figures for my small stepper mill however.

In you .ini file I noted that your acceleration figures are extremely high, especially in comparison to your modest and probably realistic velocity figure.

Has no bearing on your current problem, but when you get running, very high ACCELERATION in combination with a very high SCALE figure (gearing plus very high micro-stepping?)
and your slow dirhold and dirsetup figures look like a sure fire recipe for lost steps.

regards

File Attachment:

File Name: rtapi_conf.txt
File Size:2 KB
Attachments:
Last edit: 23 May 2012 09:59 by ArcEye.

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

More
23 May 2012 12:39 #20285 by andypugh
Banana Jack wrote:

/etc/emc2/rtapi.conf: line 21: : command not found
ERROR: Module hal_lib does not exist in /proc/modules
ERROR: Module rtapi does not exist in /proc/modules
ERROR: Module rtai_smi 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_shm does not exist in /proc/modules

The first line suggests a problem with your edit to rtapi.conf
The rest indicates that RTAI didn't exit cleanly. You _must_ restart the machine when you see those errors, or any further testing is meaniningless.
(and I have spent days on end chasing bugs (in my hardware drivers) that required that, it was like having a ZX81 again..)

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

More
23 May 2012 13:40 - 23 May 2012 13:40 #20291 by ArcEye
For anyone born in the last 30 years or so, this is what the ZX81 did best

Attachments:
Last edit: 23 May 2012 13:40 by ArcEye.

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

More
23 May 2012 16:23 #20303 by pfred1

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

More
23 May 2012 16:33 #20304 by BigJohnT
Pretty good story... at least your still pfred1 over here :)

John

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

More
23 May 2012 16:44 #20305 by andypugh
pfred1 wrote:

www.instructables.com/id/Sinclair-Surplus-Keyboard-Graft/

I tried to do a similar thing when my Spectrum keyboard gave up the ghost. I wired it all up, then found that it was actually a capacitive keyboard and the little discs of aluminium on the foam pads were non-conductive. So I glued a bit of aluminium foil to them all, and that nearly worked, but never well enough to be really useful.
I was very much of that era:
www.worldofspectrum.org/infoseekid.cgi?id=0003884

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

More
23 May 2012 17:44 #20306 by pfred1
That article was for a contest, not something I'd have written if not for the stipulations. Best "hack" or something was the theme. Which I interpreted as, most unlikely thing that worked. It did, but I don't think the FCC would approve of it, due to the complete lack of shelding it interfered with TV reception for quite a distance. Worthless today except for hysterical posteriors.

Sometimes I miss out on getting pfred1, sometimes I lose account info, but no matter what nick I use I'm always me. ;)

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

More
23 May 2012 21:05 #20310 by pfred1
andypugh wrote:

You _must_ restart the machine when you see those errors, or any further testing is meaniningless.


On my home built EMC2 system I have a script that loads my modules up before I run LinuxCNC. It was something I read about someplace while I was building it all, and it does seem to help sometimes.

Really Andy, the only time you _must_ reboot Linux is when you want to change monolithic kernel code. Something RTAI isn't. Their errors look to me like their modules simply are not being loaded to begin with.

This may help:

$ sudo -s

# depmod -a

# modprobe hal_lib rtapi rtai_smi rtai_math rtai_sem rtai_shm

Strangely once you've manually loaded them once the OS sometimes learns then loads them automatically afterwards. I've no idea why this is, but it seems to be, and I don't question it too much myself. You'll only have to run that depmod command once, what it does, it does with some persistance. man depmod for more info. Manually loading all the other modules, well you'll just have to see with time how that goes for you.

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

More
23 May 2012 21:17 #20311 by andypugh
pfred1 wrote:

Really Andy, the only time you _must_ reboot Linux is when you want to change monolithic kernel code. Something RTAI isn't. .


Your custom startup script might be different. But when I have managed to segfault a HAL module (which I do a lot) and RTAI fails to unload there is no way to clean up enough for "halrun" and "linuxcnc" scripts to work.

In theory halrun -U should unload the realtime kernel modules, but it rarely does. But then in the typical case neither can modprobe as the modules are marked as using each other.
(I have tried quite hard to find a way to clear up this particular sort of mess)

Given this, in cases where HAL isn't loading and those kernel module errors are listed, it is simplest to restart to be sure of a clean "starting position". It isn't ilke it takes all that long.

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

Time to create page: 0.108 seconds
Powered by Kunena Forum