just barely though :D
Hi... Basic functoinality question then...
I've just put EMC2 (Ubuntu live CD install) on a small CNC router, and put limit switches on it..
2 per axis, in series, and it's all working fine...
so min and max are wired in series ?
But, when I hit a lmit the spindle dosn't stop.. (Relay driven spindle)
Yup, min+max in series...
KiwiChris: when you hit a limit the machine just turns off (no estop) right ?
The movement stops, but it dosn't stop the spindle, which I thought it might...
KiwiChris, are you using axis ?
Just this once .. here's the log: http://www.linuxcnc.org/irc/irc.freenode.net:6667/emc/2007-04-17.txt
I can add the functionality to hardware if required, but thought the software might do it..
kiwichris - you asked this question on cnczone - correct?
Yeah, hadn't seen a reply on cnczone, and thought I'd try here, as I'm a recovering IRC addict, and I'm waiting for a backup job to run at work. :-)
KiwiChris: what is causing you to hit the limits? You should not be able to ever hit them unless something grossly malfunctions
[00:05:09] <skunkworks> http://www.linuxcnc.org/irc/irc.freenode.net:6667/emc/2007-04-16.txt
look here and read time stamp 19:25:00
cradek: since you are here, is there a reason machine power off does not stop spindle ?
just never got to posting it - sorry.
Rugludallur: I'm surprised by that too
Rugludallur: I know abort (ESC) stops it
cradek: didn't hit the stop for real, I've jsut been testing it...
cradek: yeah, I remember this a while back, if you trigger through UI it's different than from inside HAL or from other source
Rugludallur: looks like this is another one - you have been busy
skunk: thanks... Will look at the and function in the HAL.
cradek: I think I discovered this one back in pre-2.1 :P
cradek: if it's the same one
I think it's been fixed and then rebroken
and maybe partly fixed again after that (abort)
cradek: want me to bug it ?
KiwiChris: got your answer ?
Yup, or at least something to try, I'm at work (My real job) at the mo, so I can't try immediately, but I'll give the AND statement in the HAL settings a go...
KiwiChris: it's a bug though, so it will be fixed in future versions
Rug: OK... Bug is a bit strong, more of 'unexpected functionality' for it to be a bug it'd haev to be that when it hit a stop jogging, it turned on the spinde!!! 8-)
I admit that would be even more surprising
Do you want me to log a bug? (Not knowing where the emc bug tracker is kept)
KiwiChris: There is a quote for this: "It's not a bug, it's an undocumented feature"
KiwiChris: already done :D
crad: it'd be one way of checking you were awake at the pendant...
yep, and if you can jog into a limit switch, whoever set up limits was snoozing on the job
In which case you could lable it in the HAL config as USER_ALARM_ENABLE
sleepy time, gnite
thanks for the testing and reports
cradek: got a couple more I need to verify, thanks for responding to the bugs :)
* KiwiChris returns from picking up lunch...
how are things in New Zealand?
Good, although the weather sucks just now...
And the government is playing silly buggers, but that's normal for most parts of the world :-).
here also ;)
finally warming up here.
Funnily enough the opposite here... We've had some good autumn days, but we've just got a big southerly front come through, and it's looking like a good day to stay inside and use IRC. :).
You in the US? and is your nick just that, or are you from the R/C skunkworks?
* KiwiChris wanders down to the cafe for a cuppa coffee - back in a tick.
Back with coffee (Mmmmmm Coffee)
I own a dodge stealth - the stealth plane was made by skunkworks. Yah a streach. it would be a GTO over there.
made by mitusbishi
Nice wheels.. Dodge re-brand a mitsi? That's a new one on me.. They're a cool car though, test drove one a couple of years ago, just for the fun of it..
Yes dodge re-branded it.
I am in WI, usa
Do you know the lineman?
I am samco on cnczone. Lineman?
The Witchita Lineman... WI=Withita??? (SP?)
Ah - Wisconsin
Oh, Wioming... Forget it.
Wisconsin, not even close... :-)..
cheese heads and such
"Cheese from Wisconsin, where Cheese is Cheese"
(Courtesy of Tool time, Tim Allen has a lot to answer for when it comes to perceptions of the US in other countries!)
that is scary ;)
I kinda like it
our neighbor married a kiwi - they live over there. ;)
Weird... one of our neighbors to our old place married an American lady, and shifted to SF last year...
Arrr, anyway, I've finished stuffing my face, so should go and do some work... You folks have a good evening/morning/afternoon (Depeding on TZ)
Thanks for the help... Catcha.
cradek, do you know how to tell what kernel the RTAI patches are for?
they have strange numbering scheme
no, it's just as puzzling to me
the rtlinux guys may have sold out, but their patches include the full number of the kernel version in their file name
I always found rtlinux easier to build, but I guess that's not too relevant anymore
open source version is pretty moribund, it does still exist
what's the difference between RTAI and the other RT patches floating around? (esp, the one that seems to be headed into 2.6.21)
03cradek 07TRUNK * 10emc2/src/emc/task/emctask.cc:
possible fix for bug 1701900 - spindle does not turn off when going
into machine-off state
03cradek 07v2_1_branch * 10emc2/src/emc/task/emctask.cc: possible fix for bug 1701900 - spindle does not turn off when going into machine-off state
ds3 sorry, I don't know about that patch.
I've heard some noises about rt in the linux kernel, don't know anything more.
Any 5i20 users on now?
I have one
haven't hooked anything up to it.
Have you played with it in a Linux system yet?
it's running, yes
are you having problems with one?
I have an EMC2 config saved for it, but when I launch it won't start.
The log says 'M5I20: ERROR: FPGA busy at start of programming'
I didn't have any problems
Running the 'vanilla' EMC2/M5I20 config?
does that work for you?
That's what I'm trying to do (without success).
I might try the DOS test util from Mesa...
which version of emc?
ok, I'm running 2.1.2
didn't know there was anything to change, but there was some talk about it
the firmware loading wasn't being done in the most elegant manner or some such kerfuffle
Just found another much earlier msg: 'Failed to allocate mem resource...'. Might be a problem.
could be it
Chris-H: what command are you using to load the firmware?
emc doesn't load firmware
that's what I type in and the firmware loads
something in your config is trying to load the firmware
what config are you running?
The generic M5i20 4-axis one.
ok, you are using the config thats built into the driver
I had to do a mental reset - I've been working on a different config for the 5i20...
Correct. Let me add that I have not committed much of the relevant docs to memory yet. ;)
I'm also a 'man man' kind of linux newbie at this point.
thats ok too
driver loads the fpga at startup?
I'm looking at the source at the moment
eric_u: today it does (there is a single FPGA config hardcoded into the driver)
in the future we are gonna have that as a separate step, so you can load any config
in fact, the separate loader is what I'm working on at the moment
so you caught me at a time when I know more about loading 5i20 configs than I ever did before (and ever will again)
.vhd files are vhdl?
I just selected and saved a copy of the 5i20 4-axis config. Do I need to change anything else just to get it to launch without anything connected to the card?
so the m5i20 directory is all vhdl
not sure why they're not named .vhdl, unless its because peter wallace at mesa uses doze boxes
I'm sure he does
vhdl would be source - ?
Chris-H: the driver for the 5i20 will not load unless you have a 5i20 card installed
vhdl is the source for the stuff inside the FPGA
not for the loader
It's in the PC.
ok, then I'm not sure what you were asking above?
there appears to be some memory related failure in his emc startup
Sorry - I was pointing out that the loader wouldn't use vhdl files (while not really being familiar with the mechanism).
Chris-H: was the message "M5I20: ERROR: hal_malloc() failed"
stustev: just wondering if that name was who I thought it was... welcome!
No. The mem resource error msg is way before the load attempt in the log.
can you pastebin your log so I can see the messages in context?
I knew you were going to ask that, and I'm on a different machine than the EMC install.
ok, when you do go back there, heres something to do:
I also haven't used IRC in about 10 years (not counting the other night), and only know of pastebin by name.
at a shell prompt, with EMC not running:
[03:26:16] <jmkasunich> http://pastebin.ca
- its pretty self explanitory - a big box into which you cut and paste some text, then click submit and it posts it on the web
then you post the URL here (or in a message to the list) and we can go read the stuff you posted
ok: at a shell prompt, with EMC not running (you're gonna want to save this to take to the other machine):
sudo dmesg -c
# things with # in front are my comments, things without are commands to type
# dmesg -c clears old crap out of the kernel log, it can get confusing when there are 10 attempted EMC startups in there
cradek : http://www.neonixie.com/store/index.php?cPath=21&osCsid=e33662092d555153e51a0759495aee5c
jmkasunich: I have the joypad working pretty good. Just want to let you know the axis.N.jog-vel-mode works very very good with the joysticks on the joypad. It is a wireless usb playstation 2 style joypad. I probably won't turn it loose as it seems a little fragile for the shop environment.
# that should get you a "halcmd:" prompt
# at the halcmd prompt:
# for me, that works fine... for you, I dunno... it might, if the problem is running out of memory, and loading only the driver uses less memory...
# if you get an error message when you give that command, then it failed, and we want to get the log
# if you just get the command prompt back then it worked
# to see the message
# that will get you back to the shell prompt
# that saves the log to a file
then pastebin it
oops, I forgot one step...
lemme start over, without the comments
sudo dmesg -c
the driver code implies that this error happens when the driver tries to load the configuration at the wrong address.:q
crap, can't do what I want to do that way
eric_u: yeah, its not seeing the device
but its supposed to get the address from PCI, so it should be right
sorry, trying to quit vi is too much for me sometimes
I wasn't going to hit enter on that comment while you were still helping him
eric_u: do you see lines in taht file with "M5I20: Card detected in Slot:" ?
Tried the earlier cmds and it failed. Was there a step missing?
I'm trying to tell Chris-H how to enable those messages
Chris-H: it was supposed to fail (as in not load) and give us usefull log info
but I didn't tell you how to turn on the log info :-(
John, I see that line
Chris-H: still trying things here, I don't want to give you instructions that I haven't tested
I am accustomed to the 'infinite number of monkeys typing' method of debugging. :)
ok. lets try again
sudo dmesg -c
halcmd loadrt hal_m5i20
the halcmd line will probably fail
dammit, forgot a step again
getting closer tho
sudo dmesg -c
echo 4 >/proc/rtapi/debug
halcmd loadrt hal_m5i20
the echo 4 line turns on verbose logging
run those commands, starting at sudo dmesg -c and ending at dmesg >somefile
and post somefile on pastebin
l get the line that says "M5I20: Card detected in Slot: 10" on my system
I do get 'M5I20: Card detected in slot: e'
I'll give those commands a try and post a link to the log shortly.
I wonder what lspci says about it. It shows up there as a plx Technologies PCI bridge
eric_u: excellent point!
Chris-H: please also do "lspci" and pastebin that output
"lspci -v" not a bad idea
one interesting possibility is that there is something else in your PC that uses the same PCI bridge chip
the existing driver only looks at the vendor and device codes, not the subsystem codes....
my new loader looks at both, to make sure its really a m5i20 card, not something else with the same bridge chip
that's a good idea, those bridges are everywhere
The echo 4 cmd says no such file or dir
maybe add a sudo to the beginning
this is after you did the /etc/init.d/realtime start? (and it succeeded?)
realtime start loads the realtime core (usually its done as emc loads, and you don't see it, but its there)
whenever that is loaded, /proc/rtapi should exist
You mean the cmd you had AFTER the echo 4 cmd? :)
I'll give that a try...standby.
is the emc PC on the net?
The halcmd line barfed.
that was expected
Yes, as of last night.
that makes pastebin a bit easier
otherwise it gets to be a real pain
remember, pastebin lspci -v too, that might be very helpfull
Should I continue with cmds after the halcmd failed?
that removes the realtime stuff, and gets you the log
here is my lspci -v http://pastebin.ca/443987
lines 15-24 are the m5i20
your addresses (I/O ports at XXXX and Memory at XXXXXXXX) might (will) be different
but your sizes should be the same
and the subsystem unknown device 3131 should be there
here is the relevant part of my kernel log: http://pastebin.ca/443991
there is no other PLX bridge
how do you know, he hasn't posted it yet?
are you reading his screen somehow?
oh, that's yours :)
I was wondering, since his is supposed to be in slot 15, but I forgot about that part
I mean slot e
PCI stuff is enough to make you crazy
steves_logging is now known as steve_stallings
I've been messing with it for several days now... wrote a little library to handle searching the bus, finding devices, mapping memory and I/O regiona, and all that stuff
checking the subdevice is a really good idea
I was surprised (and a little dissapointed) to see that the mesa loader didn't do that...
and when peteV made our driver, he copied the mesa loader
hmm, that might be the next thing to have Chris-H try - there is a user space loader for the Mesa card
but I want to see the pastebins first
he said he was going to try the dos version
* jmkasunich waits patiently
The log and pci dump are here: http://pastebin.ca/443993
earlier this evening I mentioned the possibility to Chris-H that there might be more than one bridge chip, and he looked with some Gnome utility I think and found only one
I/O ports at fc00 [disabled] [size=128]
whats that [disabled] thing?
so is Chris-H = chris-sub1, or sub2, or?
I think that means it wants to be in a different slot
maybe, I'm not an expert there.... but it certainly would explain why the load is failing...
Steve - Didn't look w/tools yet, just at physical chips and in device mgr.
well at last count we had at least 4 members of CAMS named Chris
the driver testes the busy line, and expects it to be low.... if the device is disabled, it floats high
what disables a pci card?
can you try it in a different physical slot?
just do lspci -v to test
I can try a different slot, but this one should be like any other (not an end slot).
as long as that [disabled] is there, its not gonna work
I've had all sorts of problems with pci, never disabled
(Rhetorically) No special bios settings are required for the m5i20 I/O, right?
Chris-H: you might want to check all jumpers against the manual... I believe they ship in the right place by default, and at most one of them _might_ affect the bus interface... but I don't know what else it could be
not that I'm aware of
I certainly don't have any special settings here
I'm on a P2-300. That should work, right?
there might be a bios setting....
"PNP OS Installed" (or similar) should be NO
I'll see if I can get the I/O resources straightened out.
That could be it!
(according to google.... although that guy doesn't have the same symptoms, his card is completely awol)
I didn't repeat the console cmds, but TkEMC came up this time. Cool!
what did you change?
PNP to NO
I'll have to remember that
gcam subversion is up and running now
Was yes...must have had an effect on PCI resource allocation.
does lspci -v show no [disabled] now?
I bet what happened is that if theres a PNP OS, the BIOS leaves all devices disabled, and expects the OS drivers to enable them
if its not a PNP os, the BIOS leaves things enabled
No [disabled] now.
but... but.... isn't Ubuntu a PNP os? 8-)
no tells the bios, "no, the OS isn't PNP, so you should enable the devices for it"
Yes. You plug things in, and then play with them for a few hours until they work. (Please, no hurling of vegetables)
well it isn't entirely a bogus question, I bet Ubuntu does enable the devices that it is aware of
I'll see what I can find out about enable/disable... from what I'm finding on the web so far, the driver should be able to enable the device
I have no idea how yet, but if I figure it out, I'll embed that in the new loader
Does the BIOS have a mechanism for configuring PCI devices that is different from the PNP standard, or are we just talking about the startup state?
damned if I know
might find some information in the users manuals for PCI parallel port cards when trying to use them in non-PNP environments
I think I'm going to go see if I can turn some LEDs on and off and then call it a night.
I have the PCI book
The link I gave for pci paraport card can be used in DOS
don't think I'll read it
and the source code is there for linux too
We have some guys at work who *really* know PCI, so if you ever really get stuck on something let me know.
isn't there options within the kernel to do it? like the bios vs direct access methods
PCI support gets very complex very very fast
long live ISA!!!
unfortunately they decided that the PCI subsystem in linux needs to support hotplug so it can also be used for PCMCIA
so there are reference counts and registering drivers and all that rot, even tho PCI cards never get hotplugged
it isn't just cardbus, think cPCI also supports hotplugging
anyone ever used gnome "dia" for making diagrams?
just needed something for flowcharts
and noticed that they have ladder, grafcet, logic, etc templates
oooo, I just found a nasty bug, if you edit a apt file, then select a file from the recent files menu, it wont ask you to save the file...
wrong window too, sorry folks
the PNP problem documented for posterity: http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?TroubleShooting
(bottom of page)
Must bail out - Thanks again for all the help!
steve_stallings is now known as steves_logging
i've got an ancient allen bradly plc in my garage that i know nothing about... anyone have any use for it?
my buttons arrived today
now for the fun of engraving them.
anonimasu: great, you need to upload a pic when you have the panel ready :)
I'm copying a heidenhain panel..
I like that as im used to it..
anonimasu: and the sources for the GUI :P
there is a command inifile.find in Axis code. which module do I need to install to use this command?
acemi: emcmodule I think
there is no module as emcmodule
I try this but, Ican't use inifile.find
acemi: sorry.. you'll have to use the source :)
did the import work ok?
inifile = emc.ini(sys.argv)
import emc is OK
hmm 1 sc
disclaimer: i have little clue about python :P
it's OK now. thanks alex_joni
acemi: sure, no problem
glad I could help :P
is there a hal driver for the serial port?
maddash: what kind of driver?
no, what should the serial port driver do?
obviously send data through the serial link..
communicate with the serial port? like hal_parport does with RS-232?
but the question is what kind of data?
what kind of protocol?
how should the handshake be like?
there is a serial hal driver that controls the pins as digital IO
you could run a jogwheel for instance
there are tons of other questions like this which will hopefully make it obvious you can't make a generic serial port driver (one that talks some kind of protocol)
cradek: isn't a jogwheel analog?
no, it's basicly an encoder
so which source file should i look at?
maddash: you haven't said what you want to do
alex_joni: i meant to cradek's jogwheel
what does "-1" mean in "addf parport.0.write base-thread -1"?
In docs addf gets 2 parameters
-1 is the position
it means at the beginning of the thread I think
so, is this the order?
'position' is the desired location within the thread. This
determines when the function will run, in relation to other
functions in the thread. A positive number indicates the
desired location as measured from the beginning of the thread,
and a negative is measured from the end. So +1 means this
function will become the first one to run, +5 means it will
be the fifth one to run, -2 means it will be next to last,
and -1 means it will be last. Zero is illegal.
* alex_joni remembered it wrong
[16:28:43] <alex_joni> http://www.linuxcnc.org/docs/2.1/html/man/man3/hal_add_funct_to_thread.3hal.html
acemi: don't mention it
is it one function per thread?
no, you add as many as you need
how many IO pins can you get on the serial port?
[17:30:06] <alex_joni> http://www.linuxcnc.org/docs/2.1/html/man/man9/serport.9.html
4 in, 3 out
hmm, enough for a simple control box
* alex_joni yawns
* skunkworks has his coworker make a latte
I'm up since 5am this morning :(
(and I usually get up at 9 :D)
I got my bearings into the havoc heli. 1mmX3mmX1mm. helped the flight characteristics.
those are some huge bearings :D
right - I broke one with my fingers ;)
I dropped on on the floor and it took me a good 20 minutes to find it.
use a magnet
Dallur, are you around?
alex_joni: for a real bearing that's not a good idea
the bearing becomes magnetic and metallic stuff gets stuck in it
lerneaen_hydra: that is why I didn't want to use a maganet
I suppose I could have de-maganetized it though.
good night all
feoc2 is now known as feoc
ehh does anyone here use stepgen.N.steplen/stepgen.N.stepspace ?
Was steplen/stepspace changed to be in microseconds ? docs say it's supposed to be a multiplier, 1 = base thread
yet looking at it now I find the inital values for 18000 base thread to be 17600
not that having them in microseconds does not make sense :)
jackc is now known as crepincdotcom`
err sorry stupid question, it has been changed in most recent doc but not wiki
will update wiki
or not, since this is new in trunk
and not yet public