#emc | Logs for 2007-02-27

Back
[00:02:49] <twice2> yes, i think so. there is a sequence and is_homed
[00:08:27] <jepler> I sent an e-mail to our developers list, emc-developers@lists.sourceforge.net, about this problem
[00:08:34] <twice2> no the sequence is only for Home All
[00:09:16] <jepler> once you unhook all the -lim-sw-in does Home All work?
[00:09:20] <twice2> great, it would be cool if it would work like i envisioned
[00:09:59] <twice2> i'll check
[00:10:11] <jepler> OK -- it's dinnertime here but I'll check back later
[00:12:30] <twice2> they all take off together. It doesn't seem to be enforcing the sequence, as I understand it
[00:16:18] <jepler> you're using emc 2.1.0?
[00:16:32] <jepler> (or 2.1.1)
[00:16:53] <jepler> well you have to be to have the Home All button, don't you...
[00:16:59] <twice2> yes
[00:17:51] <jmkasunich> jepler: just read back (and read your email)
[00:18:12] <jmkasunich> I have no issue with changing axis.N.homing from a param to a pin
[00:18:14] <twice2> i read HOME ALL'') and enforce homing order (e.g., Z may not be homed if X is not yet homed
[00:18:25] <jmkasunich> in fact, I have no issue with doing it for 2.1.2
[00:18:52] <jmkasunich> it is very very unlikely to break anybody's config, since they can be connecting anything to the param at the moment
[00:19:08] <jmkasunich> can't be connecting ;-)
[00:20:01] <jmkasunich> personally I'd use CL instead of hal gates, but the pin change would leave that up to the users
[00:20:10] <jmkasunich> want me to make the change?
[00:20:26] <jepler> twice2: is that the right .ini file in your pastebin? It has 'mini' as the GUI, which doesn't have a Home All button to the best of my knowledge
[00:20:40] <jepler> jmkasunich: sure if you can make the change and test it I'd be thrilled
[00:20:49] <jmkasunich> will do
[00:21:02] <jmkasunich> oh, look... an update.
[00:21:02] <twice2> that's is the correct ini, mini has zero all
[00:21:06] <jmkasunich> emc2.1.1 ;-)
[00:22:36] <jepler> twice2: can you use the AXIS GUI? I bet its Home All button works
[00:22:52] <twice2> i'll try it
[00:23:09] <jepler> mini's "ALL ZERO" button is dumb and doesn't respect the homing sequence (it just wasn't updated for emc 2.1's new features, I guess)
[00:24:27] <twice2> yes, axis works as the book describes it
[00:25:19] <twice2> it's got the BIG buttons though :)
[00:25:40] <jmkasunich> what does? axis? or mini?
[00:26:13] <twice2> mini
[00:26:53] <twice2> i didn't let it go all the way to the switches because the speed is way to high for a first try :)
[00:36:53] <jmkasunich> change done...
[00:37:04] <jmkasunich> oh... you want me to test it too?
[00:37:08] <jmkasunich> ;-)
[00:37:30] <skunkworks> nice work on the configuration selector. there should be no more issues un-editable configs ;)
[00:37:45] <jmkasunich> * jmkasunich tries to rememver if any of the sim configs have simulated home switches
[00:39:29] <jmkasunich> it works
[00:40:59] <CIA-6> 03jmkasunich 07TRUNK * 10emc2/src/emc/motion/ (control.c mot_priv.h motion.c): convert 'axis.N.homing' from parameter to pin to allow external limit disable logic
[00:51:41] <twice2> thanks jmkasunich, i'm not up to speed with it though. I mean not sure how to implement it
[00:52:26] <jmkasunich> unless you are running from CVS, you won't see that change for a while
[00:52:49] <twice2> mok
[00:54:03] <cradek> it has always bothered me that HOME_IGNORE_LIMITS would ignore both limits - maybe this is the right fix for that
[00:54:46] <jmkasunich> hard to say
[00:55:03] <jmkasunich> HOME_IGNORE_LIMITS just works - this requires people do do some hal and or classicladder foo
[00:55:17] <cradek> yeah, that's my concern too
[00:55:55] <cradek> it's hard to support any possible configuration of switches
[00:55:56] <jmkasunich> the issue here was a guy with the high and low limits for all axis on one pin
[00:56:06] <cradek> right
[00:56:06] <jmkasunich> there is no "good" way to deal with that
[00:56:11] <cradek> and he wants to home on them too
[00:57:00] <cradek> so HOME_IGNORE_LIMITS will still ignore both limits on its own axis, right?
[00:57:05] <cradek> we have to keep that at least through 2.1
[00:57:10] <jmkasunich> yes
[00:57:12] <jmkasunich> no change there
[00:57:37] <cradek> ok
[00:57:47] <twice2> my switches are all wired in series to one pin
[00:58:15] <cradek> I see, so you have to get it to ignore all six limits when anything is homing
[00:58:24] <CIA-6> 03jmkasunich 07v2_1_branch * 10emc2/src/emc/motion/ (control.c mot_priv.h motion.c): change 'axis.N.homing' from a parameter to a pin to allow external logic for disabling limits during homing
[00:59:01] <jmkasunich> you do understand exactly why this bug was found today, right?
[00:59:02] <twice2> well all five
[00:59:14] <cradek> yeah because I made a release yesterday
[00:59:19] <jmkasunich> yep
[00:59:23] <cradek> grrr
[00:59:31] <cradek> (I'm not sure it's a bug)
[00:59:44] <jmkasunich> for twice2 its a bug
[01:00:15] <cradek> or a missing feature (support for homing and all limits on one pin) - that's debatable
[01:00:37] <twice2> dunno, just didn't work as i expected it to.
[01:00:44] <jepler> cradek: it's a bug because several of us assured him this setup would work without checking if it was true
[01:00:59] <jepler> we couldn't be wrong about what features are in the software, therefore the only other alternative is that it's a bug
[01:01:05] <jmkasunich> that particular bug might not be in the code ;-)
[01:01:08] <cradek> ok I can accept that
[01:02:54] <cradek> either way, I like the added flexibility this gives
[01:03:10] <cradek> I don't like the added complexity, but they come together
[01:03:28] <cradek> (I guess it's no more complex if you don't use it)
[01:03:32] <twice2> i leave it to you guys not to break stuff for me
[01:03:34] <jmkasunich> people that don't want the flexibility don't have to pay the complexity price
[01:03:35] <jmkasunich> right
[01:04:04] <cradek> twice2: we always argue like this, it's healthy
[01:04:35] <twice2> axis, home all work great, i will take jepler's advice and let emc softlimits work until this change filters down to me
[01:05:00] <cradek> great
[01:05:17] <cradek> so you're jogging to a certain position and calling that home, and using soft limits from there?
[01:05:34] <twice2> no, homing works
[01:05:48] <cradek> oh, but not limits, I see
[01:05:52] <cradek> duh, sorry
[01:06:30] <twice2> yeah, can't series it through hardware then homing is broken
[01:06:37] <jmkasunich> twice2: we don't have a schedule for 2.1.2 yet, but it will probably be between a couple of weeks and a month from now (since 2.1.1 just came out)
[01:07:29] <twice2> cool, i'm not a shover
[01:09:19] <twice2> ok guys thanks for listening, i may need to axe you again when 2.1.2 is out :)
[01:13:57] <jmkasunich> well, on a completely different topic (off topic actually) I made an interesting part on the lathe today
[01:14:43] <jmkasunich> the carpenter who has been working on our railings is also an amateur magician, who uses sockets (as in ratchet and socket) as props
[01:14:55] <jmkasunich> I made a fake socket for him
[01:15:09] <jmkasunich> a very thing (0.020") shell that fits over a socket and passes for real
[01:15:41] <jmkasunich> s/thing/thin/
[01:15:54] <cradek> what trick is that for?
[01:16:26] <jmkasunich> I guess he puts the socket (and shell) on a string, then takes it off, and later its back on again
[01:16:29] <jmkasunich> because he only took off the shell
[01:16:41] <cradek> cool
[01:19:46] <cradek> jmkasunich: don't forget to put a note in the branch's changelog
[01:19:59] <jmkasunich> ok
[01:20:04] <cradek> dch -i
[01:20:12] <jmkasunich> what about head's changelog?
[01:20:38] <cradek> when we finally release 2.2, we'll put in only the things that weren't in 2.1, so it doesn't belong there (I think)
[01:20:58] <jmkasunich> is dch part of some deb tools pacakge?
[01:21:04] <cradek> yes
[01:21:05] <jmkasunich> don't seem to have it here
[01:21:06] <jmkasunich> ok
[01:21:33] <cradek> 'devscripts'
[01:21:56] <jmkasunich> dev, not deb?
[01:22:01] <cradek> dev
[01:28:39] <jmkasunich> dch <- blind
[01:28:51] <cradek> ?
[01:28:57] <jmkasunich> jmkasunich@ke-main-1006:~/emcdev/emc2.1$ dch -i "change axis.N.homing from HAL parameter to pin, to allow external logic"
[01:28:57] <jmkasunich> dch: fatal error at line 317:
[01:28:57] <jmkasunich> Cannot find debian/changelog anywhere!
[01:28:57] <jmkasunich> Are you in the source code tree?
[01:29:13] <jmkasunich> same result when running from the emc2.1/debian
[01:29:28] <jmkasunich> ~/emcdev/emc2.1 is my 2.1 checkout
[01:29:30] <cradek> works for me
[01:29:51] <cradek> well I always use just "dch -i" and it starts an editor
[01:30:13] <jmkasunich> same err that way
[01:30:17] <jmkasunich> (no surprize)
[01:30:44] <cradek> chris@buster:~/emc2-2.1.1$ dch -i asdf
[01:30:44] <cradek> dch warning: your current directory has been renamed to:
[01:30:44] <cradek> ../emc2-2.1.2
[01:31:01] <jmkasunich> never mind - operator error
[01:31:31] <jmkasunich> I had a conflict in changelog, so I deleted it, but forgot to do cvs up to re-fetch it
[01:31:37] <cradek> ahh
[01:32:39] <jmkasunich> the email it inserted into the changelog is bogus, but I can fix that
[01:33:05] <jmkasunich> * jmkasunich inserts cradek's address ;-)
[01:33:10] <cradek> that comes from $DEBEMAIL in the environment
[01:33:13] <cradek> ha
[01:33:15] <cradek> that's fine
[01:34:31] <cradek> sometimes I get the impression that my cat doesn't really care what I'm doing at the computer
[01:34:36] <jmkasunich> nah, I left mind in there
[01:34:41] <jmkasunich> mine
[01:35:00] <jmkasunich> of course they don't care
[01:35:13] <jmkasunich> whatever you are doing is less important than petting the cat
[01:35:57] <CIA-6> 03jmkasunich 07v2_1_branch * 10emc2/debian/changelog: change 'axis.N.homing' from a parameter to a pin to allow external logic for disabling limits during homing
[01:36:20] <jmkasunich> the -i should only be used for the first change after a release, right?
[01:36:27] <cradek> yes
[01:36:41] <jmkasunich> * jmkasunich read the fine man page ;-)
[01:37:47] <cradek> now you can even build a package
[01:37:53] <jmkasunich> * jmkasunich hides
[01:42:51] <CIA-6> 03jepler 07TRUNK * 10emc2/docs/man/man1/hal_input.1: make hal_input's items act more like the HAL canonical interfaces they resemble
[01:42:50] <CIA-6> 03jepler 07TRUNK * 10emc2/src/hal/user_comps/hal_input.py: make hal_input's items act more like the HAL canonical interfaces they resemble
[01:50:49] <CIA-6> 03jepler 07TRUNK * 10emc2/lib/python/linux_event.py: updated with values from kernel 2.6.15-27-686
[01:53:09] <cradek> http://timeguy.com/cradek-files/emc/wtf-bank.png
[01:53:41] <cradek> we don't know why, but here's a picture of an eagle.
[01:56:45] <CIA-6> 03jepler 07TRUNK * 10emc2/src/hal/user_comps/hal_input.py:
[01:56:45] <CIA-6> fix several causes of division by 0 (position-scale of 0 is treated as 1)
[01:56:45] <CIA-6> get rid of debugging statements
[01:57:18] <jepler> "you don't know what phising is, so here's a picture of an eagle"
[01:57:18] <cradek> 'KEY_ZENKAKUHANKAKU': 85 ?
[01:57:24] <jepler> btfoom
[01:57:36] <jepler> it's the key you press when you're having a sneezing fit, I think
[01:57:55] <jepler> ^_^ I however, couldn't convince uim-fep to recognise my remapped-to-ZenkakuHankaku-Super_R key, so gave up on it once I had uim-xim working. ...
[01:57:59] <jepler> lists.debian.org/debian-japanese/2005/06/msg00050.html
[01:58:44] <jepler> I think that key is a toggle between ZENKAKU and HANKAKU methods of entering text
[01:58:59] <jepler> but I don't know what those are
[01:59:05] <cradek> ohh
[01:59:07] <jepler> I was also surprised they dared to remap the F-keys
[01:59:41] <jepler> but the current version is showing the correct name when I press them
[01:59:49] <jepler> (didn't notice before that it was wrong but I am sure I didn't check)
[02:01:11] <jepler> $ apt-cache show xserver-xorg-input-synaptics | grep Version
[02:05:27] <cradek> works right in my xfree86 4.1.0...
[02:06:29] <jepler> hal_input, you mean?
[02:06:49] <cradek> um, the F keys, I meant
[02:07:04] <cradek> I was joking
[02:07:15] <jepler> oh
[02:07:17] <jepler> sorry
[02:08:46] <cradek> my server at home is so old it took me a few tries to come up with the root password
[02:11:00] <jlmjvm> jepler:what is the status of the 8255 pci board on your website
[02:16:04] <jepler> jlmjvm: it's waiting for me to get back to it and test more thoroughly. tomp reported some success to me awhile back, you might ask him if you can catch him.
[02:21:10] <crepincdotcom> anyone have a reasonable source for ball screw other an ebay?
[02:23:35] <jepler> hello mshaver !
[02:26:12] <mshaver> hey!
[02:26:29] <mshaver> I got a build system question
[02:27:34] <mshaver> I'm trying to make a stand alone interpreter & i'm having trouble with segfaults originating in Interp::doLog
[02:28:30] <mshaver> I've removed all traces of doLog from the source files to try to find out what the problem is
[02:29:21] <mshaver> but, after doing a 'make' from emc2/src, i still get Interp::doLog in my backtrace from gdb
[02:30:00] <jepler> I don't know how to invoke the stand alone interpreter, but if you tell me I'll try to figure out the problem with you
[02:30:02] <mshaver> Does 'make' really rebuild everything & copy the libraraies where they're supposed to go?
[02:30:20] <jepler> yes, it's supposed to. You need to "make install" unless using --enable-run-in-place
[02:30:46] <mshaver> I'm doing a 'make clean' then 'make' now...
[02:31:24] <jlmjvm> crepincdotcom:these guys have ball screws http://www.homeshopcnc.com/
[02:31:25] <mshaver> hmm --enable-run-in-place... I did that at the beginning when I set up this machine
[02:31:39] <jepler> OK -- no 'make install' necessary then
[02:31:44] <jepler> how do I invoke the stand alone interpreter?
[02:32:02] <mshaver> I'll have to send you the sources
[02:32:15] <mshaver> I need to ask where it should go in the dir tree
[02:32:34] <jepler> oh -- it's a new binary?
[02:32:48] <mshaver> I'll tar it up & e-mail it to you in a minute
[02:32:54] <mshaver> yep (new bin)
[02:33:39] <jepler> In the Submakefile where you liked it, did you include $(LDFLAGS) in the linker commandline? Try "ldd stand-alone-interpreter" and make sure the shared library librs274.so is coming from your source tree, not from the emc2 you may have installed in /usr/lib
[02:33:40] <mshaver> right now I made src/emc/sai and put it in there with it's own little Makefile
[02:34:20] <jepler> a Makefile or a Submakefile?
[02:35:15] <mshaver> You'll love this (Makefile):
[02:35:21] <mshaver> COMPILE = g++ -c -v -g
[02:35:21] <mshaver> LINK = g++ -v
[02:35:21] <mshaver> INCLUDE = -I ../../../include/ -I ../rs274ngc
[02:35:21] <mshaver> all: rs274
[02:35:21] <mshaver> saicanon.o: saicanon.cc ../nml_intf/canon.hh
[02:35:22] <mshaver> $(COMPILE) $(INCLUDE) -o saicanon.o saicanon.cc
[02:35:24] <mshaver> driver.o: driver.cc ../nml_intf/canon.hh ../rs274ngc/rs274ngc.hh ../rs274ngc/rs274ngc_return.hh
[02:35:28] <mshaver> $(COMPILE) $(INCLUDE) -o driver.o driver.cc
[02:35:30] <mshaver> rs274: ../../../lib/librs274.so saicanon.o driver.o
[02:35:32] <mshaver> $(LINK) -o rs274 ../../../lib/librs274.so saicanon.o driver.o -lm
[02:35:32] <mshaver> clean:
[02:35:34] <mshaver> rm *.o
[02:36:00] <mshaver> My understanding of make is not that good
[02:36:15] <crepincdotcom> jlmjvm: thanks
[02:36:18] <mshaver> I couldn't understand how to make a Submakefile
[02:36:57] <jepler> mshaver: first, in the src/Makefile, add your new directory to SUBDIRS
[02:37:08] <jepler> mshaver: then let me see if I can write an appropriate Submakefile based on what you showed me above
[02:37:19] <mshaver> OK!
[02:37:24] <crepincdotcom> so so what are the implications of a stepper setup? if I rapid to x0, does it turn off the motor, then reverse the polatiry to break it? and if so, does it ever overshoot the spot, or just creep slowly towards it?
[02:37:31] <mshaver> Let me send you the files...
[02:38:28] <jepler> mshaver: the binary program is called "rs274"?
[02:41:03] <mshaver> yep.. sending files now...
[02:41:36] <cradek> hi matt!
[02:41:46] <jepler> src/emc/sai/Submakefile: http://pastebin.ca/373922
[02:42:31] <cradek> sounds like your cvs must have worked
[02:43:36] <jepler> patch for src/Makefile to add emc/sai subdirectory: http://pastebin.ca/373924
[02:44:57] <mshaver> hey chris!
[02:45:23] <cradek> think you're going to make it to workshop in june?
[02:45:26] <mshaver> OK, getting that stuff
[02:45:37] <mshaver> June... HOT!
[02:45:46] <mshaver> , but probably yea
[02:45:48] <jepler> mshaver: to cut & paste from pastebin.ca it works best to click the "raw" link
[02:45:50] <cradek> yeah I'm sad it's not the same time of year - it was perfect last year
[02:46:18] <mshaver> OK
[02:48:29] <jepler> mshaver: how are you sending me those files? I'm watching my e-mail but I use greylisting so the first e-mail takes awhile to come through
[02:49:17] <mshaver> opps I sent them to Chris...
[02:49:22] <mshaver> 1 moment...
[02:49:45] <cradek> got 'em!
[02:49:48] <jepler> cradek: forward 'em to me if you want
[02:50:01] <cradek> done
[02:50:22] <jepler> cradek: hm you must not send me e-mail often enough, it greylisted you too
[02:50:41] <cradek> I resent/bounced
[02:50:45] <cradek> wonder if that's it
[02:51:04] <mshaver> I resent too
[02:51:09] <jepler> no, I don't think that's wh
[02:51:09] <jepler> why
[02:51:19] <jepler> I only see timeguy and unpy addresses in the log line
[02:51:28] <jepler> well .. in a few minutes when one of your MTAs re-sends it I'll have the files
[02:51:40] <jepler> and soon after that I'll have two copies
[02:51:41] <mshaver> give it a minute
[02:52:09] <jepler> mshaver: Since your Makefile didn't have the "rpath" I bet it is getting the librs274.so from /usr/lib, which wouldn't have the change you made
[02:52:30] <jepler> mshaver: the one you build with my Submakefile shold get the right librs274.so, but check it with 'ldd path/to/rs274'
[02:52:43] <jepler> mshaver: oh, and the Submakefile creates rs274 in the bin/ directory, not in emc/sai like your Makefile did
[02:53:05] <mshaver> I've been helping folks with gcode problems lately....
[02:53:25] <CIA-6> 03cradek 07TRUNK * 10emc2/src/emc/task/emccanon.cc: allow 6-axis TOOL_CHANGE_POSITION
[02:53:25] <CIA-6> 03cradek 07TRUNK * 10emc2/src/emc/ini/initool.cc: allow 6-axis TOOL_CHANGE_POSITION
[02:53:26] <mshaver> so a stand alone thing might help
[02:53:28] <jepler> mshaver: what kind of problems?
[02:53:41] <jmkasunich> hi matt!
[02:53:47] <mshaver> cutter diameter comp
[02:53:51] <mshaver> hey john!
[02:54:10] <jmkasunich> just spent an hour on the phone with Peter Wallace of mesa
[02:54:19] <jepler> mshaver: oh -- is this related to the stuff ray was musing about on the list?
[02:54:30] <jmkasunich> he's like Mariss - he'll talk your ear off
[02:54:32] <cradek> mshaver: let me apologize ahead of time for crapping it all up for lathe support
[02:54:32] <mshaver> yep, kinda
[02:54:40] <jmkasunich> (of course, it takes two to talk, I'm guilty too)
[02:54:47] <mshaver> hey, crap away!
[02:55:58] <cradek> oh I did :-)
[02:56:28] <mshaver> anyway, something interesting came up
[02:56:36] <cradek> mshaver: do you have a plan for allowing concave corners?
[02:57:04] <mshaver> I've got some gcode files (I'll send then to you) that should produce errors
[02:57:33] <mshaver> but the errors are annunciated only in mini, not axis or tkemc
[02:57:58] <cradek> strange...
[02:57:59] <CIA-6> 03jepler 07TRUNK * 10emc2/docs/src/config/emc2hal.lyx: document change of axis.N.homing to pin
[02:58:00] <cradek> what errors?
[02:58:04] <mshaver> re: concave corners - no foolproof ideas
[02:58:16] <cradek> mshaver: me neither
[02:58:19] <jepler> is this (axis.N.homing) only changed on TRUNK so far?
[02:58:46] <mshaver> "Cutter gouging with cutter radius comp" &
[02:59:07] <mshaver> "Tool radius not less than arc radius with comp"
[02:59:23] <cradek> interesting, I'd love to see them
[02:59:52] <mshaver> email coming momentarily...
[03:00:10] <cradek> quite a while ago someone reported seeing NaN in the gui when doing a concave corner made of an arc radius exactly the same as the tool radius (I think it was)
[03:00:21] <cradek> I can find the email if you're interested in that too
[03:02:41] <jepler> sai source showed up
[03:04:36] <jmkasunich> jepler: no, its backported to 2.1
[03:04:42] <jmkasunich> sorry, I should have updated the docs
[03:04:46] <jmkasunich> shame on me
[03:04:51] <jepler> np
[03:05:23] <CIA-6> 03jepler 07v2_1_branch * 10emc2/docs/src/config/emc2hal.lyx: merge rev 1.9: axis.N.homing is a pin now
[03:05:32] <steves_logging> steves_logging is now known as steve_stallings
[03:07:22] <jepler> mshaver: I got sai to compile after one change to the Submakefile .. but after I choose "1" it dies in fgets called from read_tool_file
[03:09:10] <jepler> I had to add ../lib/libnml.so to get the Ini file functions
[03:10:30] <mshaver> jepler: you have to have rs274ngc.tool_default * rs274ngc.var in your current dir
[03:11:11] <mshaver> jepler: Great! I had kind of spliced around that problem...
[03:13:26] <steve_stallings> FYI for jmk and cradek, Ray mentioned that he may be planning to use all six limit switches on a mill combined into one signal on one of his projects.
[03:14:02] <jmkasunich> then the recent change is a good thing
[03:14:41] <jepler> printf("%s:%d: about to read tool table\n", __FILE__, __LINE__);
[03:14:41] <jepler> for (; (fgets(buffer, 1000, tool_file_port) != NULL); )
[03:14:41] <jepler> {
[03:14:41] <jepler> printf("%s:%d: buffer=%p %s\n", __FILE__, __LINE__, buffer, buffer);
[03:14:53] <jepler> it prints 'about to read tool table' but not the next thing -- it segfaults on fgets
[03:15:07] <jepler> this is around line 331, after zeroing the tool table
[03:17:27] <mshaver> when you run it, do: ./rs274, then pick option 1 and you should get READ=>, type in G90 and hit Enter
[03:17:53] <mshaver> At that point I get a segfault in Interp::doLog
[03:18:06] <mshaver> Or can't you even get to the menu?
[03:18:16] <jepler> I get the menu and choose "1", then it segfaults
[03:18:31] <jepler> I made a change and now it can read the tool table
[03:18:43] <jepler> it's at the READ => prompt now, typing G90 does nothing
[03:18:53] <mshaver> run it in gdb, then when it segfaults do a 'bt' for a backtrace
[03:18:58] <CIA-6> 03cradek 07TRUNK * 10emc2/src/emc/ini/initool.cc: fix 6-axis TOOL_CHANGE_POSITION. remember to test before committing.
[03:19:07] <jepler> READ => G90
[03:19:07] <jepler> READ => G91
[03:19:07] <jepler> 6 N..... COMMENT("interpreter: distance mode changed to incremental")
[03:19:07] <jepler> READ => G90
[03:19:09] <jepler> 7 N..... COMMENT("interpreter: distance mode changed to absolute")
[03:19:11] <jepler> READ => G90
[03:19:27] <jepler> here's what I changed:
[03:19:28] <jepler> _tool_max = CANON_TOOL_MAX; /*Not static. Driver reads
[03:19:28] <jepler> */
[03:19:28] <jepler> CANON_TOOL_TABLE _tools[CANON_TOOL_MAX]; /*Not static. Driver writes */
[03:19:28] <jepler> /* optional program stop */
[03:19:34] <jepler> the first (_tool_max) said 68 before
[03:19:42] <jepler> after I changed it to match the size of _tools the segfault went away
[03:19:53] <jepler> I'm not sure whether that's right
[03:20:00] <jepler> (I also had to remove an entry from the tool table)
[03:20:19] <mshaver> great!
[03:20:30] <jepler> this looks a bit funny, like something else is overwriting memory:
[03:20:30] <jepler> interp_init
[03:20:30] <jepler> 1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
[03:20:30] <jepler> _parameter_file_name = ÿÿÿÿ4ngc.var
[03:20:38] <cradek> mshaver: I got your email but haven't tested yet... Are you positive all the guis were using the same tool table?
[03:20:42] <mshaver> yep, that's getting stomped on...
[03:21:19] <jepler> READ => g0x0y0z0
[03:21:19] <jepler> 7 N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
[03:21:19] <jepler> READ => g2x2y0i1j0
[03:21:19] <jepler> 8 N..... ARC_FEED(2.0000, 0.0000, 1.0000, 0.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000)
[03:21:29] <jepler> in a lot of ways it's working for me after that change to _tool_max
[03:21:33] <mshaver> cradek: I'm hoping they were all using sim.tbl
[03:22:47] <jepler> Hardware watchpoint 2: _parameter_file_name[0]
[03:22:47] <jepler> Old value = 114 'r'
[03:22:47] <jepler> New value = -1 'ÿ'
[03:22:47] <jepler> read_tool_file (tool_file_name=0x804e075 "rs274ngc.tool_default")
[03:22:47] <jepler> at emc/sai/driver.cc:328
[03:22:50] <jepler> 328 _tools[slot].zoffset = 0;
[03:22:57] <jepler> it's also the tool table that is corrupting parameter_file_name
[03:23:18] <mshaver> jepler: you'll see in saicannon.cc where I stubbed out most of GET_EXTERNAL_PARAMETER_FILE() to cause the interp to just use the default param file name
[03:23:38] <mshaver> rather than the corrupt one...
[03:25:39] <jepler> oh -- this is an off-by-one in the termination condition
[03:25:40] <jepler> for (slot = 0; slot < _tool_max; slot++) /* initialize */
[03:25:43] <jepler> should be <, was <=
[03:26:20] <mshaver> jepler: I tried the watchpoints, but couldn't get the history output you're getting...
[03:26:44] <jepler> _parameter_file_name = rs274ngc.var
[03:26:46] <jepler> fixed!
[03:27:14] <mshaver> you might as well commit this stuff if you can decide where in the tree to put it!
[03:27:29] <mshaver> it will save mew reading the CVS book...again....
[03:27:53] <jepler> any reason not to put it in src/emc/rs274 with the rest of the interpreter?
[03:28:03] <cradek> mshaver: did your tool table really have 21 entries? CutterComp.ngc was using G41 D21
[03:28:11] <mshaver> I'm OK to update existing files, but adding them...
[03:28:36] <mshaver> cradek: not all 21, but it had a "21" line in it.
[03:29:18] <cradek> ok
[03:29:30] <mshaver> jepler: no reason, except what about canterp?
[03:31:01] <jepler> mshaver: I'm not sure how this is related to canterp
[03:31:48] <mshaver> canterp is also an interpreter, there could also be a stand alone version of that
[03:31:52] <cradek> mshaver: everything works right, here
[03:32:16] <cradek> I made a tool 21 with 3/8 diameter like the programs say - I get the expected errors with AXIS
[03:32:55] <mshaver> cradek: do all the 'sim' GUI type entries in emc use sim.tbl?
[03:33:26] <cradek> in the sample configs that came with 2.1.1, all except lathe use sim.tbl
[03:33:32] <jepler> mshaver: OK, I'll add my files in the "sai" directory. This will make trouble for you when you 'cvs up' if you have an existing sai directory.
[03:33:50] <jepler> mshaver: do you have any changes in your own copy of the sai source files that is important to you?
[03:34:06] <mshaver> I'll just trash my existing sai & start fresh
[03:34:10] <jepler> OK
[03:34:19] <mshaver> no, nothing important - I sent you the latest
[03:34:47] <cradek> mshaver: maybe your configs are different -- I don't see anything wrong with tkemc either
[03:35:04] <jepler> mshaver: should I add "test.ngc"? I'm guessing not...
[03:35:05] <mshaver> I'm not opposed to sticking it in rs274ngc if you want
[03:35:28] <mshaver> no that's just something I made
[03:36:02] <mshaver> can you do: $./rs274 test.ngc?
[03:36:19] <mshaver> if so, piking "1" should read from the file...
[03:37:22] <mshaver> likewise: $./rs274 test.ngc test.out should write the results to argv[2]
[03:37:51] <CIA-6> 03jepler 07TRUNK * 10emc2/bin/.cvsignore:
[03:37:51] <CIA-6> new binary "rs274" is a standalone interpreter, reading g-code files
[03:37:51] <CIA-6> and producing a representation of the canon calls the commands produce
[03:37:51] <CIA-6> 03jepler 07TRUNK * 10emc2/src/Makefile:
[03:37:51] <CIA-6> new binary "rs274" is a standalone interpreter, reading g-code files
[03:37:51] <CIA-6> and producing a representation of the canon calls the commands produce
[03:37:53] <CIA-6> 03jepler 07TRUNK * 10emc2/src/emc/sai/ (5 files):
[03:37:55] <CIA-6> new binary "rs274" is a standalone interpreter, reading g-code files
[03:37:59] <CIA-6> and producing a representation of the canon calls the commands produce
[03:38:53] <jepler> mshaver: before you 'cvs up', 'mv sai sai.old' or 'rm -rf sai', otherwise cvs will get very confused
[03:39:11] <CIA-6> 03jepler 07TRUNK * 10emc2/src/emc/sai/driver.cc: get rid of debugging messages
[03:39:35] <mshaver> yep, i'll also have to delete rs274ngc.hh & rs274ngc_pre.cc
[03:39:55] <mshaver> which I also messed with fooling around...
[03:41:24] <mshaver> BTW, we'll have to credit Tom Kramer with most of that work, I'll try to put a regular GPL title bolck on it...
[03:42:00] <mshaver> hey, whatever happened to nc_tools?
[03:42:13] <jepler> I think it got lost/forgotten along the way
[03:42:33] <CIA-6> 03jepler 07TRUNK * 10emc2/src/emc/sai/driver.cc: get rid of one more debugging statement
[03:42:52] <mshaver> I was thinking I could add my bmp2cnc utility to it.
[03:43:25] <mshaver> how about a .bmp interpreter? ;)
[03:43:54] <jepler> mshaver: please add GPL licenses to the sai source files before going any further
[03:44:05] <mshaver> OK!
[03:44:28] <mshaver> I'll go & fix up my tree, brb...
[03:44:54] <jepler> emc 2.1 has 'image-to-gcode' which probably does something similar to bmp2cnc .. http://axis.unpy.net/files/01156615138/i2g.png
[03:45:36] <cradek> sai built here
[03:45:40] <ejholmgren> orly
[03:45:55] <jepler> I don't think anybody's actually *used* it yet
[03:46:30] <ejholmgren> I bet I will when the farging machine is done
[03:46:35] <jepler> hah
[03:46:52] <ejholmgren> got my delrin lead nuts today
[03:46:55] <ejholmgren> woo hoo!
[03:46:59] <cradek> I ought to cut something with that just to say it's been tested
[03:47:25] <jepler> actually I should take a careful look at the tool shape code in i2g because by the time I copied it out for gdepth, it was wrong
[03:47:26] <mshaver> yep, that's the same idea, I had a lot more options, but some were pretty obscure
[03:47:56] <jepler> or just copy it back out of gdepth (which I think is right now) into i2g
[03:47:59] <cradek> I think that image is old - it has nothing about the different directions/entries/etc
[03:48:07] <mshaver> ex: ortho mode for machines that couldn't do 3 axis interpolation
[03:48:35] <cradek> oh man, those poor machines
[03:49:00] <mshaver> anyway, i'll kvm to that other machine & fix my tree
[03:49:06] <cradek> was that a controller or mechanical limitation (or both?)
[03:49:31] <mshaver> yep, i knew a guy in milwaukee who made wood signs on one & used bmp2cnc
[03:49:33] <mshaver> controller
[03:49:36] <jepler> hm, looks like i2g isn't mentioned in the documentation
[03:49:50] <jepler> if you want to see it, fire up emc2.1 sim/axis and load torus.png which is in the sample files
[03:49:56] <mshaver> OK!
[03:50:29] <mshaver> in axis I really like being able to plot both relative & machine
[03:50:55] <mshaver> the other backplots didn't have the machine coords option
[03:51:06] <mshaver> I don't think...
[03:52:03] <jepler> here's a screenshot if you can't run emc right now: http://emergent.unpy.net/index.cgi-files/sandbox/i2g-emc2.1.png
[03:52:57] <jepler> it will mill the rows first, then mill the columns where the torus is steep
[03:53:26] <jepler> the generated file in the preview is just under 2000 lines of g-code
[03:56:22] <jepler> 'night all
[03:56:25] <jepler> mshaver: nice to "see" you
[03:56:26] <jmkasunich> goodnight jeff
[03:56:55] <a-l-p-h-a> later
[03:57:18] <jepler> hm, someone should fix it so that File > Properties isn't greyed out just because the program is running
[03:57:33] <jepler> I wonder if it's File > Quit that's supposed to be disabled
[03:57:41] <cradek> bet so
[03:57:48] <cradek> I'll try to fix it
[03:57:58] <jepler> great, thanks
[04:00:33] <a-l-p-h-a> aaaaaaaaaaaaaahhhhhhhhhh... American Chopper/Orange County Choppers, what a bunch of red necks.
[04:00:37] <a-l-p-h-a> "do people eat sheep?"
[04:01:07] <CIA-6> 03cradek 07TRUNK * 10emc2/share/axis/tcl/axis.tcl: running program should grey out quit, not properties
[04:01:54] <CIA-6> 03cradek 07v2_1_branch * 10emc2/share/axis/tcl/axis.tcl: running program should grey out quit, not properties
[04:02:34] <mshaver> hey, when I do a cvs up, I don't get the sai dir
[04:02:36] <cradek> grr, making a release is a sure way to start finding bugs
[04:02:43] <cradek> mshaver: cvs up -dP
[04:03:02] <mshaver> riiiiiight... now I remember
[04:03:06] <cradek> put "update -dP" in ~/.cvsrc
[04:03:15] <cradek> maybe also "cvs -z5"
[04:03:24] <cradek> I also like diff -u
[04:03:43] <mshaver> oh, I always do the whole cvs command from the wiki
[04:03:57] <cradek> you should be able to do just "cvs up"
[04:04:14] <mshaver> I'll have to read the book again ;)
[04:04:13] <cradek> it remembers everything else, and adds arguments from .cvsrc
[04:04:48] <mshaver> OK, I'll try it, THANKS for all the help!
[04:05:06] <cradek> no problem at all - I'm anxious to hear about radius comp when you're done there
[04:05:55] <mshaver> I'll let you know!
[04:06:02] <mshaver> night
[04:06:16] <cradek> ok, goodnight
[04:06:42] <cradek> it's nice to have him back on the team - it's been a while
[04:11:16] <cradek> well I should take a hint and go to bed too - goodnight all
[04:15:05] <steve_stallings> steve_stallings is now known as steves_logging
[05:53:19] <K`zan> Night all
[06:01:13] <Jymmmmmm> Eons ago, I used a microscope that had (no kidding) an adding machine connected to it somehow to use as a thickness gauge. Do you think something like that (in proncipal) is possible using something like an IR mouse?
[06:25:35] <Jymmmmmm> http://cp.literature.agilent.com/litweb/pdf/5988-9774EN.pdf
[08:28:46] <Jymmmmm> yoyo
[08:30:11] <lerman_> lerman_ is now known as lerman
[08:48:33] <Jymmmmm> the lights are on, but nobody's home
[08:58:19] <lerman_> lerman_ is now known as lerman
[09:37:20] <lerman_> lerman_ is now known as lerman
[09:40:31] <alex_joni> Jymmmmm: lights? where?
[09:40:34] <alex_joni> people are trying to sleep here
[10:06:25] <Jymmmmm> sleep when your dead
[10:17:54] <fabiotv> hello
[10:21:53] <fabiotv> I am trying to install Pci-parallel port
[10:26:20] <fabiotv> if type "lspci -v" in the terminal write:0000:00:0b.0 Parallel controller: Timedia Technology Co Ltd: Unknown device 7268 (rev 01) (prog-if 02 [ECP]) Subsystem: Timedia Technology Co Ltd: Unknown device 0103 Flags: stepping, medium devsel, IRQ 5 I/O ports at e000 [size=8] I/O ports at e400 [size=8]
[10:26:41] <alex_joni> fabiotv: hi
[10:27:03] <alex_joni> fabiotv: http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?NetMos
[10:27:08] <alex_joni> try looking at that
[10:27:26] <fabiotv> ok
[10:31:46] <jlmjvm> alex:good morning
[10:35:27] <fabiotv> I'am write in the .hal file: loadrt hal_parport cfg="0xe00" but it does not work
[10:36:30] <fabiotv> My pci card is not netmos
[10:41:13] <alex_joni> fabiotv: I saw that
[10:41:14] <alex_joni> try e400
[10:41:35] <alex_joni> jlmjvm: hi
[10:43:00] <jlmjvm> alex:do you know anything about the pci card on jeplers web site
[10:43:30] <jlmjvm> http://futurlec.com/ComputerBoards.shtml
[10:45:34] <alex_joni> jlmjvm: the 8255 card?
[10:45:55] <jlmjvm> alex:yes
[10:46:29] <fabiotv> alex_joni: not work
[10:46:40] <alex_joni> jlmjvm: I know he has one, I know he started working on a driver
[10:46:54] <alex_joni> which partly works, and that tomp used it with success
[10:47:08] <alex_joni> I know jepler plans to spend some time (some day) to check it further for errors & such
[10:47:27] <alex_joni> fabiotv: can you pastebin.ca the whole output from lspci -vv ?
[10:47:44] <jlmjvm> alex:k,was wondering if it would work,the price is great
[10:51:10] <fabiotv> alex_joni: http://pastebin.ca/374188
[11:15:53] <alex_joni> fabiotv: hang on a bit, kinda busy atm
[11:23:00] <fabiotv> what I can make?
[11:25:46] <biglibigli> i want to access the emc by serial port not parallel,how can i do it?(emc send and receive information on servo and encoder via rs232)
[11:29:43] <biglibigli> why room is silent ?
[11:33:44] <biglibigli> alex_joni: are you there?
[11:38:57] <biglibigli> is anyone in this room?
[11:43:44] <biglibigli> i want to access the emc by serial port not parallel,how can i do it?(emc send and receive information on servo and encoder via rs232)
[11:44:30] <biglibigli> alex_joni: are u there?
[11:45:05] <biglibigli> no answer?
[11:46:57] <biglibigli> helo
[11:47:02] <biglibigli> what is wrong?
[11:48:57] <biglibigli> anyone there?
[11:55:02] <alex_joni> fabiotv: back now
[11:55:07] <alex_joni> so.. what's teh problem?
[11:55:19] <alex_joni> emc2 starts up, but there are no signals on the parport?
[12:04:37] <fabiotv> Yes, there are no signals on the parport!
[12:05:43] <fabiotv> all off
[12:06:12] <alex_joni> fabiotv: where you ever able to get some signals from it?
[12:09:21] <alex_joni> fabiotv: sorry, I really have no idea how to debug / what to do
[12:13:41] <alex_joni> fabiotv: maybe you want to try "halcmd loadrt probe_parport" before the loadrt hal_parport in your hal file
[12:19:05] <alex_joni> biglibigli: sorry, was busy then
[12:19:06] <alex_joni> what is the question?
[12:19:12] <biglibigli> i don't afford to buy a hardware buy hardware , i want to control my system via parallel or serial port, servo system.
[12:19:32] <alex_joni> you can control servo by parallel port
[12:19:44] <alex_joni> but it will be limited in speed
[12:20:01] <biglibigli> but i can write a driver hardware using microcontroller
[12:21:06] <alex_joni> biglibigli: then you need to :
[12:21:13] <alex_joni> 1. decide on a protocol
[12:21:18] <alex_joni> 2. implement it on the microcontroller
[12:21:24] <alex_joni> 3. implement it in some parts of emc
[12:21:40] <alex_joni> 0. decide on the interface (serial or parallel)
[12:21:48] <biglibigli> in config file of etch the x_dir is linked to two pin of parallel port, why is the reason?
[12:22:29] <biglibigli> etch-servo
[12:22:51] <alex_joni> etch-servo uses PWM output on pins 2,3,4&5
[12:23:05] <alex_joni> it only controls 2 motors
[12:23:11] <biglibigli> why two?
[12:23:21] <alex_joni> encoders are read back using parport 10,11,12,13
[12:23:34] <alex_joni> biglibigli: because an etch-a-sketch only has 2 possible movements
[12:24:06] <biglibigli> check it again line 69-70 pin 2,4
[12:24:21] <alex_joni> biglibigli: http://emergent.unpy.net/projects/01142347802
[12:25:22] <alex_joni> I think jepler used the 2 other pins for the enable on the L298
[12:26:03] <alex_joni> err.. no
[12:26:24] <alex_joni> he used one for forward, the same one inverted (for backward), and one for speed control (PWM)
[12:26:47] <alex_joni> the inversion could have been done with external gate, but I guess he had enough parport pins, and in software it's easier
[12:27:26] <biglibigli> can i change this file to enable 3 movement?
[12:28:10] <alex_joni> I suspect there won't be enough pins to read back 3 encoders
[12:29:06] <alex_joni> there are only 5 input pins on a parport
[12:29:06] <biglibigli> i think there is
[12:29:15] <alex_joni> you need 6 for 3 encoders
[12:30:14] <alex_joni> if you are lucky you can enable the "x" mode.. where the extra 4 control pins are open collector, so you can drive them low from outside
[12:30:26] <alex_joni> but it depends on the parport your computer has
[12:31:04] <alex_joni> biglibigli: the other possibility is to use a second parport, or a computer with 2 ports (but that's also with some risks)
[12:31:29] <biglibigli> why?
[12:32:00] <jlmjvm> why so
[12:32:11] <alex_joni> fabiotv is just trying to start a second parport, and it's not working
[12:32:35] <alex_joni> depends on the card, manufacturer, model, etc
[12:32:48] <jlmjvm> was wondering about risks of a second paraport
[12:32:57] <biglibigli> ok
[12:33:16] <alex_joni> jlmjvm: I have one that works.. (with 2 parports on it)
[12:33:33] <alex_joni> but it might have been luck, I can't appreciate if so
[12:33:51] <biglibigli> alex_joni: ok on the 5 step you told me
[12:34:31] <biglibigli> implement in some part of emc, where can i start?
[12:34:43] <biglibigli> i have a good idea
[12:35:19] <biglibigli> for the protocol
[12:35:40] <alex_joni> biglibigli: what do you want to send?
[12:35:46] <alex_joni> position information?
[12:35:51] <alex_joni> movement commands?
[12:36:01] <alex_joni> what do you want to read back?
[12:36:02] <alex_joni> etc..
[12:36:46] <biglibigli> send position information /pwm information/ receive encoder information etc
[12:38:07] <biglibigli> the serial port can do it for me, with a simple protocol.
[12:39:53] <alex_joni> biglibigli: then you need a HAL component, which exports the appropriate pins (for position, encoder feedback, etc), and talks serial on the other side to the micro
[12:40:12] <alex_joni> it's not a simple thing to do btw
[12:42:39] <biglibigli> ok, another easy way: i can increase port's pin number using several shift-register and a shift-clock
[12:43:08] <alex_joni> biglibigli: yes, but also at the expense of speed
[12:43:16] <alex_joni> what motors do you have?
[12:43:35] <alex_joni> why not use steppers? (they are cheaper, simpler to drive)
[12:43:38] <biglibigli> now my system is working on stepper fine
[12:43:48] <biglibigli> but stepper is expensive
[12:43:56] <biglibigli> i want to change to the servo
[12:44:11] <alex_joni> servo is way more expensive then stepper
[12:44:27] <alex_joni> motors are usually twice the price, and the drives are the same
[12:45:38] <biglibigli> because the stepper may lost it's position i must to use a stepper several times more powerfull
[12:46:00] <alex_joni> do you know how much a stepper costs?
[12:46:16] <alex_joni> and how much a DC servo costs? (I suspect you don't want AC servo)
[12:46:46] <biglibigli> i buy stepper 5$ but a more powerfull if 50$
[12:46:56] <alex_joni> right.. how about servo?
[12:47:42] <alex_joni> then ones I saw (cheap ones) were all > 100$
[12:47:44] <biglibigli> a powerfull servo dc 10$
[12:48:55] <biglibigli> what is the frequency required in pwm?
[12:52:06] <alex_joni> usually that depends on the drive / motor combination
[12:52:11] <biglibigli> alex_joni thanx for your help, a forum is essential for emc, i have to go
[12:52:17] <alex_joni> people use >20-25kHz because of noise issues
[12:52:25] <alex_joni> bye
[12:52:31] <biglibigli> bye
[12:53:24] <jlmjvm> alex; do you know anyone that has used the new hybrid steppers
[12:56:00] <jlmjvm> http://www.homeshopcnc.com/page6.html
[13:11:33] <alex_joni> 4.8 LBS ??
[13:11:35] <alex_joni> quite big are those
[13:18:48] <jlmjvm> thats the small ones,they go up to 12.5 lbs
[13:20:30] <alex_joni> jlmjvm: no, never tried/seen those :)
[13:20:51] <alex_joni> morning samco
[13:20:59] <skunkworks> morning alex
[13:21:05] <alex_joni> guess no SCARA for me :(
[13:21:15] <skunkworks> out bid?
[13:21:21] <alex_joni> http://www.goindustry.com/en/equipmentdetails.asp?sOfferID=1073923
[13:21:24] <alex_joni> that was a crappy auction
[13:21:35] <alex_joni> the time expired, but they didn't reach a certain price
[13:21:43] <alex_joni> so they kep extending the time by 10 minutes
[13:21:48] <alex_joni> until the bid was high enough
[13:21:55] <alex_joni> but then the seller withdrew his item
[13:22:10] <jlmjvm> bummer
[13:22:14] <skunkworks> yeck. I hate auctions like that.
[13:22:22] <alex_joni> yeah, me too
[13:22:30] <skunkworks> been waiting for ebay to do something like that.
[13:23:03] <alex_joni> hope they won't
[13:25:15] <jlmjvm> alex:what do you think about those motors
[13:25:51] <alex_joni> they sure sound nice
[13:26:00] <jepler> good morning
[13:26:07] <alex_joni> those and some G203V's.. yummy
[13:26:08] <alex_joni> hi jeff
[13:26:22] <alex_joni> biglibigli was asking about your etch-servo :P
[13:26:36] <jepler> I saw some of the scrollback, but not that far
[13:26:36] <jlmjvm> i have 201,s already
[13:28:21] <alex_joni> jlmjvm: those should work too :)
[13:31:38] <jlmjvm> my x and y are ok,but my z wont accelerate as quickly,only half as much
[13:31:55] <jlmjvm> still have original bridgeport steppers
[13:31:57] <alex_joni> jlmjvm: is it heavy?
[13:32:13] <alex_joni> the Z I mean
[13:34:58] <jlmjvm> i think its just wore out,actually has bout a 1/4 inch up and down play on the pulley
[13:35:05] <alex_joni> ouch
[13:37:13] <jlmjvm> thought i would try 1 of the new motors for the z axis and see how it works
[13:39:06] <jlmjvm> i just wonder what kind of rpm i can get out of it,they dont list rpm for stepper motors
[13:46:32] <skunkworks> you need to look at the torquevsrpm graphs to see if they will do what you want
[13:47:49] <jlmjvm> where is that
[13:48:35] <skunkworks> stepper manufacturer's specs
[13:50:14] <xemet> hi
[13:51:22] <xemet> tried to connect using the jave client this morning, in Ubuntu, with mozilla...but no success, the applet starts and remain on "connecting..."
[13:51:30] <xemet> any suggestion?
[13:51:50] <alex_joni> xemet: what kind of java client?
[13:52:00] <xemet> the one in the website linuxcnc.org
[13:52:12] <skunkworks> * skunkworks is using that right now
[13:52:30] <xemet> I'm using that...right now, but on windows
[13:52:51] <skunkworks> same here :)
[13:53:05] <jlmjvm> im in ubuntu
[13:53:50] <skunkworks> don't you have to download java for ubuntu? <-reletive linux newbie
[13:54:05] <xemet> I've downloaded and installed the java runtime plugin
[13:54:43] <xemet> at the beginning the java runtime was not installed and firefox said plugin needed to show this content
[13:54:55] <jlmjvm> newbie here also,could not install java plugin,had to install x-chat
[13:55:35] <jepler> xemet: on ubuntu, install a real irc client such as x-chat (GUI) or irssi (terminal) instead
[13:55:39] <jlmjvm> its in the ubuntu add ons
[13:55:47] <xemet> so I downloaded the plugin, now the applet starts correctly, the java is correctly installed and working, the applet remains on "connecting..."
[13:55:55] <xemet> jepler: I've tried gaim
[13:56:13] <xemet> but I've to add a irc account...he asks for username and password
[13:56:34] <skunkworks> I normally use gaim when I am on ubuntu as it was installed by default.
[13:56:36] <xemet> so I choose xemet for username
[13:56:45] <xemet> but...password??
[13:56:48] <jepler> I don't know a thing about gaim
[13:57:30] <skunkworks> you don't need a password - you just need to add an irc channel.
[13:57:31] <jlmjvm> gaim is an instant messenger
[13:57:42] <xemet> ok I will try
[13:57:51] <alex_joni> jlmjvm: yeah, but it has IRC under supported protocols
[13:57:54] <jepler> it's possible that gaim will try to automatically register your nick .. http://freenode.net/faq.shtml#userregistration
[13:58:00] <jepler> if you put a password
[13:58:13] <alex_joni> xemet: make sure you select IRC as the protocol, not yahoo or some other IM
[13:58:14] <xemet> there is a field for server: with irc.freenode.net default
[13:58:21] <xemet> I'm sure...
[13:58:31] <xemet> I selected IRC in gaim for creating an account
[13:59:26] <alex_joni> did you try without password?
[13:59:41] <jlmjvm> when i use gaim its for my yahoo messenger,thats the user name and password i have to enter
[14:00:03] <xemet> alex: I tried without password
[14:00:07] <skunkworks> then on the main screen - you select the newly created account from the drop down menu then click ok.
[14:00:19] <skunkworks> or connect. whatever the button is
[14:00:21] <xemet> jlmjvm: I used gaim with yahoo, messenger and other and it works...
[14:01:00] <jlmjvm> ive never used it for irc before
[14:01:01] <skunkworks> it connects you to the freenode.net - then from there you can type in /join #emc
[14:01:43] <pier> here I am
[14:01:47] <xemet> skunkworks: tried...but when I clicked on connect...it remains blocked...
[14:01:54] <pier> thanks skunkworks
[14:02:07] <xemet> I will retry
[14:02:24] <pier> xemet: una volta creato il collegamento irc a freenode fa come dice skunkworks
[14:02:36] <biglibigli> hi jepler
[14:02:41] <xemet> pier sei italiano?
[14:02:49] <pier_gaim> si
[14:02:52] <xemet> wow
[14:03:01] <xemet> un'altro italiano
[14:03:04] <pier_gaim> sono sul tuo msn
[14:03:03] <xemet> miracolo
[14:03:09] <biglibigli> hi jeple1
[14:03:15] <jepler> xemet: yes, it looks like the password you specify in gaim for an IRC network is the password you used in user registration .. leave it blank if you don't want to do user registration
[14:03:18] <xemet> ah...si ma io msn lo apro tipo una voltaogni anno
[14:03:21] <jepler> biglibigli: hello
[14:03:33] <skunkworks> * skunkworks wishes he could read italian.. :)
[14:03:41] <jepler> skunkworks: he says your face is like the wrong end of a donkey
[14:03:48] <skunkworks> again?
[14:03:57] <biglibigli> jelper: in etch hal file you assign one pin twice
[14:04:05] <xemet> jepler: about the G5, would it be possible to specify a g-code with multiple parameters
[14:04:11] <biglibigli> line parallep pin 2 and 4 are the same
[14:04:14] <jepler> xemet: you mean, two p- values?
[14:04:19] <xemet> for example, if I want a G code to make a nurbs
[14:04:27] <xemet> with multiple control points
[14:04:34] <xemet> I would like a a code like this:
[14:04:40] <xemet> G5.start
[14:04:44] <xemet> X1 30 y1 40
[14:04:54] <xemet> x2 40 y2 50
[14:05:00] <xemet> x3 20 y3 40
[14:05:04] <xemet> ecc.
[14:05:08] <xemet> k = 3
[14:05:11] <xemet> g5.end
[14:05:35] <jepler> biglibigli: yes, and the same with pins 5 and 7
[14:05:37] <xemet> and the interpreter uses the parameters to create the G2 G3 arcs (biarc) to interpolate the curve
[14:06:13] <biglibigli> can i use this pins to control the third movement?
[14:07:03] <jepler> biglibigli: the value on pin 4 is the inverted version of the value on pin 2, because of the next line, setp parport.0.pin-04-out-invert TRUE
[14:07:09] <xemet> pier, sei su qualche forum? cnc italia, hobby cnc?
[14:07:44] <pier> cnc italia (ero)
[14:07:48] <jepler> biglibigli: these 3 pins (2, 3, and 4) are hooked to 3 pins of the L298
[14:08:11] <jepler> biglibigli: e.g., IN1, ENA, and IN2 respectively
[14:08:44] <jepler> biglibigli: it is possible to use a 2-pin control method instead, wiring ENA to VCC
[14:08:45] <alex_joni> jepler: I already tried to explain that you could have used only one and a hardware inverter (NOT-gate)
[14:08:58] <jepler> alex_joni: yes, that would have worked too
[14:09:23] <alex_joni> jepler: but given that he wants 3 servo-axes on the parport I suspect the problem will be with the input pins
[14:09:28] <xemet> is that a H-bridge for PWM control?
[14:09:36] <alex_joni> 5 available input pins aren't enough for 3 encoders
[14:09:58] <alex_joni> unless the parport works in "x" mode..
[14:10:13] <jepler> xemet: you could assign code G5.2 "begin nurbs curve" and G5.3 "finish nurbs curve"
[14:10:26] <alex_joni> jepler: how probable is that the parport works that way? (from your experience) ?
[14:10:27] <jepler> xemet: then the code would be something like G5.2 X30 Y40 / X20 Y50 / G5.3 X20 Y40
[14:10:41] <xemet> yes
[14:10:50] <alex_joni> xemet: the L298 is a dual H-bridge, using PWM (generated by emc2) you can control a DC motor with it
[14:10:51] <jepler> alex_joni: out of the machines cradek and I tested, his two older machines worked in x-mode and my two newer machines didn't.
[14:10:58] <xemet> it should take variable number of control points
[14:11:26] <jepler> xemet: right, all the control points but the last are given by G5.2 lines, then the last control point is given by G5.3.
[14:11:24] <alex_joni> jepler: great, exactly the answer I was looking for :)
[14:11:32] <biglibigli> how can i test if my machine works?
[14:12:03] <jepler> biglibigli: the manual describes one way to test for x-mode support using a resistor, a voltmeter, and halcmd/halmeter
[14:12:25] <biglibigli> alex and jepeler who are you? developers of emc
[14:12:27] <xemet> alex: yes I've read about the H-bridges a lot in this week, I would like to try a small controller using EMC to generate PWM, the H bridge to control a DC motor with an encoder, and EMC to read the encoder
[14:12:47] <jepler> xemet: so 4 control points would be specified by 4 lines instead of 3: G5.2 X30 Y40 / X20 Y50 / X30 Y60 / G5.3 X20 Y40
[14:12:48] <skunkworks> xemet: it works :)
[14:12:57] <alex_joni> * alex_joni is alex
[14:13:08] <xemet> jepler: yes
[14:13:44] <xemet> jepler: in this way I could make a generic nurbs
[14:13:56] <jepler> xemet: For NURBS, is the endpoint the same as the final control point?
[14:14:02] <xemet> yes
[14:14:47] <xemet> and with a parameter k I could specify the degree of the curve
[14:14:48] <jepler> xemet: there are some error conditions to check for (e.g., G5.2 follwed by G1 instead of G5.2 or G5.3) but I don't see a fundamental reason why you couldn't do it this way.
[14:14:51] <biglibigli> is there any open protocol that works with servo in emc? i will build the micro controller driver but i can't change the code(because i am not expert in emc code)
[14:15:21] <xemet> ok, so it could be done.
[14:15:24] <jepler> xemet: is the degree different than the number of control points?
[14:15:33] <xemet> in the nurbs, yes
[14:15:43] <xemet> in the bezier they are dependant
[14:16:02] <Dallur> If I remember correctly NURBS is defined as: start/point&vector/poin&vector/end
[14:16:05] <jepler> xemet: then I'd say K is unneeded: It's implicit in the number of points given, you know when you reach G5.3 that it's the last control point
[14:16:49] <Dallur> so each "control point" is defined by two points in xyz space, one for the position and another for the vector
[14:17:02] <xemet> no...in the nurbs K is independent from the number of control points
[14:17:16] <jepler> xemet: oh
[14:17:21] <xemet> i could have a nurbs with 10 control points
[14:17:22] <xemet> and K=3
[14:17:32] <xemet> and control points have a weight
[14:17:35] <jepler> could you have 3 control points and K=10?
[14:18:19] <xemet> jepler: no
[14:18:52] <jepler> xemet: well, the fundamental idea of collecting a bunch of points with one code (G5.2) and collecting the final point and doing the move with another code (G5.3) seems to me to be possible
[14:18:55] <xemet> n>=k
[14:19:06] <jepler> xemet: since I don't know NURBS I don't know what data you need to collect
[14:19:25] <xemet> well, only control points, weight w for every control point and K
[14:21:29] <jepler> because IJK are used for the center of the circle (and for a control point in G5/G5.1 splines) I suggest picking a different letter for the order. L is used as an integer to specify repeats of a canned cycle.
[14:22:14] <alex_joni> biglibigli: the only protocol I know is the one jepler used for his parport fpga Pluto board, and the board Jon Elson is making
[14:22:52] <xemet> well. instead of K it could be...P? U? Q?
[14:23:05] <biglibigli> what is that? connect to parallel port?
[14:23:18] <alex_joni> biglibigli: those are 2 differenet protocols, both using parport
[14:23:25] <xemet> jepler: I don't know, I hope there is a free letter could be used instead of K
[14:23:26] <jepler> cradek: are there any other normally-integer parameters besides L-?
[14:23:35] <skunkworks> It wouldn't be called epp protocal?
[14:23:56] <alex_joni> skunkworks: EPP is the transfer mode
[14:24:00] <jepler> xemet: you could use L-, it's normally used as an integer to signify a count
[14:24:02] <biglibigli> where can i find?
[14:24:06] <alex_joni> the data you send is defined by a protocol
[14:24:11] <alex_joni> biglibigli: sources
[14:24:15] <xemet> jepler: ok
[14:24:33] <biglibigli> www document?
[14:24:34] <jepler> xemet: will the weight typically differ for each item?
[14:24:35] <Dallur> xemet: if you are serious about implementing splines there is some material on the web regarding how the commercial controllers did it,
[14:24:47] <Dallur> xemet: with G5.3
[14:25:06] <alex_joni> biglibigli: http://cvs.linuxcnc.org/cgi-bin/cvsweb.cgi/emc2/src/hal/drivers/pluto_servo.comp?rev=1.9.2.2;content-type=text%2Fplain
[14:25:09] <alex_joni> * alex_joni runs home
[14:25:12] <xemet> the weight W typically differs for each control points
[14:25:27] <xemet> the weight vary the way the control point "attract" the curve
[14:25:37] <jepler> xemet: weight > 0?
[14:25:59] <xemet> jepler: I think yes...but I should verify
[14:26:53] <jepler> xemet: you could use any of P- Q- R-
[14:26:53] <jepler> for weight
[14:27:34] <xemet> Dallur: I've read a lot of paper regarding on how commercial controllers has done it. it would be great to implement something similar in emc
[14:27:40] <biglibigli> jepler do u have on-line document for pluto_servo
[14:28:02] <jepler> biglibigli: yes, it is part of the emc documentation http://linuxcnc.org/docs/2.1/
[14:28:11] <jepler> biglibigli: it's in the html section
[14:28:14] <Dallur> xemet: I have been thinking the same thing but unfortunately I don't have the C skills for it nor the time
[14:28:19] <xemet> jepler: so I could use P- and have a different value of P- for every control point?
[14:28:44] <jepler> xemet: you would have to specify a P- on each G5.2 and G5.3 line
[14:28:46] <Dallur> xemet: converting splines to line segments just feels all wrong to me :P
[14:29:05] <xemet> Dallur: I don't have the C skills...but I think that with the time it could be done
[14:29:18] <xemet> Dallue: nurbs will be converted in arcs
[14:30:01] <jepler> xemet: next you would need to decide whether to make on canon call for each G5.2 and G5.3 line, leaving it to the lower-level code to assemble the points into an array or list, or whether to gather them up and pass them in a single canon call as an array/pointer
[14:30:17] <jepler> time for a cup of coffee and then my real job
[14:30:17] <jepler> bbl
[14:31:39] <xemet> jepler: thank you. At this moment it is only a basic idea, I will think on that in the next days
[14:44:05] <xemet> ciao fabio
[14:48:14] <fabiotv> ciao, come va?
[14:49:28] <xemet> bene,
[14:49:34] <xemet> riguardo ai due assi
[14:49:50] <xemet> siamo arrivati alla conclusione che non è possibile...
[14:49:59] <xemet> bisogna per forza usare xyza
[14:50:26] <xemet> anche se y e z non vengono utilizzati
[14:50:59] <fabiotv> ok, va bene comunque
[14:51:42] <fabiotv> però, strano!
[14:51:49] <xemet> anche se probabilmente nelle prossime versioni di EMC2 ci saranno delle modifiche per permettere un assegnazione degli assi più flessibile
[14:52:21] <xemet> cosa di cui si è iniziato a parlare in questa pagina:
[14:52:24] <xemet> http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?IniChanges
[14:53:35] <fabiotv> colpa mia?!?
[14:53:42] <xemet> :) si
[14:55:46] <fabiotv> bene, adesso mi assumo altre colpe!
[14:57:00] <fabiotv> sarebbe bello fare un gcode che attenda un inpulso esterno
[14:57:51] <fabiotv> scusa impulso
[14:58:47] <xemet> non c'è qualcosa tipo probe? aspetta
[14:59:38] <xemet> no...non puoi controllare uno switch con g code
[15:00:01] <xemet> ma perchè ti serve nel gcode?
[15:01:05] <xemet> per curiosità, ma cosa deve fare questa macchina?
[15:01:56] <fabiotv> se metti due macchine a lavorare in linea, si devono comunicare
[15:02:10] <fabiotv> tra di loro, ok
[15:02:46] <fabiotv> devo caricare dei pezzi di alluminio in un' altra macchina
[15:03:52] <xemet> ok...ma allora, non serve a nulla l'interfaccia grafica...o sbaglio?
[15:04:32] <fabiotv> si, non serve a niente
[15:04:35] <xemet> paradossalmente per questo non serve neanche EMC...
[15:04:41] <xemet> potresti farlo usando solo HAL
[15:04:53] <xemet> lanciando un file HAL da terminale
[15:05:29] <xemet> usando HAL come un PLC
[15:05:52] <fabiotv> anche, si
[15:06:05] <xemet> ma a questo punto avresti un intero computer che fa solo da PLC...conviene?
[15:06:12] <xemet> oppure conviene montare direttamente un PLC?
[15:07:10] <fabiotv> plc o pc la differenza è poca
[15:07:22] <xemet> in effetti solo una lettera :)
[15:07:48] <fabiotv> un plc costa 200Euro
[15:07:51] <xemet> a parte gli scherzi...il PC è un po' più grosso...e avrebbe la possibilità di fare cose ben più complesse di un PLC
[15:08:18] <fabiotv> meglio pc
[15:08:21] <xemet> diciamo che sarebbe un poì sovradimensionato per il compito da svolgere
[15:08:37] <xemet> comunque, si credo che si possa fare abbastanza facilmente solo con hal
[15:08:56] <xemet> con lo stepgen che genera i segnali step e dir per i motori pp
[15:09:26] <xemet> il driver hal_parport che legge e manda i segnali attraverso la parallela
[15:09:57] <xemet> e un componente (credo molto semplice) che legga gli switch e dica a stepgen cosa fare e per quanto tempo farlo in modo da far muovere i motori come vuoi tu
[15:10:57] <fabiotv> per caricare il gcode come fai? x non è sempre uguale cambia da pezzo a pezzo
[15:11:19] <xemet> aspetta. Qui stiamo parlando di qualcosa che funziona senza G code
[15:11:45] <fabiotv> avevo il dubbio!
[15:11:52] <xemet> tu vuoi che il comportamento alla pressione degli switch sia diverso a seconda quale pezzo si deve caricare?
[15:12:16] <fabiotv> si
[15:12:39] <xemet> ok...e quale pezzo stai caricando non può essere determinato da un altro switch?
[15:13:01] <xemet> pezzo A, switch A chiuso, pezzo B switch B chiuso ecc.
[15:13:14] <fabiotv> si
[15:13:38] <xemet> oppure...è una sequenza precisa che si ripete sempre uguale?
[15:13:39] <xemet> per esempio
[15:13:50] <xemet> prima il pezzo A, poi il pezzo B, poi C e così via?
[15:15:36] <fabiotv> no, se sw A è chiuso e B chiuso, muove solo X se A è chiuso e B aperto muove X e A di 180°
[15:16:13] <xemet> cioè c'è un comportamento univoco a seconda di come sono gli switch
[15:16:38] <fabiotv> esatto
[15:17:02] <xemet> oppure se A è chiuso e B è chiuso si muove solo X ma il valore di quanto deve muoversi è determinato dal pezzo che deve caricare?
[15:18:22] <fabiotv> è fisso impostato sul gcode
[15:19:04] <xemet> X è fisso?
[15:19:35] <xemet> se lo dobbiamo fare senza G code...
[15:20:02] <xemet> serve che ciò che la macchina deve fare sia in modo inequivocabile determinato da come sono posizionati gli switch
[15:20:17] <fabiotv> la serie di pezzi sono tutti uguali, la macchina li deve solo spostare e girare se serve
[15:21:04] <xemet> per esempio la procedura potrebbe essere:
[15:21:20] <xemet> se sw A è chiuso e B chiuso, muovi X di 20
[15:21:34] <xemet> se A è chiuso e B aperto muove X e A di 180°
[15:21:46] <xemet> sempre uguale
[15:22:07] <fabiotv> se A è chiuso e B aperto muove X di 20 e A di 180°
[15:22:21] <xemet> ok
[15:22:28] <xemet> sempre uguale quindi
[15:22:34] <fabiotv> si
[15:22:40] <xemet> si può fare con HAL senza nessun Gcode
[15:23:10] <xemet> caricando un solo file da terminale con halrun
[15:23:43] <fabiotv> ti faccio una domanda?
[15:23:57] <xemet> e se è necessario impostare delle modifiche dimensionali, per esempio X non si deve più muovere di 20 ma di 30, è possibile farlo modificando il file HAL facilmente.
[15:24:21] <xemet> oppure sarebbe possibile magari anche impostare n file .ini con le caratteristiche dimensionali
[15:24:32] <xemet> fammi tutte le domande che vuoi
[15:25:38] <fabiotv> come fai a far comunicare delle macchine tra di loro, e se devi attivare delle morse "clamp"
[15:26:16] <xemet> hai un PC con la parallela e degli switch
[15:26:25] <xemet> le macchina potrebbero comunicare con gli switch...
[15:26:47] <xemet> cioè, la parallela non sa se uno switch è su una macchina o sull'altra
[15:27:23] <xemet> se metti uno switch nella macchina A questo manda un segnale alla parallela, il PC elabora e manda un segnale alla macchina B...ed ecco che le due macchine hanno comunicato
[15:27:56] <xemet> puoi avere anche 2 3 parallele sullo stesso pc se hai bisogno di molti pin
[15:28:12] <fabiotv> a livello di programmazione?
[15:28:12] <xemet> e le 3 parallele possono essere gestite in contemporanea da HAL
[15:28:37] <xemet> al livello di programmazione del componente HAL che ti serve...tu vedi solo pin in ingresso e pin in uscita
[15:29:09] <xemet> un componente hal ha pin ingresso e pin uscita e funzioni che elaborano ciò che entra per determinare ciò che esce
[15:30:23] <fabiotv> condivido
[15:30:54] <xemet> vuoi sapere come fare in pratica?
[15:31:00] <fabiotv> si
[15:31:14] <fabiotv> aspetta
[15:31:41] <xemet> beh non è immediato...
[15:31:57] <xemet> ti posso dire di leggere attentamente la sezione tutorial di questo manuale:
[15:31:59] <xemet> http://linuxcnc.org/docs/HAL_Documentation.pdf
[15:32:17] <xemet> nonchè alla fine quella che tratta di "comp"
[15:32:46] <xemet> e poi serve un poì di C...ma nulla di eccezionale, basta seapere un po' come lavorare con le condizioni if...
[15:33:02] <xemet> sono al telefono
[15:35:55] <fabiotv> quello che ti voglio dire è che generalmente nelle macchine utensili ci sono dei Mcode che attivano o aspettano di essere attivati senza andare nel hal file........
[15:37:04] <xemet> dovrebbe esserci la possibilità di aggiungere codici M su EMC
[15:37:08] <fabiotv> questo perchè non tutti sono programmatori, e con Mcode anche uno in tuta blu lo può fare
[15:37:11] <xemet> le macro
[15:37:37] <xemet> io non so come fare, ma credo che in qualche modo bisogna sempre programmare qualcosa
[15:39:18] <fabiotv> è interessante da proporre ?
[15:39:47] <fabiotv> non credi?
[15:40:00] <xemet> certo
[15:42:23] <fabiotv> c'è M101-M199 che non ho capito come funzioni se si possono modificare
[15:42:58] <xemet> si ho letto una volta...neanche io ho capito come si modificano...
[15:43:21] <xemet> http://axis.unpy.net/files//gcode.html
[15:43:36] <xemet> M1012026M199 P- Q- User-defined M-codes
[15:44:01] <xemet> Se sono user-defined, dovrebbe esserci un modo semplice di farle definire all'utente
[15:44:07] <xemet> chiederò
[15:45:08] <xemet> ora scusa ma devo andare a disegnare
[15:46:52] <fabiotv> ok, ciao buon disegno
[15:54:44] <pier> I would be very grateful if anyone with C knowledge would give me a hint with this... http://www.pastebin.ca/374322
[16:00:27] <cradek> is stepz an unsigned int?
[16:00:36] <pier> cradek: yes
[16:00:40] <cradek> if you compile with -Wall do you get any warnings?
[16:00:51] <jepler> http://www.pastebin.ca/374411 beahves like I expect
[16:01:17] <jepler> gcc -O -Wall pier.c && echo "freq 1234 12 1234 12345 2 15" | ./a.out
[16:01:17] <jepler> result=6freq=1234stepx=12stepy=1234stepa=12345stepz=2dir=15
[16:01:23] <cradek> I think the error is not in the part you pasted
[16:01:51] <jepler> I agree with cradek -- the first thing I suspected was that one of the variables is declared differently than the corresponding sscanf or printf specifier
[16:01:59] <pier> cradek: 1 sec
[16:02:10] <jepler> 'gcc -Wall' points out these kinds of errors
[16:02:25] <cradek> yes if it's types -Wall will tell you
[16:02:32] <pier> * pier pastebin the makefile
[16:02:57] <jepler> $ cat incorrect.c; gcc -O -Wall incorrect.c 2>&1 | grep warning
[16:02:57] <jepler> #include <stdio.h>
[16:02:57] <jepler> int main(void) { printf("%d\n", 3.14159); return 0;}
[16:02:57] <jepler> incorrect.c:2: warning: format '%d' expects type 'int', but argument 2 has type 'double'
[16:04:34] <pier> it complains about rt functions as always
[16:05:24] <cradek> maybe "line" is nuked before it gets to the sscanf
[16:05:45] <jepler> seems unlikely it'd always be nuked in the same way
[16:06:14] <pier> this is makefile http://www.pastebin.ca/374416
[16:06:33] <cradek> like we both said, add -Wall
[16:06:50] <pier> funny is that if I put example stepa on stepz position stepa is then null
[16:06:55] <pier> cradek: ok
[16:07:14] <pier> the last %u is nulled...
[16:11:00] <pier> http://www.pastebin.ca/374417 result of make with -Wall
[16:11:16] <jepler> fifo_app.c:79: warning: format '%d' expects type 'int *', but argument 8 has type 'unsigned char *'
[16:11:28] <jepler> this is the problem
[16:11:35] <pier> line 79?
[16:11:42] <pier> jepler: ok
[16:12:49] <jepler> you have to use the right sscanf specifier to match the type of the variable to be scanned into
[16:13:04] <jepler> you can change the type of the variable or the scanf specifier
[16:15:19] <pier> jepler: now I don't remember the unsigned char specifier... I'll look up the man
[16:27:25] <pier> jepler & cradek: thanks
[16:28:18] <pier> thought %u was good for unsigned char too
[16:38:35] <bigli2> jepler
[16:39:17] <bigli2> can an interface using serial port be usefull?
[17:03:09] <jepler> bigli: no existing driver in emc2 uses a serial communication method to control motors.
[17:03:47] <bigli> i want to know it could be usefull or not.
[17:04:41] <jepler> bigli: it wouldn't be useful to me, because I don't own and don't plan to buy such a motor controller
[17:05:29] <jepler> bigli: however, if someone develops such a driver it would be considered for inclusion in a future version of emc2, even if it is only useful for a small number of users
[17:08:06] <jepler> hi anders
[17:09:27] <awallin> hi jepler, what's up?
[17:11:28] <bigli> the driver is no problem , i can program micro-controller ,and if i receive pwm or etc.. detail from serial port i can generate those,
[17:12:48] <bigli> i can write a microcontroller driver for you on GPL
[17:14:10] <jepler> bigli: you would have to write the EMC HAL driver as well
[17:14:39] <bigli> i can't undrestand hal source :(
[17:15:08] <jepler> there are manpages for almost all hal functions in emc 2.1, and lots of examples in the source tree
[17:15:11] <jepler> learn by reading and doing
[17:16:03] <bigli> is it difficult? pc send a address code 8 bit then send/or receive a 8 bit data on serial
[17:17:50] <jepler> because HAL cannot use regular linux kernel drivers, you would have to program the 8250 or 16550 FIFO at the register level
[17:19:23] <jepler> why 8 bit data? That is not very much precision for reporting motor positions -- you could only report about +-128000 pulses per second if the servo rate is 1ms
[17:20:45] <bigli> send standard 8 bit of data
[17:21:25] <bigli> it could send pwm information like on/off/frequency
[17:21:32] <bigli> via rs232
[17:27:39] <jepler> emc controls motors by producing a commanded position every 1ms, and "closes the loop" by getting an actual position every 1ms. You should write your HAL driver so that it takes a commanded position (like stepgen) or a commanded velocity/pwm value (like pwmgen) and provides a position feedback (like stepgen or encoder)
[17:28:32] <jepler> exactly how it communicates with the hardware (e.g., serial) is unimportant to the rest of HAL
[17:30:05] <bigli> if can read/write from file is there any whay that pin information be store in a file (i read the file every 1ms and generate serial data) [hal is hard for me]
[17:30:23] <jepler> no.
[17:30:37] <jepler> reading and writing files is not possible from "real time" code, and the motor control must be real-time
[17:31:04] <bigli> on the phone...
[17:38:05] <jepler> even if you didn't know that file I/O is not available to "real time" code, a quick check would tell you that you can't meet a 1ms deadline to do something that might require reading from a disk. Even if the hard disk is on the right track and nothing else is competing to read or write, it could be up to 8.3ms on a 7200RPM drive before the desired data moves under the read head.
[17:38:36] <jepler> that's why real-time HAL components must exchange data through HAL pins, which are guaranteed to be in RAM
[17:41:07] <bigli> disk/or ram address
[17:42:49] <bigli> i wnat to be store in file (or ram) because i can write a kernel module/application that read from ram/disk and generate my result
[18:02:24] <bigli> jepler where can i find your main idea of pluto_servo
[18:23:34] <skunkworks> bigli: http://emergent.unpy.net/01166412010
[18:24:28] <lerneaen_hydra> 'lo
[18:24:46] <skunkworks> bigli: http://emergent.unpy.net/01164408418
[18:25:08] <skunkworks> http://emergent.unpy.net/01165081407
[18:25:39] <slundell> LH: hi
[18:25:46] <skunkworks> bigli: http://emergent.unpy.net/01165199941
[18:26:36] <skunkworks> jepler: your documentation link here http://emergent.unpy.net/01166994496 doesn't go anywhere
[18:29:17] <bigli> error "emc2/docs/src/hal/Attic/pluto_servo.html is not (any longer) pertinent"
[18:41:57] <skunkworks> bigli: http://emergent.unpy.net/files/sandbox/pluto_servo.html
[18:42:24] <skunkworks> that is the documentation that I remember
[18:42:57] <bigli> i don't need that, i need a document that i look at and then write my own driver for that
[18:52:36] <skunkworks> and the http://cvs.linuxcnc.org/cgi-bin/cvsweb.cgi/~checkout~/emc2/src/hal/drivers/pluto_servo.comp?rev=1.9.2.2;content-type=text%2Fplain doesn't work for you?
[18:53:16] <jepler> skunkworks: thanks, I'll correct that link
[18:54:15] <skunkworks> jepler: thanks :)
[18:54:37] <jepler> bigli: HAL pins are precisely the way that different components exchange values (such as motor positition) in RAM
[18:58:32] <bigli> jepler: all that i need is the pluto servo interface
[18:58:56] <bigli> read/write 32 bit data to parallel port
[18:59:26] <bigli> but why don't turn it to 5 axis and move i/o ?
[18:59:41] <bigli> *more io?
[19:01:47] <jepler> bigli: because of the maximum program size for the chip on the pluto board, and because of the number of I/O pins available on the headers
[19:02:33] <jepler> bigli: skunkworks gave you the URL for the pluto_servo HAL driver: http://cvs.linuxcnc.org/cgi-bin/cvsweb.cgi/~checkout~/emc2/src/hal/drivers/pluto_servo.comp?rev=1.9.2.2;content-type=text%2Fplain
[19:03:32] <jepler> bigli: on most systems, 4 bytes worth of EPP transaction can be performed by one call to inl() or outl(), as you see at the top of the functions read32() and write32().
[19:22:35] <bigli> i see.
[19:24:05] <bigli> if i want more i/o i must just change the \src\hal\drivers\pluto_servo.comp ?( i will use my own hardware driver)
[19:31:10] <jepler> unless your device is very similar to pluto_servo it's unlikely that the best way to write a driver for your hardware is to modify pluto_servo.comp until it works
[19:32:44] <jepler> bigli: you were talking about a serial connection with 8-bit commands and 8-bit responses, while pluto-servo is very different. It has an EPP connection, and works based on registers, rather than commands and responses.
[19:35:27] <anonimasu> does serial realtime stuff even work yet?
[19:37:45] <jepler> anonimasu: it does if you do the register-level programming yourself
[19:38:23] <jepler> anonimasu: there's not an rtapi serial driver, though, which is what I think you're asking
[19:38:38] <anonimasu> jepler: last time I saw there was talk about one..
[19:38:58] <anonimasu> jepler: if that is the case, why not use the paralell port instead?
[19:39:11] <anonimasu> jepler: dosent that negate the idea of using the serial port?
[19:40:48] <jepler> anonimasu: a small number of signals each of which is unidirectional is much easier to do isolation for
[19:41:09] <jepler> anonimasu: other than that there aren't a lot of things to recommend the serial port
[19:41:19] <cradek> I don't think jepler is the one advocating the use of the serial port...
[19:55:36] <pier> may I use Halscope to check the signal sent by a rt module?
[19:57:26] <jepler> you can show any HAL pin, parameter, or signal in halscope
[19:58:16] <pier> I mean to test a rt module from my code
[19:58:48] <pier> to check, say, if the frequency is right...
[19:59:57] <pier> does this code have to have caractheristics that make it apt to be cheched with halscope?
[20:00:04] <jepler> halscope won't show things that aren't HAL pins, parameters, or signals
[20:00:36] <pier> ok
[20:01:45] <pier> thanks jepler
[20:14:22] <a-l-p-h-a> cookie goes to the person to figure this out. "DCLXVI"
[20:16:10] <cradek> = 500 + 100 + 50 + 10 + 5 + 1
[20:16:19] <cradek> easy, not even any subtractions
[20:17:11] <a-l-p-h-a> common... it's 666... and the roman numerals use up all the standard characters but M.
[20:17:17] <a-l-p-h-a> MVCLXVI would be 6666
[20:17:35] <a-l-p-h-a> * a-l-p-h-a gives cradek half a cookie, and eats the other half.
[20:18:44] <a-l-p-h-a> hmm... I should start "givesacookie.com" and have it mail out cookies to people, for like $2.00 a cookie + postage.
[20:37:58] <skunkworks> Can you do threading without an index pulse? wasn't lerneaen_hydra doing that?
[20:38:06] <cradek> no
[20:38:26] <cradek> you don't need quadrature - you DO need index and some kind of pulse
[20:38:37] <skunkworks> was he doing it without quadurater... what you said
[20:38:43] <cradek> 'man counter'
[20:38:43] <skunkworks> thanks
[20:39:47] <cradek> for software counting of a unidirectional spindle, doing this can double your speed
[20:40:14] <a-l-p-h-a> man counter = a cougar at a college pub.
[20:40:25] <a-l-p-h-a> this is cool. http://www.modernfurniture.com/dining-room/accent-furniture/products.cfm?action=view&key=EFY126
[20:43:27] <lerneaen_hydra> skunkworks; I have an index pulse
[20:43:39] <lerneaen_hydra> I just don't have quadrature signal
[20:43:40] <a-l-p-h-a> http://www.modernfurniture.com/modern-decor/wine-racks/products.cfm?action=view&key=EFY125 <-- single unit... would be so easy to make.
[20:43:45] <lerneaen_hydra> just an index and a step signal
[20:56:11] <skunkworks> does this make sense?
[20:56:12] <skunkworks> http://pastebin.ca/374815
[20:59:59] <skunkworks> and would a 100ppr encoder work ok for threading?
[21:00:14] <lerneaen_hydra> mine is only 100 and seems to work fine
[21:00:28] <skunkworks> Cool. thanks
[21:00:39] <skunkworks> are you software counting the encoder?
[21:00:56] <lerneaen_hydra> yeah
[21:01:00] <lerneaen_hydra> everything in software for me
[21:01:18] <lerneaen_hydra> I can only thread at very low speeds though, as my steppers are quite slow
[21:01:29] <skunkworks> ah
[21:01:35] <cradek> lerneaen_hydra: where's your new movie?
[21:01:51] <lerneaen_hydra> so I tend to run at 50-150rpm, though I've dont some testing at higher speeds (and insanely low pitch)
[21:01:55] <lerneaen_hydra> cradek; err.
[21:02:12] <lerneaen_hydra> I haven't turned the lathe on in months
[21:02:17] <cradek> I can thread at 1000 rpm on mine
[21:02:18] <lerneaen_hydra> lots of stuff in school
[21:02:30] <cradek> (at 20tpi)
[21:02:39] <lerneaen_hydra> yeah, but you've got servos
[21:02:45] <cradek> yeah
[21:02:51] <lerneaen_hydra> I've got steppers and drives from the mid 1980's ;)
[21:04:03] <skunkworks> cradek: did that pastebin make some sense?
[21:05:57] <alex_joni> wonder if this wouldn't be a nice PSU for a stepper system
[21:05:58] <alex_joni> http://www.goindustry.com/en/equipmentdetails.asp?sOfferID=1075340
[21:06:57] <cradek> skunkworks: I didn't check the math, but yeah it looks fine
[21:07:13] <cradek> except for the spelling - want me to fix it?
[21:07:28] <skunkworks> I can spell check it - thanks ;)
[21:08:15] <jepler> alex_joni: I don't see any details on voltage or current, do you?
[21:08:23] <cradek> (I'm not sure that will help) "count and edge per period" -> one edge?
[21:08:25] <jepler> "A buyers premium of 17.5% is charged on this lot and is added to the final sale value."
[21:08:28] <jepler> and this warms my heart too
[21:08:46] <cradek> jepler: yikes
[21:09:13] <cradek> skunkworks: and "if you're ..." in two places
[21:09:43] <skunkworks> thanks cradek. It must be painful to read. :)
[21:09:57] <cradek> sorry, I never stop being an editor
[21:10:58] <cradek> thanks like always for answering these questions on those webbbses (I assume that's what you're doing anyway)
[21:11:31] <skunkworks> http://pastebin.ca/374847
[21:12:30] <cradek> much better :-)
[21:13:29] <skunkworks> lerneaen_hydra: are you harty?
[21:13:44] <anonimasu> cradek: yeah, he werent, but I were trying to throw out a point..
[21:13:44] <lerneaen_hydra> harty?
[21:13:56] <skunkworks> http://www.cnczone.com/forums/showthread.php?p=264468#post264468
[21:14:36] <lerneaen_hydra> no, that's not me
[21:15:09] <lerneaen_hydra> I would like to say my english is more developed and I have a rather different style of speech ;)
[21:15:18] <skunkworks> :)
[21:16:12] <alex_joni> jepler: 48VDC about 350W
[21:17:35] <alex_joni> jepler: plenty available though: http://www.goindustry.com/en/productlist.asp?Page=3&PageSize=100&ConvCurrency=17&SortColumn=OfferID&Sort=&OfferCompanyID=0&sBranchID=10035&Keyword=
[21:18:45] <lerneaen_hydra> bah, 'night all
[21:19:18] <anonimasu> night lh
[21:23:46] <jepler> 48V is too high for most stepper drivers besides gecko
[21:23:51] <jepler> too much for L298 and xylotex
[21:24:22] <anonimasu> :/
[21:26:25] <alex_joni> I think I'm running a L298 driver at 42 or so
[21:26:45] <cradek> I also run my mill at 42 or so
[21:28:10] <anonimasu> same as I do
[21:28:19] <alex_joni> max rating for the L298 is 50V
[21:28:22] <anonimasu> I need to find better rectifiers..
[21:28:31] <alex_joni> so 48V is really stretching the stuff
[21:29:11] <skunkworks> I use this exact power supply :) http://cgi.ebay.com/Variable-DC-Power-Supply-by-Micranta-22-123_W0QQitemZ320085341598QQihZ011QQcategoryZ58288QQrdZ1QQcmdZViewItem
[21:29:53] <alex_joni> 1A is a bit too tiny for my taste :)
[21:30:02] <alex_joni> been weldign 380A today :D
[21:30:07] <alex_joni> just for fun
[21:30:14] <a-l-p-h-a> what's the ration for A paper?
[21:30:16] <a-l-p-h-a> ratio
[21:30:17] <cradek> hahaha Micranta??
[21:31:06] <anonimasu> Dallur: are you awake?
[21:31:07] <cradek> oh, that's just their typo, I thought it was imitating radio shack (!)
[21:31:11] <a-l-p-h-a> hey, guys... how much should I sell a 3 axis gecko G201 w/power supply for?
[21:31:27] <cradek> $100, to me
[21:31:32] <a-l-p-h-a> cradek, seriously.
[21:31:42] <alex_joni> * alex_joni agrees
[21:31:52] <a-l-p-h-a> I'm thinking $700USD.
[21:31:53] <cradek> well, no idea seriously
[21:31:53] <jepler> alex_joni: A0paper 841 mm 1189 mm # The basic size in the A series
[21:31:53] <alex_joni> a-l-p-h-a: sell it for 100$ to cradek
[21:31:58] <jepler> alex_joni: Apaper 8.5 inch 11 inch
[21:32:00] <jepler> er
[21:32:01] <jepler> a-l-p-h-a: Apaper 8.5 inch 11 inch
[21:32:14] <a-l-p-h-a> jepler, that's US letter.
[21:32:30] <cradek> USAian architects do call that "A"
[21:32:31] <a-l-p-h-a> A4 isn't 8.5x11... it's something weird, and long.
[21:32:38] <jepler> A4paper 210 mm 297 mm
[21:32:39] <cradek> A4 is the standard metric size
[21:32:48] <a-l-p-h-a> oooooooooooh.
[21:32:53] <a-l-p-h-a> A = letter
[21:33:02] <a-l-p-h-a> D = standard plotter size isn't it?
[21:33:06] <a-l-p-h-a> E is that poster size.
[21:33:12] <jepler> a-l-p-h-a: more information on paper sizes, from "units.dat": http://pastebin.ca/374883
[21:33:11] <cradek> D is 24x36, pretty standard
[21:33:25] <cradek> E 36x48
[21:33:32] <a-l-p-h-a> oh man... hydraIRC is pissing me off.
[21:33:34] <a-l-p-h-a> I can't open links.
[21:33:40] <alex_joni> we call them A0, A1, A2, A3, A4, ...
[21:33:48] <alex_joni> each is half of the previous one
[21:33:57] <alex_joni> 2 x A4 = A3
[21:34:22] <jepler> "the long side is close to sqrt(2) times the length of the short" (for metric paper)
[21:35:30] <alex_joni> right
[21:35:40] <alex_joni> makes for a nice aspect ratio
[21:37:29] <alex_joni> except that most *-damned printers & drivers default to Letter instead of A4
[21:38:13] <jepler> alex_joni: I've seen the opposite on debian: I have to put "Letter" in /etc/papersize or all the applications are wrong
[21:38:28] <cradek> me too
[21:38:51] <alex_joni> haha.. guess we only see the 'wrong' side of the things
[21:40:30] <skunkworks> cradek: how many line encoder is on your lathe?
[21:40:46] <cradek> the spindle on both lathes is 1024
[21:40:54] <cradek> 1024/4096
[21:40:57] <skunkworks> are you dividing that?
[21:41:16] <cradek> I was, on the servo lathe pre-pluto
[21:41:30] <skunkworks> so what was emc actually seeing?
[21:41:33] <cradek> the nist lathe has never had a divider - I threaded at 400rpm (800rpm now with the counter module)
[21:42:10] <cradek> I think the divider was /16 so it was seeing 256/rev
[21:42:49] <cradek> 360, 400 or 512/rev seems like the useful ones
[21:43:09] <cradek> depends on your speed of course
[21:44:33] <skunkworks> The pluto makes it easy. after playing with it for a bit with the big servos to proof thing out - I think it is going to use it on one of the lathes
[21:44:54] <anonimasu> does it do 0-10v out?
[21:44:57] <anonimasu> or pwm?
[21:45:02] <skunkworks> pwm
[21:45:09] <anonimasu> neat
[21:49:39] <skunkworks> If I don't smoke it of course.
[21:50:59] <cradek> I know that feeling
[21:51:35] <alex_joni> cradek: thought in the end there was nothing wrong with yours?
[21:51:43] <cradek> nope
[21:51:51] <cradek> I have two now, both good
[21:52:02] <alex_joni> nice to have a spare
[21:52:10] <alex_joni> maybe you'll do the Max with servos one day
[21:52:12] <cradek> * cradek struggles to remember why he bought the mesa stuff
[21:52:26] <cradek> alex_joni: yeah, someday it would be nice
[21:52:54] <a-l-p-h-a> GAH!!! nsk's website is slow as hell.
[21:52:59] <a-l-p-h-a> getting 5.1kB/sec
[21:53:06] <a-l-p-h-a> 12.8 meg file is taking forever.
[21:53:17] <alex_joni> a-l-p-h-a: it's all relative
[21:53:34] <skunkworks> cradek: it is for when you by a mazak
[21:53:58] <alex_joni> s/buy/get/
[21:54:05] <skunkworks> oops
[21:54:10] <skunkworks> buy
[21:54:24] <skunkworks> it was my keybaord this time ;)
[21:54:26] <cradek> yeah right
[21:55:31] <skunkworks> well with the mesa and the 72 i/o board we should have enough i/o for the K&T
[21:56:06] <cradek> do you plan to do the tool changer and everything?
[21:56:32] <skunkworks> That is the plan
[21:56:36] <cradek> neat
[21:57:13] <skunkworks> If I am not good with hal and classicladder after that - I will take up under water basket weaving.
[21:58:44] <Jymmmm> yo
[22:00:12] <skunkworks> yo'
[22:00:37] <Jymmmm> hey skunkworks, I was just NOT thinking about ya...
[22:00:46] <Jymmmm> ;)
[22:01:14] <alex_joni> night Jymmmm
[22:01:23] <a-l-p-h-a> I read this article. http://tinyurl.com/3xxyhj and my very first programming job, my interviewer asked me to see what this code did. At that point in time, I ddin't know what try / catch statement did, as I never used it. after being told what it did, I was able to explain the code shown in under a minute. He wrote it, and it took him 5 minutes that morning to re-figure out what he did. :)
[22:01:27] <Jymmmm> G'Night Alex
[22:01:37] <a-l-p-h-a> this code, was a printout he showed me.
[22:01:42] <a-l-p-h-a> night AJ
[22:01:50] <alex_joni> night all..
[22:01:53] <skunkworks> night alex
[22:02:30] <alex_joni> a-l-p-h-a: FizzBuzz ?
[22:02:30] <Jymmmm> * Jymmmm is working on his Costco Cashew container rack
[22:04:41] <Jymmmm> If you guys enjoy cashews (or mixed nuts), you should check out Costco.... 2.5# jar of cashews for $10
[22:05:18] <Jymmmm> I take that back.... you guys ARE mixed nuts.
[22:05:38] <jepler> hah http://www.codeslate.com/2007/01/you-dont-bury-survivors.html
[22:05:49] <a-l-p-h-a> alex_joni, no... it was something else.
[22:05:55] <cradek> I once interviewed a candidate for a VBA job (yes, you can stop booing for the peanut gallery) whom I asked to swap two variable contents without using a temp variable. It's the standard a=a+b, b=a-b, a=a-b problem.
[22:05:56] <jepler> (I'm not sure what question this is actually in response to: They're seven and a half degrees apart.)
[22:06:07] <cradek> this is a stupid question.
[22:06:09] <a-l-p-h-a> the fizz buzz is trivial to us... I know. but the article suggests that many programmers can't.
[22:06:12] <jepler> that's a terrible question
[22:06:18] <a-l-p-h-a> 'supposed' programmers.
[22:06:32] <jepler> the first time I ran my fizz buzz solution it was wrong, but I quickly corrected it
[22:07:11] <a-l-p-h-a> cradek, only works for intergers... how would you swap, say some strings around without a temp. :)
[22:07:50] <cradek> a-l-p-h-a: no it doesn't. swap maxint and maxint-1 that way
[22:08:14] <cradek> alex_joni: if anything, it's a parlor trick, and you shouldn't ever do it that way in any program
[22:08:34] <a-l-p-h-a> cradek,???
[22:09:19] <alex_joni> cradek: you mean this: ?
[22:09:24] <alex_joni> *x ^= *y;
[22:09:24] <alex_joni> *y ^= *x;
[22:09:24] <alex_joni> *x ^= *y;
[22:10:25] <jepler> cradek: that works fine as long as you're using a 2's complement machine and a language that doesn't detect overflows (e.g., C or C++ on any modern CPU)
[22:10:42] <jepler> it'll also appear to work with a wide range of floating-point values
[22:10:55] <a-l-p-h-a> for (i = 1; 1 <=100; i++) { if (i mod 3 == 1) {echo 'fizz'}; if (i mod 5 == 1) {echo 'buzz'}; if ( (i mod 3 !=1) || (i mod 5 != 1) {echo i;} } could clean up the internals... but blah. works.
[22:11:07] <cradek> a-l-p-h-a: mod?
[22:11:12] <jepler> == 1 ?
[22:11:22] <cradek> 1?
[22:11:33] <a-l-p-h-a> isn't it 3 mod 3 == 1?
[22:11:38] <cradek> ummm
[22:11:46] <a-l-p-h-a> or is it 0?
[22:11:47] <cradek> next!
[22:12:07] <cradek> I wrote it in lisp (just to be perverse) in one try
[22:12:07] <alex_joni> threes = range(0, 101, 3)
[22:12:07] <alex_joni> fives = range(0, 101, 5)
[22:12:07] <alex_joni> def check(n):
[22:12:07] <alex_joni> . plain = 1
[22:12:07] <alex_joni> . if n in threes: print .Fizz., ; plain = 0
[22:12:09] <alex_joni> . if n in fives: print .Buzz.,; plain = 0
[22:12:11] <alex_joni> . if plain: print n,
[22:12:13] <alex_joni> . print
[22:12:17] <alex_joni> [check(i) for i in range(1, 101)]
[22:12:58] <jlmjvm> does anyone know hot to use hal_joystick,do you just add it to your hal file?
[22:12:57] <jepler> alex_joni: that's an interesting approach I didn't think of
[22:13:07] <skunkworks> jepler: actually the one pin I checked measured 4.1 volts - the rest that are high measure 3.3
[22:13:11] <a-l-p-h-a> it's kinda clever.
[22:13:56] <jepler> alex_joni: but you should make it more efficient by writing 'threes = set(range(...))'
[22:14:04] <cradek> I've personally interviewed graduates who can't answer "Write a loop that counts from 1 to 10" or "What's the number after F in hexadecimal?"
[22:14:21] <alex_joni> jepler: I know _very_ little python, just starting to learn
[22:14:21] <skunkworks> funny - even I can do that.
[22:14:25] <Jymmmm> cradek: Please tell me you're kidding.
[22:14:31] <cradek> I am assured by my interviewing coworkers that this is actually true.
[22:15:11] <alex_joni> haha, ruby: puts (1..100).map{|i|(s=(i%3==0?.Fizz.:.)+(i%5==0?.Buzz.:.))==.?i:s}
[22:15:13] <jepler> jlmjvm: yes, that is the first step. After that you have to decide how to create the HAL connections to let the joystick do the actions you want.
[22:15:26] <jepler> jlmjvm: there's a page on the wiki about this which may help you. http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Using_A_Joypad_To_Move_Your_CNC_Machine
[22:15:51] <a-l-p-h-a> for (i = 1; 1 <= 100; i++) {
[22:15:51] <a-l-p-h-a> if (i % 3 == 0) {echo 'fizz'};
[22:15:51] <a-l-p-h-a> if (i % 5 == 0) {echo 'buzz'};
[22:15:51] <a-l-p-h-a> if ( (i % 3 != 0) || (i % 5 != 0) {
[22:15:51] <a-l-p-h-a> echo i;}
[22:15:51] <a-l-p-h-a> }
[22:15:53] <a-l-p-h-a> }
[22:16:00] <Jymmmm> cradek: Would you accept "There are 10 people that understand binary" in response to "What's the number after F in hexadecimal?"
[22:16:07] <a-l-p-h-a> there... mod is an alias of % in some languages...
[22:16:19] <jlmjvm> jepler: thanks for the link
[22:17:23] <jlmjvm> i added joypad.hal to my stepper folder,dont i have to call it up in the ini file also
[22:17:23] <a-l-p-h-a> I think to make it c/c++ compatable... it'd be "var i = 1;" in the for statement.
[22:17:39] <jepler> whereof ye know not, be ye silent
[22:18:20] <a-l-p-h-a> alex_joni, how is that supposed to be readable? ruby's language is very strange to me.
[22:18:34] <alex_joni> it's not supposed to be readable by you
[22:19:10] <Jymmmm> jepler: The answer is 42!
[22:19:21] <a-l-p-h-a> or the new number. 23.
[22:19:20] <skunkworks> what was the question?
[22:19:39] <Jymmmm> skunkworks: What color is red.
[22:20:09] <alex_joni> heh, this is nice:
[22:20:09] <alex_joni> switch(i % 15) {
[22:20:09] <alex_joni> case 0: printf(.fizzbuzz\n.); break;
[22:20:09] <alex_joni> case 3:
[22:20:09] <alex_joni> case 6:
[22:20:09] <alex_joni> case 9:
[22:20:12] <alex_joni> case 12: printf(.fizz\n.); break;
[22:20:14] <alex_joni> case 5:
[22:20:18] <alex_joni> case 10: printf(.buzz\n.); break;
[22:20:21] <alex_joni> default: printf(.%d\n., i);
[22:20:26] <Jymmmm> skunkworks" Or in the immortal words of Homer Simpson... "Hello Operator, give me the number for 9-1-1"
[22:21:45] <cradek> my first try was http://pastebin.ca/374967
[22:23:16] <a-l-p-h-a> lisp. :(
[22:23:40] <a-l-p-h-a> ohoh... cookie to first person to write it in assembly.
[22:23:59] <a-l-p-h-a> your choice of dialect.
[22:24:05] <a-l-p-h-a> avr, pic, x86.
[22:24:09] <Jymmmm> a-l-p-h-a BF ?
[22:24:09] <cradek> there's some question about what it means to print a string
[22:24:16] <a-l-p-h-a> BF?
[22:24:36] <alex_joni> MZ ÿÿ ¸ @
[22:24:38] <Jymmmm> a-l-p-h-a: http://www.muppetlabs.com/~breadbox/bf/
[22:24:49] <alex_joni> a-l-p-h-a: does machine-code count?
[22:26:00] <a-l-p-h-a> alex_joni, yeah.
[22:26:10] <a-l-p-h-a> Jymmmm, never seen that before.
[22:26:24] <a-l-p-h-a> probably cause of the name, we never learned about it in uni.
[22:26:29] <Jymmmm> a-l-p-h-a: Ah, I thought everyone has =)
[22:27:11] <jepler> http://pastebin.ca/raw/374982
[22:27:22] <Jymmmm> a-l-p-h-a: Here's the "Hello World" in BF... http://en.wikipedia.org/wiki/Brainfuck
[22:27:47] <cradek> jepler: ha
[22:27:58] <cradek> jepler: I bet you didn't get that one right on the first try.
[22:28:03] <a-l-p-h-a> jepler,, haha
[22:28:12] <jepler> cradek: no, not by a long f'ing shot
[22:29:51] <cradek> jepler: m4?
[22:30:00] <cradek> jepler: (recursion but no looping)
[22:31:06] <cradek> heh, or sendmail
[22:31:55] <alex_joni> http://ostermiller.org/ti82/fizzbuzz.txt
[22:32:09] <skunkworks> right off the top of the bat I would have wrote If int(i/3)=1/3 then ...
[22:32:14] <alex_joni> "Software works with the TI-82, TI-83, and TI-83-Plus calculators."
[22:32:21] <skunkworks> i/3
[22:32:44] <jlmjvm> jepler:having some problems getting this joypad to boot up,put the joypad.hal in the stepper folder
[22:33:23] <jlmjvm> and added joypad.hal to the ini file
[22:34:17] <jlmjvm> also the joypad.hal i have is from last week
[22:35:39] <jlmjvm> can i put this on pastbin
[22:37:45] <jepler> here's my next solution: http://pastebin.ca/375001
[22:38:19] <jepler> I hope that by using bash, dc, and awk I've proven something about myself
[22:40:24] <alex_joni> http://www.robcon.ro/emc/fizzbuzz.html
[22:44:10] <jepler> cradek: just for you
[22:44:09] <jepler> define(one,`ifelse(eval($1%15),0,fizzbuzz,ifelse(eval($1%3),0,fizz,ifelse(eval($1%5),0,buzz,$1)))')define(two,`one($1)
[22:44:14] <jepler> ifelse(eval($1<100),1,`two(eval($1+1))')')two(1)dnl
[22:44:24] <alex_joni> eww.. sendmail?
[22:44:45] <jepler> m4
[22:44:54] <alex_joni> yuck..
[22:44:54] <jepler> m4 is used by sendmail so that might be why it looks familiar
[22:44:58] <alex_joni> thought that dnl is familiar
[22:45:08] <alex_joni> I looked at some m4 a while ago for autoconf
[22:45:17] <alex_joni> but decided I want to keep my sanity
[22:48:47] <jlmjvm> http://pastebin.ca/375012
[22:49:20] <jlmjvm> this is my hal file,wont start emc since i added joypad
[22:50:48] <jlmjvm> was i supposed to add it to my existing hal file?
[22:52:30] <jepler> haha this day I can truly say I've mastered C++!
[22:52:31] <jepler> http://pastebin.ca/375015
[22:54:28] <jepler> jlmjvm: because both the 'joystick' hal code and your existing hal code use an 'and', you can't blindly put the lines for the one after the other
[22:54:50] <alex_joni> jepler: show that to JMK :)
[22:55:07] <jepler> jlmjvm: you have to increase the number of 'and' requested (e.g., loadrt and count=3) and change the numbers so that the right 'and's are used for each thing
[22:55:09] <jepler> alex_joni: show the C++ program to him?
[22:55:41] <jepler> alex_joni: is he a fellow C++-hater? I can't remember
[22:57:46] <alex_joni> jepler: fairly
[22:58:30] <a-l-p-h-a> jepler, I don't know templates in C++. :(
[22:58:57] <jlmjvm> i really dont know much about the and function,i think alex added that to make charge pump work
[22:58:59] <jepler> a-l-p-h-a: it's a really gross program, and I'm sure I can't explain it adequately
[22:59:14] <jlmjvm> cant find the other and
[23:00:28] <jepler> jlmjvm: you don't need to understand the purpose of each 'and2'. You just need to count how many there are (I think one in your original file and two more now that you added the joystick code, for a total of 3), change the first 'loadrt and2' to have the right count ('loadrt and2 count=3') and then re-number the 'and2's in the new block so that they are and2.1 and and2.2 instead of and2.0 (already used by charge-pump) and and2.1.
[23:01:03] <jlmjvm> k,will give it a shot
[23:01:27] <Jymmmm> If anyone knows... Could SS bolts/nuts handle high heat (2000F) without any ill effects?
[23:02:17] <alex_joni> jlmjvm: http://pastebin.ca/375026
[23:08:06] <Jymmmm> FWIW... As "Rule of Thumb", generally Carbon Steel is commonly used for temperatures to 750° F and Stainless Steel is considered suitable to 1200° F. Corrosion and oxidation rates of the material should be taken into account when using these "Rules of Thumb".
[23:08:41] <jlmjvm> alex:didnt work
[23:09:38] <alex_joni> jlmjvm: might have missed soemthing.. the error will tell you probably what
[23:10:06] <jlmjvm> k,let me look
[23:12:23] <a-l-p-h-a> hahahahah... http://www.jeffpalm.com/fox/index.html on our topic of fizzbuzz
[23:12:34] <alex_joni> jepler: http://pastebin.ca/375034
[23:13:02] <roltek> hi alex
[23:13:30] <alex_joni> hi roltek
[23:13:40] <jepler> alex_joni: hm not sure I understand what count_latch is, but funny anyway
[23:13:53] <roltek> is the 2.1.1 upgraded from packages
[23:14:15] <alex_joni> jepler: count is only valid when count_latch is active
[23:14:24] <alex_joni> roltek: yeah
[23:14:32] <roltek> thanks
[23:18:44] <alex_joni> this is wild: http://pastebin.ca/375042
[23:22:11] <jepler> alex_joni: ahaha that's great
[23:23:15] <alex_joni> I didn't know you can do that
[23:24:25] <alex_joni> I mean the printf(t[foo], var)
[23:25:54] <a-l-p-h-a> I don't understand it!!! silly c program.
[23:26:01] <a-l-p-h-a> obfuscated programming. :(
[23:26:30] <alex_joni> a-l-p-h-a: keep trying :P
[23:27:19] <a-l-p-h-a> you using the static constants...
[23:27:58] <a-l-p-h-a> alex_joni, where are you seeing these examples? or you making them up?
[23:28:08] <a-l-p-h-a> but the "3&19142723>>2*i%30" is a little odd to me... what's this 19132723?
[23:30:05] <alex_joni> that's a magic number :P
[23:30:14] <a-l-p-h-a> that's not helpful
[23:30:25] <jepler> seriously, it's a magic number
[23:30:29] <alex_joni> you might want to put some paranthesis there if you don't know the operator precedence
[23:31:14] <crepincdotcom> how does EMC handle braking and arriving at a specific location after it's moving?
[23:31:15] <a-l-p-h-a> http://www.rfc1149.net/blog/
[23:31:34] <jepler> there are programs known as "perfect hash generators" that generate weird expressions like that to map from an input set (e.g., numbers 1 to 100) to an output set (e.g., a number from 0 to 3) with a small number of operations
[23:32:07] <jepler> that may be what's going on here
[23:32:08] <alex_joni> a-l-p-h-a: 3 & (19142723 >> 2 * (i % 30))
[23:32:26] <jepler> but this was probably hand generated
[23:32:41] <jepler> I should have seen it sooner, given the HAL component I was working on earlier
[23:32:57] <jepler> but I didn't until alex added all the parens
[23:32:57] <alex_joni> the idea is to shift that odd number right, based on the var. i
[23:33:19] <alex_joni> and only use the last 2 bits (3 & ... ) does that
[23:33:42] <alex_joni> now you have 4 possible values, which you look up in the const table above ("$d", "..)
[23:34:12] <alex_joni> jepler: I think this was hand generated (not by me though)
[23:36:41] <a-l-p-h-a> ooooooooooh.
[23:36:43] <a-l-p-h-a> okay. I get it now.
[23:39:05] <alex_joni> too much fizzbuzz, and I forgot I planned to sleep :)
[23:39:25] <jepler> alex_joni: check out my last python solution before you leave. http://emergent.unpy.net/files/01172617016/fb2.py
[23:40:58] <a-l-p-h-a> night alex_joni.
[23:41:05] <alex_joni> that's not readable python anymore (at least not for me :(
[23:41:21] <alex_joni> what's a zip ?
[23:42:04] <jepler> >>> zip([1,2],[3,4])
[23:42:04] <jepler> [(1, 3), (2, 4)]
[23:42:25] <alex_joni> I see (the blind man said)
[23:42:27] <jepler> zip returns a tuple giving the first element from each argument, then a tuple giving the second element from each argument, and so on
[23:42:45] <jepler> in this case, it's zip like a zipper, with the items from the first and second lists being the teeth of the zipper (I'm told)
[23:43:11] <alex_joni> right
[23:43:44] <alex_joni> now that made it even less readable :P
[23:53:55] <a-l-p-h-a> oh man... I love Mac Vs. PC commercials... new on with a secret service agent protecting the PC guy.
[23:53:58] <a-l-p-h-a> new one
[23:59:32] <alex_joni> jepler: http://pastebin.ca/375079