#emc-devel | Logs for 2007-01-02

Back
[01:00:57] <jmkasunich> I just read the first couple of Ander's emails about 5i20 configs
[01:01:41] <jmkasunich> gotta get up to date, but the points he raises about storing different configs, loading the right one, and getting the HAL driver to understand that are important
[01:03:19] <SWPadnos> it's less of an issue with the 4 configs from Mesa, since the driver can identify the FPGA config and it's easy to support all 4
[01:03:41] <SWPadnos> it's still an issue to try to reprogram any FPGAs if there are multiple configs/boards present
[01:03:51] <jmkasunich> they store a code in some register, and the driver reads it?
[01:05:01] <SWPadnos> yes, two registers are now provided with ID and PWM base clock
[01:05:24] <SWPadnos> it's kind of an ID/#axis register, actually. the base clock is in Hz (32 bits)
[01:44:53] <SWPadnos> you know - we should probably figure out some method of keeping track of the various FPGA configs, and make a skeleton_5i20 file set that implements that method
[01:45:15] <SWPadnos> like where the ID register(s) go, etc.
[01:48:57] <jmkasunich> yeah
[01:49:13] <jmkasunich> thats worthy of a discussion, but I think I'm gonna see whats up with Jon first
[01:49:31] <SWPadnos> no problem - just sticking it out there
[01:49:40] <SWPadnos> err - you get the idea :)
[17:58:13] <etla> I'm trying ./configure --enable-run-in-place --enable-simulator but I get error: GNU PTH Library required. is that normal?
[18:03:12] <SWPadnos> yes, you need the PTH library for simulator mode :)
[18:03:21] <SWPadnos> woohoo - the Mesa order arrived!
[18:04:04] <etla> wow, new toys for the boys
[18:04:13] <SWPadnos> yep indeed!
[18:04:21] <etla> what's the PTH library good for ?
[18:04:32] <etla> and why doesn't it come with the standard install ?
[18:05:33] <SWPadnos> you don't need a threading library when RTAPI provides it for you
[18:05:41] <SWPadnos> but without RT, you do
[18:06:12] <etla> OK.
[18:06:26] <etla> and an emc built with --enable-simulator will run under a non RT kernel ?
[18:06:34] <SWPadnos> yes
[18:06:50] <SWPadnos> it even runs on 64-bit systems (with a small change to an NML file, I think)
[18:06:59] <etla> I'll have to try that since the RT kernel+emc are a bit slow on my laptop under vmware
[18:07:26] <SWPadnos> yeah- no need for vmware at all - that's why
[18:07:31] <SWPadnos> it's there
[18:07:55] <SWPadnos> (well, no need for RT, which on many workstations equates to no need for VMWare :) )
[18:08:26] <etla> I'm actually using winXP as the normal OS, so I really need a vm to run ubuntu.
[18:08:41] <SWPadnos> oh, in that case you're screwed
[18:08:42] <etla> since I didn't want to repartition etc. and install ubuntu that way
[18:09:11] <SWPadnos> but non-RT vmware seems snappy enough
[18:21:35] <maddash> with regard to sendProgramOpen, what is the single char * argument supposed to be? pointer to the name of the g-code file?
[18:21:55] <SWPadnos> that sounds likely
[18:22:01] <maddash> LOL
[18:22:21] <maddash> interesting way of saying, "yes."
[18:22:35] <SWPadnos> well, I don't know, but it sounds reasonable :)
[18:24:03] <maddash> I've got a problem, though.
[18:24:13] <maddash> I took the emcsh.cc, removed all references to \tcl\ , so that the only things left were sendprogramopen and it's cousin functions. I commented out the TCL and tk_main calls in int main(), and instead issued a sendProgramOpen(argv[3])....
[18:24:53] <maddash> I altered stepper_mm.ini to use the "emcsh" (which is actually my hacked-up version of it),
[18:25:46] <SWPadnos> and it doesn't run anything - just exits and shuts down emc?
[18:25:47] <maddash> and then issued "emc stepper_mm.ini" . everything works fine, until emcsh itself starts...then it returns "can't open ***", where "***" is the name of my file
[18:25:53] <SWPadnos> ok
[18:26:00] <maddash> um, left out one thing
[18:26:32] <SWPadnos> is that a fully qualified pathname or some blahblah.ngc
[18:26:35] <maddash> in the new stepper_mm.ini, now: DISPLAY = emc ~/roadrunner.var
[18:26:52] <SWPadnos> .var?
[18:27:43] <maddash> I discovered that when emcsh was called by emc.sh, argv consists of: new array ("emcsh", "stepper_mm.ini","-ini","~/roadrunner.var")
[18:28:40] <SWPadnos> that looks like argv[1] and [2] are swapped
[18:29:02] <maddash> so, passing the "sendProgramOpen(argv[3])" in main() should essentially pass sendProgramOpen("~/roadrunner.var");....which it does....
[18:29:07] <maddash> really?
[18:29:32] <maddash> the way I found out the ordered contents of argv was thru a for-loop
[18:29:36] <SWPadnos> I'd expect it to be emcsh -ini the_ini_file ...
[18:29:59] <SWPadnos> that probably doesn't affect your code, but it looks odd
[18:30:06] <maddash> ie, "for (i =0; i< argc; i++) printf("arg[%d] = %s\n",i,argv[i]);
[18:30:19] <maddash> that's the code I used, verbatim
[18:30:49] <SWPadnos> ok
[18:30:53] <maddash> I did find it interesting how "-ini" and "stepper_mm.ini" were switched,
[18:31:21] <maddash> but the return msg was even more peculiar: "can't open ~/roadrunner.var"
[18:31:42] <maddash> right after emcsh returns, I execute "nano ~/roadrunner.var"
[18:32:03] <maddash> and the validity of that absolute path to roadrunner.var was confirmed...
[18:32:24] <SWPadnos> try changing that to /home/whomever/roadrunner.var, just for the heck of it
[18:32:30] <maddash> sure
[18:32:48] <SWPadnos> one never knows who ~ is ...
[18:34:38] <SWPadnos> hmmm. I think the tilde is a shell expansion feature, not a part of the kernel or clib
[18:36:05] <maddash> ok, so: 1) in stepper_mm.ini, now, DISPLAY=emcsh /home/maddash/roadrunner.var 2) executed "emc stepper_mm.ini" 3) received same error msg, "Unable to open file \n can't open /home/maddash/roadrunner.var \n Shutting down and cleaning up EMC"
[18:36:28] <maddash> 4) executed "nano /home/maddash/roadrunner.var" - works fine, brings up my gcode file...
[18:37:09] <SWPadnos> the "unable to open file" message is from the emc run script, right? (not your program)
[18:38:00] <maddash> should be.
[18:38:37] <maddash> I executed ' grep -r can\'t[[:space:]]open * '
[18:38:51] <SWPadnos> yeah - that's not it
[18:39:07] <SWPadnos> it would say "Unable to open DISPLAY program..."
[18:39:35] <maddash> most likely that emctaskmain.cc issued err msg
[18:40:56] <maddash> "Unable to open file" is from rs274ngc_errors.cc
[18:41:20] <SWPadnos> ok
[18:42:31] <SWPadnos> did you notice jepler's "jdi" program?
[18:42:59] <maddash> google returns near nothing
[18:43:02] <maddash> what is it?
[18:43:06] <SWPadnos> http://axis.unpy.net/
[18:44:08] <maddash> interesting
[18:44:21] <SWPadnos> it sounds basically like what you want
[18:44:24] <maddash> it does part of what I want...
[18:44:38] <SWPadnos> well, time to learn python then :)
[18:46:03] <maddash> the problem is that python may not be fast enough. my finished program (assuming I can finish it) will be run around 1200-1600 times every 8 hours...
[18:46:13] <maddash> for* 8 hours
[18:46:42] <maddash> it just seems such a waste of cycles to have to invoke python that many times...
[18:46:50] <SWPadnos> the interpreter will be cached, so the first load may take a second, but after that it won't
[18:47:17] <SWPadnos> unless the machining time is <2 seconds, the python overhead will be insignificant
[18:47:50] <SWPadnos> 8 hours = 28800 seconds, so that's ~20 seconds per run
[18:50:14] <maddash> I think I know what went wrong - I compiled my emcsh by issuing ./configure --enable-run-in-place in "emc2/src", and then "make"....
[18:50:53] <maddash> then I copied over the resulting emcsh.bin: sudo cp ~/emc2/bin/emcsh /usr/bin/emcsh
[18:59:23] <maddash> nope, that doesn't seem to be it
[19:00:47] <maddash> ugh
[19:06:44] <SWPadnos> it could be that there's something wrong with the environment and/or the ini file
[19:07:53] <cradek> maddash: you cannot compile run-in-place and then hope to move the binaries around.
[19:08:53] <cradek> at least some of them will break because of shared library paths if you do that
[19:12:53] <jepler> $ PYTHONPATH=/usr/src/emc2/lib/python/ time python -c 'import emc, hal; c = emc.command(); s = emc.stat()'
[19:12:54] <jepler> 0.03user 0.02system 0:00.05elapsed 96%CPU
[19:13:08] <jepler> ^^^ as to the fear that Python is not fast enough, I think it is just false
[19:14:47] <SWPadnos> just using bash to execute anything takes a small but measurable amount of time (on the order of milliseconds)
[19:15:22] <SWPadnos> I think jmk and I did loops of /bin/echo > /dev/null to check that
[19:16:23] <maddash> cradek: doesn't matter, I re-"make"-ed everything, after I "./configure"-ed.
[19:16:24] <jepler> the time to run a python script is dwarfed, for instance, by the time to execute "realtime start"
[19:17:25] <maddash> jepler: I won't have to "realtime start" several hundred times a day...
[19:17:56] <jepler> for the same reasons, you wouldn't have to pay the Python startup time several hundred times per day
[19:18:46] <cradek> 200 * 0.05s = 10s
[19:25:21] <SWPadnos> 1600 * 0.05s = 80s, still not too long
[19:27:03] <jepler> or 0.28% of 8 hours
[19:28:29] <SWPadnos> well, it is 1/360 of the time :)
[19:28:53] <jepler> I am frustrated when people say "python may not be fast enough" (to do something 2000 times in 8 hours!!) without gathering any information about the speed of Python
[19:29:43] <cradek> jepler: I let myself be dragged into an argument about stripping things out of the four-megabyte emc2 installation to save disk space - same guy
[19:30:02] <cradek> jepler: so my unsolicited advice is to not worry too much
[19:30:07] <jepler> thanks
[19:30:15] <jepler> sound advice I'm sure
[19:30:28] <SWPadnos> indeedy
[19:30:41] <cradek> (next he's going to figure out that there's no interpreter in emcsh to read his gcode with)
[19:31:20] <SWPadnos> he's using his emcsh to tell emc to open the file, so I think he's got that right
[19:31:51] <cradek> I don't think it can - I'm pretty sure emcsh can only open a different kind of file (one with bare positions)
[19:32:08] <cradek> and for each line it sends a SET_LINE to motion
[19:32:20] <SWPadnos> I thought it could send the NML mesasge "load program" or similar
[19:32:30] <SWPadnos> hmmm - that could be his problem then :)
[19:32:42] <cradek> what problem? it's not working?
[19:32:47] <cradek> (I didn't read back)
[19:33:00] <SWPadnos> <maddash>with regard to sendProgramOpen, what is the single char * argument supposed to be? pointer to the name of the g-code file?
[19:33:19] <SWPadnos> <maddash>ok, so: 1) in stepper_mm.ini, now, DISPLAY=emcsh /home/maddash/roadrunner.var 2) executed "emc stepper_mm.ini" 3) received same error msg, "Unable to open file \n can't open /home/maddash/roadrunner.var \n Shutting down and cleaning up EMC"
[19:33:44] <SWPadnos> I don't know why he chose to name his file *.var
[19:34:01] <SWPadnos> that error is from rs274ngc_errors.cc
[19:34:42] <cradek> oh, emcsh, duh
[19:35:03] <cradek> last time he was using usrmot
[19:35:07] <cradek> forget what I said
[19:35:10] <SWPadnos> ok
[19:35:27] <SWPadnos> so - you may have missed that the mesa stuff arrived today (one day early)
[19:35:29] <cradek> remember he didn't want to install tcl? he must have changed his mind to build emcsh
[19:35:54] <cradek> oh, cool
[19:35:58] <SWPadnos> no, that's why he's making his own version of emcsh - he said he stripped out every reference to tcl and some other stuff
[19:36:19] <SWPadnos> I took the emcsh.cc, removed all references to \tcl\ , so that the only things left were sendprogramopen and it's cousin functions. I commented out the TCL and tk_main calls in int main(), and instead issued a sendProgramOpen(argv[3])....
[19:36:26] <SWPadnos> end quote :
[19:36:29] <SWPadnos> :)
[19:36:33] <cradek> ok... good grief
[19:36:43] <SWPadnos> not that python would be any easier, mind you ...
[19:37:04] <SWPadnos> I even pointed him to jdi
[19:37:18] <cradek> yeah, jdi is already done
[19:37:43] <cradek> * cradek shrugs
[19:37:53] <SWPadnos> making a looped version of that would be interesting. wait for HAL pin xxx, then run, set pin YY, lather, rinse, repeat
[19:38:09] <cradek> that's trivial
[19:38:23] <SWPadnos> yes, trivial yet still somehow interesting :)
[19:38:42] <SWPadnos> and it would probably be much more efficient than running scripts/emc several thousand times a day
[19:39:42] <cradek> using halui to poke "run" would be just as good
[19:39:57] <cradek> plenty of approaches
[19:40:04] <SWPadnos> that's true, but there is the problem of specifying the file(s) to load
[19:40:21] <cradek> true, I assumed you'd load it initially
[19:40:30] <jepler> we've led him to water on that "problem" anyawy
[19:40:31] <jepler> anyway
[19:40:34] <cradek> at least with axis, you can specify the file on the emc commandline
[19:40:41] <jepler> you can with jdi as well
[19:40:40] <SWPadnos> yes
[19:40:55] <SWPadnos> his main issue is that the machine has to run without operator interaction, I think
[19:41:24] <SWPadnos> so no manually pointing at a file (in fact, no display, from what I've gathered)
[19:41:25] <cradek> that's an interesting problem
[19:41:28] <SWPadnos> yes
[19:48:30] <SWPadnos> I suppose I should have ordered some of the ez-whatever connectors for the 7i30 cards when I placed that digikey order
[19:49:15] <cradek> aw that would have been so nice of you :-)
[19:49:27] <SWPadnos> there's still time :)
[19:49:43] <SWPadnos> my other order doesn't arrive until tomorrow (the one with the 50-pin IDC connectors)
[19:49:54] <cradek> except that we didn't pay you for them
[19:50:08] <SWPadnos> well, that is a problem. :)
[19:50:16] <cradek> how many people got the 7i30?
[19:50:45] <SWPadnos> the inbound shipping was a little lower than I expected - only $40. the outboud may be as well - they're very light devices
[19:50:48] <SWPadnos> only 5
[19:51:09] <SWPadnos> (1 each for 5 different people, of course)
[19:51:53] <skunkworks> I paid ;)
[19:54:13] <SWPadnos> the only payments I haven't received are from people whose nicks begin with "a" :)
[19:54:28] <alex_joni> * alex_joni isn't around
[19:54:38] <alex_joni> this is an automated reminder
[19:54:47] <SWPadnos> yours I know about. I don't expect it fora week or so :)
[19:55:00] <alex_joni> oh.. good
[19:55:09] <alex_joni> now I'm here :P
[19:55:11] <SWPadnos> heh
[19:55:24] <SWPadnos> it's that A character I've got to watch out for :)
[19:58:32] <alex_joni> a?
[19:58:44] <SWPadnos> "A", not "a"
[19:58:47] <alex_joni> anyways.. I'm off for a while.. bbl
[19:58:57] <SWPadnos> see you later
[19:59:04] <alex_joni> bye
[19:59:39] <SWPadnos> does anyone have a preference for RoHS / non-RoHs 5i21s? (alex gets a RoHs one :) )
[19:59:46] <SWPadnos> err - 5i20s
[20:00:34] <cradek> am I supposed to know what that means?
[20:00:39] <cradek> no lead or something?
[20:00:43] <SWPadnos> lead-free or not lead-free
[20:01:03] <cradek> in what language does "RoHs" spell lead-free?
[20:01:26] <jepler> "reduction of harmful substances"?
[20:01:37] <SWPadnos> "Reduction of Hazardous Substances" law
[20:01:53] <cradek> good guess jepler!
[20:02:08] <cradek> well I sure don't care, send me the lead
[20:02:27] <SWPadnos> then there's WEE (I'm not sure what it stands for)
[20:02:43] <SWPadnos> it means "companies have to dispose of the crap they make when it dies"
[20:02:57] <SWPadnos> hmmm - could be WEEE
[20:03:24] <SWPadnos> ah yes - "Waste Electrical and Electronic Equipment"
[20:03:36] <cradek> my friend michael says fast food companies should have to deal with the litter their "patrons" throw about
[20:04:04] <SWPadnos> I'd extend that to cigarette butts
[20:04:16] <skunkworks> A_?
[20:04:16] <skunkworks> ;)
[20:04:30] <cradek> I'm sure he would too
[20:04:52] <SWPadnos> I'd really love to see someone pulled over for littering
[20:04:58] <SWPadnos> there are signs everywhere, and litter also
[20:05:09] <cradek> I doubt it's ever happened.
[20:06:11] <cradek> those fast-food-carton-throwers and cigarette-butt-flickers are losers.
[20:06:36] <cradek> friday I watched a guy standing next to an ashtray (near the door of the coffee shop) flick his into the parking lot.
[20:06:51] <cradek> the ashtray was *next to him*
[20:07:09] <jepler> http://ask.metafilter.com/mefi/53820
[20:07:21] <SWPadnos> oh yeah - the one time I actually yell out expletives to other drivers is when they flick their butts out the window
[20:08:15] <jepler> awwww my poor friend littered and then got busted for the drugs he was carrying and high on at the time
[20:08:18] <cradek> jepler: haha wheeeeee!
[20:08:31] <SWPadnos> those nasty jack-booted pigs!
[20:10:54] <cradek> I have to admit the last couple <ahem> times I was pulled over, the cops were very nice
[20:11:28] <SWPadnos> oh wait. I meant those nasty smoking jacked-up-truck-driving cigarette butt flickers!
[20:12:13] <cradek> I wonder if it's my age, my color, my politeness, or my non-loserness that makes the difference
[20:12:27] <cradek> or the ... normal size of my tires??
[20:12:33] <SWPadnos> heh - that must be it
[20:12:41] <cradek> that seems a stretch
[20:12:43] <SWPadnos> perhaps politeness and attitude count for something
[20:14:48] <cradek> (maybe not carrying drugs around helps too)
[20:15:05] <SWPadnos> I've always found that to be helpful when dealing with police
[20:16:19] <SWPadnos> cradek, do you want some of these connectors?
[20:16:23] <SWPadnos> I think I will order some
[20:16:41] <jepler> which connectors are these?
[20:16:48] <cradek> if it's not inconvenient
[20:16:56] <SWPadnos> mini Mate-n-Lok for the 7i30 quad H-bridge board
[20:17:12] <SWPadnos> ok. you'll have to convince jepler that he should wait for his 5i20 though :)
[20:17:12] <jepler> oh -- those
[20:17:25] <cradek> uh-oh
[20:17:28] <SWPadnos> heh
[20:17:39] <cradek> do they need a special tool?
[20:18:12] <SWPadnos> crimping you can usually do without one, but removing pns from the housing usually destroys the pin
[20:18:25] <SWPadnos> or the retaining clip anyway
[20:18:40] <cradek> wonder if I could come up with screw terminals to replace them with
[20:18:54] <SWPadnos> ?
[20:18:57] <SWPadnos> I don't think so
[20:19:06] <cradek> I mean take them off the board and put something else on
[20:19:10] <SWPadnos> you could always solder to the back side of the board ;)
[20:19:32] <SWPadnos> they're a 3x3 array, so it's not too standard-looking
[20:20:17] <cradek> might be better to make a separate board with screws that plugs into it
[20:20:22] <SWPadnos> 4.2 mm beween pins
[20:21:23] <SWPadnos> well, the housings are $0.66 each (in 25 qty, which I'd get). the pins are 9.8 cents in 100's
[20:21:32] <SWPadnos> so I guess $1.50 or so per full connector
[20:21:56] <SWPadnos> it may not be worth it to kludge something, especially if it requires you to desolder the connectors
[20:23:31] <cradek> I agree
[20:24:21] <SWPadnos> hmmm - they don't seem to have all the peices in stock - this may be a moot point
[20:26:08] <cradek> "Anyway, don't ever leave weed sitting around in your car. It should never be in your car unless it absolutely needs to be."
[20:26:11] <cradek> haha
[20:26:16] <cradek> thanks, Mr. Obvious!
[20:26:27] <SWPadnos> a mantra I always live by
[20:34:04] <SWPadnos> heh - nice conclusion there jepler
[20:34:37] <jepler> it was a bit of a stream-of-consciousness there, I admit
[20:35:12] <SWPadnos> too hard to solve while writing this email = forget about it :)
[20:36:01] <skunkworks> The few times I have been pulled over - in my "japanese super car" The police officers were nice also. Just a warning.
[20:36:32] <skunkworks> wife has been pulled over about 100 times with no ticket..
[20:36:43] <skunkworks> for speeding
[20:36:56] <SWPadnos> boobies? :)
[20:37:01] <skunkworks> I think so..
[20:38:17] <SWPadnos> my sister got pulled over in Arizona I think. we had a local cop and a county sheriff following us (she hand't noticed the police, she just pulled over so we could look at a map)
[20:38:34] <lerneaen_hydra> * lerneaen_hydra thinks the topic in #emc-devel is so very fitting :D
[20:38:43] <SWPadnos> when the cops noticed the daisy duke outfit, they got very helpful with directions :)
[20:39:33] <SWPadnos> (the really funny thing is that I had driven for ~1000 miles at vbery high speed, and hadn't gotten pulled over. she drove for 50 miles and missed a reduced speed limit sign, and got caught)
[22:16:10] <cradek> *$&^#@ home-grown getopt