#emc | Logs for 2009-06-13

[00:08:06] <jimbo> I hab=ve the Heidenhain big as a house rotary encoder. It attaches to the same card. what kind of output am I looking for?
[00:29:11] <archivist> count the wires to answer your question
[01:30:56] <jimbo> archivist: the rotary encoder also outputs Sine. 6 wire hookup on the board. Looks like it wil take two pins.
[01:58:27] <skunkworks> jimbo: yes. The 7i33t will give you 4 axis +/-10v and 4 axis encoder counting.
[02:11:35] <jimbo> can I interface into a TECO FM50 3 phase control with the same?
[02:12:01] <SWPadnos> if the FM50 takes +/- 10V input, yes
[02:12:26] <SWPadnos> though you might need isolation (I don't recall if the 7i33 has isolated outputs - check the manual)
[02:16:17] <jimbo> Does EMC2 support something like the PoKey USB keyboard emulator?
[02:17:17] <cradek> not directly
[02:17:42] <cradek> keyboard emulation is a bad way to make a control panel
[02:17:43] <jimbo> Is there a piece like this that you do support?
[02:18:01] <cradek> hook your buttons to any digital inputs, and in HAL wire them up to halui
[02:18:35] <cradek> if you say exactly what you're trying to do, maybe there's more specific advice that would be useful too
[02:19:09] <SWPadnos> if the PoKey is an input device, then the hal_input driver should work
[02:19:11] <jimbo> Wire my control panel with less wiring.
[02:19:36] <cradek> SWPadnos: even if it insists it's a keyboard?
[02:19:39] <SWPadnos> but it's like keystrokes, not like real buttons hooked to the realtime code
[02:19:42] <SWPadnos> cradek, yes
[02:19:49] <cradek> then cool
[02:19:53] <SWPadnos> you can plug in a keyboard and use it with hal_input
[02:20:08] <SWPadnos> you get many input bits, and 3 output bits (the LEDs :) )
[02:20:12] <cradek> ha
[02:21:22] <jimbo> What type of USB device is there that will give a buch of inputs and outpus that connects USB?
[02:22:15] <cradek> if you have a jogwheel you'll want to hook that up directly so you can read it in realtime
[02:22:21] <cradek> (I don't know the answer to your question)
[02:23:15] <jimbo> I have the jogwheel that came with my mill. Sine output. have it fixed already.
[02:23:33] <SWPadnos> there are some devices like I assume the PoKey is - things that let you connect buttons to a USB port
[02:23:39] <SWPadnos> used in arcade emulators and stuff
[02:24:10] <jimbo> I have used thos berore can you say MAME
[02:24:17] <SWPadnos> sure can
[02:24:36] <SWPadnos> google turned this up: http://www.kadtronix.com/digio.htm
[02:24:50] <SWPadnos> they mention HID on the same page, so it's possible that would work with hal_input
[02:25:04] <SWPadnos> but remember - all of this is in userspace, not realtime
[02:25:20] <SWPadnos> you can't wire an e-stop button this way, you can't use an encoder (very well), etc.
[02:25:44] <cradek> but for a lot of other things it'd be fine
[02:25:49] <SWPadnos> yep
[02:25:59] <cradek> run, step, coolant, spindle, ...
[02:26:01] <SWPadnos> optional stop, indicator lights, coolant buttons ...
[02:26:32] <jimbo> keys from the keyboard that you want to have a button for.
[02:26:40] <SWPadnos> no, not that
[02:27:17] <SWPadnos> you would probably want to have hal_input grab the device exclusively, or strange things can happen if your EMC GUI doesn't have input focus
[02:27:35] <SWPadnos> which means that you don't get "keystrokes" at all, you have changes on HAL pins
[02:27:42] <cradek> don't think of it as a keyboard
[02:27:55] <SWPadnos> so you need to use halui along with the external buttons to get anything UI-related done
[02:28:09] <SWPadnos> right, it's a bunch of buttons
[02:29:20] <SWPadnos> interesting: http://www.accesio.com/go.cgi?p=../usb/usb-dio-48.html
[02:30:24] <jimbo> Thats cool
[02:30:38] <SWPadnos> note that it's not a HID device, so it won't work out of the box
[02:31:28] <jimbo> Dashed my hopes against the rocks again
[02:31:42] <SWPadnos> they have a Linux driver, you could write a HAL driver for it :)
[02:32:15] <jimbo> Are you trying to add to my skill set.......:)
[02:33:46] <SWPadnos> oh no. I would never do that
[02:34:00] <jimbo> yea sure
[02:36:30] <jimbo> I was thinking putting the play,->, ||, X,Y,Z, etc as hard buttons. I do not like using mice for most things
[02:37:24] <SWPadnos> that may not be as easy as you'd like
[02:37:43] <SWPadnos> AXIS may have pins for selecting the jog axis, but I'm not sure
[02:37:53] <jimbo> Is it not the same as having two keyboards in paralell
[02:37:58] <SWPadnos> no, it is not
[02:38:16] <cradek> except for panning the preview window, AXIS can be completely operated without a mouse
[02:38:22] <SWPadnos> unless it's jus a keyboard, but in that case you have all the same focus issues that a normal GUI Has
[02:39:27] <jimbo> I do not understand the focus issue unless it has to do with the focus of Xwindows.
[02:39:34] <SWPadnos> yes, it does
[02:40:06] <SWPadnos> if you connect the external buttons like a keyboard (using one of theoe MAME interfaces), all you have is another keyboard
[02:40:33] <SWPadnos> so if you're in the text editor, you'll get characters typed as though you had typed then on the normal keyboard
[02:40:57] <SWPadnos> the panel will look like a CNC operators panel, but it will just be another keyboard
[02:41:10] <SWPadnos> you could type your username and password with it if it has all the characters set up :)
[02:41:31] <jimbo> then it would be a keyboard.
[02:41:50] <SWPadnos> in contrast, using the hal_input driver can make the buttons "directly connected" to HAL, so no matter what program has focus, they'll still do the functions you assigned to them
[02:42:22] <SWPadnos> it's not a perfect solution, because it's still in userspace - hence no encoder input or that kind of thing
[02:42:36] <jimbo> can you assign numbers 0-9, f1, ., etc
[02:42:44] <SWPadnos> with what?
[02:43:02] <jimbo> inside of HAL
[02:43:15] <SWPadnos> no. HAL has no relation to a keyboard
[02:43:25] <SWPadnos> this is my point
[02:43:38] <jimbo> OK i understand
[02:43:57] <SWPadnos> you can use a keyboard-emulating device as *either* a bunch of slow HAL I/Os, *or* as a secondary keyboard
[02:44:10] <SWPadnos> there are tradeoffs to evaluate
[02:44:56] <jimbo> I have an idea of what i want to do now and how it will work
[02:45:02] <cradek> think "I want a button that tells EMC to turn the spindle on" instead of thinking about keyboards and keypresses.
[02:45:40] <jimbo> OK
[02:46:25] <mozmck> cradek: you should be able to do about anything you would need to with hal shouldn't you?
[02:46:28] <jimbo> Can you change the size of the buttons inside of axis for use with a touch screen
[02:46:35] <cradek> often people think "spindle on is F9 so I need something to send F9" but this is the wrong approach for all the reasons SWPadnos said
[02:46:44] <cradek> mozmck: yes
[02:46:50] <cradek> jimbo: no
[02:47:05] <SWPadnos> mozmck, except change what AXIS is showing you (for the most part)
[02:47:40] <SWPadnos> halui is a separate UI - like running tkemc at the same time as AXIS, so what you do with the buttons doesn't necessarily change what AXIS is doing
[02:47:43] <mozmck> that's what I thought.
[02:48:52] <mozmck> so a pendant could be made to do jogging, run, stop, etc with a hal setup or component in some cases.
[02:49:03] <cradek> yes with halui
[02:49:16] <SWPadnos> the motion controller has direct jogging inputs, which are sampled in realtime
[02:49:34] <SWPadnos> the other stuff (run, stop, pause and a bunch of other stuff) can be done with halui
[02:50:36] <mozmck> I presume you can control jogging without using those input though?
[02:50:59] <cradek> what do you mean?
[02:51:03] <SWPadnos> yes, in some other ways
[02:51:11] <jimbo> so if I tie my hand encoder into pins on the mesa board I will be able to jog with it/
[02:51:17] <cradek> you bet
[02:51:18] <SWPadnos> the best response for a jogwheel is using the motion controller inputs
[02:51:25] <mozmck> we make a pendant with an analog joystick.
[02:51:31] <SWPadnos> that would use halui
[02:51:50] <cradek> yes halui has analog jog inputs
[02:52:33] <mozmck> well, our current pendant sends a series of codes to the computer.
[02:53:01] <mozmck> so I have a plugin in Mach that reads them and jogs at a speed relative to the joystick position
[02:53:42] <mozmck> I'd like to get our next version to work with emc2.
[02:53:43] <cradek> you could read the protocol with a component that then generates the 'analog' jog singal
[02:53:52] <cradek> or signal
[02:54:05] <mozmck> I see. that sounds good
[02:54:39] <jimbo> going out to dinner
[02:56:37] <jmkasunich> woo-hoo!
[02:56:44] <cradek> hi jmk!
[02:56:48] <jmkasunich> internet withdrawl symptoms averted
[02:56:52] <skunkworks> internet fixed?
[02:56:58] <cradek> yay
[02:57:08] <jmkasunich> bulging cap in router wall-wart replaced
[02:58:20] <cradek> curse those cheap caps
[02:58:32] <jmkasunich> curse cheap wall-warts
[02:58:47] <SWPadnos> oh, just curse anyway
[02:58:49] <jmkasunich> the router is nicely constructed, the wart has a single sided phenolic PC board
[02:59:14] <jmkasunich> I'm glad it was late - if it was earlier I'd have probably gotten a new router
[02:59:24] <cradek> the hub I recently fixed had three exploded caps like that - the bottoms were popped clear out.
[02:59:30] <jmkasunich> the wart produced the proper voltage when not plugged into the router
[02:59:59] <SWPadnos> oh, you found a hub
[03:00:28] <jmkasunich> but I noticed a bit of flicker on the LEDs, so I measured the voltage with it plugged into the router - 4.something - lots of ripple
[03:00:29] <cradek> yep, found a long-dead one at work
[03:01:00] <SWPadnos> ouch
[03:01:05] <jmkasunich> I replaced a 1000uF 16V with 2x330uF25V in parallel, should be fine
[03:01:14] <cradek> jmkasunich: that sounds easy to not figure out
[03:01:28] <SWPadnos> that's one way of putting it
[03:02:14] <cradek> I mean it would be simple to miss. the obvious test passes.
[03:02:35] <SWPadnos> sure - it's not necesasrily something I'd look for
[03:02:40] <SWPadnos> it would be easy to not figure out :)
[03:02:52] <jmkasunich> I did the obvious test before calling the DSL vendor
[03:03:14] <jmkasunich> I dug deeper after they told me is was out of warranty (and that the light pattern meant "it's broke")
[03:03:27] <SWPadnos> heh
[03:03:42] <SWPadnos> "it's broke. stop"
[03:04:36] <jmkasunich> actually, it was "it's broke. it's out of warranty. call our sales department (on monday) and order a new one, 4-5 days shipping time"
[03:05:05] <jmkasunich> as soon as I heard that I asked if one from Best Buy, etc, would work, they said yes
[03:05:09] <jmkasunich> but this is even better
[03:07:29] <eric_unterhausen> I've been thinking my router had a heat sensitivity, turns out it was the wall wart
[03:07:44] <eric_unterhausen> probably a bad cap there too
[03:08:11] <SWPadnos> my DSL router is sitting with its cover off - it does have a heat problem
[03:08:29] <SWPadnos> this is after the wall wart was replaced (in warrantee - a recall) because they had caused fires or something
[03:08:29] <eric_unterhausen> my router has no cover and has a little fan blowing on it
[03:08:35] <jmkasunich> mine would probably work worse with the cover off - two chips are heatsinked to the cover
[03:09:25] <eric_unterhausen> the cover on mine is the thermal equivalent of a down comforter
[03:14:29] <jmkasunich> I've thought about UPS'ing my router - I wonder if I should treat this as an opportunity
[03:14:35] <jmkasunich> it draws ~2A at 5V
[03:14:53] <jmkasunich> 12V battery, 12->5 switcher, trickle charger
[03:15:02] <jmkasunich> 1A @ 12V would do it
[03:15:17] <jmkasunich> and even the smallest gel-cell would give me a couple hours
[03:15:26] <eric_unterhausen> I
[03:15:40] <eric_unterhausen> I've thought about offering to chip in for a ups for comcast
[03:16:32] <ds3> is there a guide to what can be pulled out of old inkjet printers?
[03:16:44] <jmkasunich> a guide?
[03:16:52] <jmkasunich> you just open the printer up and see what looks interesting
[03:17:01] <eric_unterhausen> I like to use a hammer
[03:17:07] <jmkasunich> usually steppers for paper advance, stepper or small servo for printhead movement
[03:17:19] <jmkasunich> some gears, maybe a microswitch or optical sensor or two
[03:17:45] <eric_unterhausen> my wife bought a printer today for $30, refill cartridges are $35
[03:17:59] <mozmck> an old hp laser is good for a bunch of parts
[03:18:02] <jmkasunich> the Gillette business model
[03:18:06] <eric_unterhausen> I think the lasers are a lot more useful
[03:18:36] <eric_unterhausen> but they often have brushless motors
[03:19:10] <eric_unterhausen> if you get the right hp plotters, they have some nice little brushed servos with encoders
[03:19:22] <eric_unterhausen> but that would only work for toy cncs
[03:20:08] <jmkasunich> I think the motors on cradek's sherline lathe are plotter-class motors
[03:20:11] <jmkasunich> pittmanns
[03:23:24] <eric_unterhausen> cute little toolpost on that thing
[03:24:12] <eric_unterhausen> those motors look somewhat familiar
[03:24:26] <eric_unterhausen> but I think they are bigger than anything I've gotten from Penn State salvage
[03:25:51] <eric_unterhausen> http://timeguy.com/cradek-files/cnc/lathe/DSCN6295.JPG
[03:26:59] <eric_unterhausen> the spindle encoder probably could take a bigger side load than the spindle
[03:31:24] <eric_unterhausen> too bad my lathe would have so much trouble making a 2" diameter hole in steel
[03:34:12] <ds3> yeah, a guide as in... what is worth keeping even if I have no immediate use
[03:34:34] <ds3> those the exactly the reason why I am planning to scrape some printers
[03:34:54] <ds3> don't use the inkjets often enough that they try out so $50 down the drain
[03:35:40] <ds3> has anyone tried rewiring the print head drive stuff as a single axis in a CNC machine? i.e. as the gantry of a mini X/Y/Z machine? (not mill)
[03:54:44] <eric_unterhausen> i've seen people do all sorts of things with that axis.
[03:54:54] <eric_unterhausen> you can look on youtube or makezine blog
[04:05:34] <ds3> 'k
[04:06:00] <eric_unterhausen> guitar pickup winders for one thing
[06:38:21] <jimbo> cam EMC2 run a timed output every x min, or hr for auto oiler?
[07:07:22] <anonimasu> yes
[07:07:45] <anonimasu> jimbo: you know, what's better.. keep track of moved distance and oil.. every x/dm
[07:08:15] <anonimasu> because with a timed oiler your machine will drown in oil..
[07:08:15] <anonimasu> :)=
[07:08:33] <Jymmm> Lube every 3000 inches
[07:24:32] <jimbo> cool
[11:14:42] <BigJohnT_> dang string broke
[11:36:57] <BigJohnT_> BigJohnT_ is now known as BigJohnT
[12:54:51] <alex_joni> BigJohnT: on your guitar?
[12:56:59] <BigJohnT> to the internet :)
[12:57:06] <BigJohnT> morning alex_joni
[12:57:39] <BigJohnT> gotta run talk to you later
[15:19:57] <Goslowjimbo> Is there anyone here who would like to address structure of EMC/HM2/SPI?
[15:25:41] <alex_joni> Goslowjimbo: seb_kuzminski usually
[15:25:50] <alex_joni> but I think #emc-devel is more appropriate for that
[15:26:14] <Goslowjimbo> OK. I thought you had to have a password to join it - ?
[15:28:36] <alex_joni> nope
[15:28:43] <alex_joni> just /join #emc-devel
[15:29:08] <Goslowjimbo> Thanks, I'll do that.
[16:03:16] <Jymmm> alex_joni: why seb?
[16:35:03] <jepler_> jepler_ is now known as jepler
[16:38:07] <Jymmm> I found a new toy... http://en.wikipedia.org/wiki/Calcium_oxide
[16:41:17] <alex_joni> Jymmm: because emc2/HM2/SPI doesn't exist yet
[16:42:30] <Jymmm> alex_joni: otay panky!
[16:44:27] <Jymmm> alex_joni: like my toy? ^^^^
[16:49:21] <alex_joni> Jymmm: we use it all the time
[16:50:32] <Jymmm> alex_joni: seriousl?
[16:50:44] <alex_joni> Jymmm: yes
[16:50:50] <Jymmm> alex_joni: for?
[16:50:56] <alex_joni> it used to be quite common, nowadays not so much
[16:50:58] <alex_joni> construction
[16:51:05] <alex_joni> but only after it reacted with water :)
[16:51:13] <Jymmm> alex_joni: well, duh.... what specifically?
[16:51:34] <alex_joni> you mix it with cement and sand for mortar
[16:52:06] <Jymmm> ah, well that sucks
[16:52:24] <Jymmm> no fun in that =)
[16:53:08] <alex_joni> you also use it for whitening of walls
[16:54:30] <Jymmm> alex_joni: I just want fire! ug ug ug
[16:54:37] <alex_joni> heh
[16:54:53] <Jymmm> fire from water ug ug
[16:55:03] <alex_joni> where we have our holiday house, all the house have a special hole for estinguishing the stuff
[16:55:36] <Jymmm> huh?
[16:56:23] <Jymmm> it's resable so to speak?
[16:56:29] <Jymmm> reusable
[16:59:00] <JanVanGilsen> rg
[17:00:09] <geo01005_home_> JanVanGilsen: Are you working on a 'recorder' widget for pyvcp?
[17:03:21] <JanVanGilsen> i have made a graph widget that did something like that :)
[17:05:24] <geo01005> I'm interested in that, has it been committed to trunk? or do you just run it on your computer?
[17:08:39] <JanVanGilsen> It has never been commited because i wanted to add the ability to have multiple lines in one graph
[17:09:03] <geo01005> That would be cool.
[17:09:15] <cradek> I'd like to have that chart widget even if it has only one line
[17:09:29] <geo01005> I agree.
[17:09:57] <geo01005> Perhaps you can add the single one now, and add a multi-line widget later.
[17:12:19] <JanVanGilsen> The current xml-parsing in pyvcp doesn't allow to have 2 tags with the same name in one level e.g. <graph><line color="red" /><line color="blue" /></graph>
[17:14:14] <JanVanGilsen> ill get my other computer, and check if i can find the file :)
[17:21:59] <JanVanGilsen> I wanted to fix this first because i had some other nice ideas like comboboxes ect that would require such type of xml ...
[17:22:03] <jimbo> when using linear scales in a closed loop system with Mesa card. Does Axis display true reading from the linear scale or where it told it to go?
[17:22:25] <JanVanGilsen> you can select that in the menu
[17:24:14] <jimbo> So emc2 can be a true closed loop system. not closed loop just up to the Mesa card
[17:25:25] <JanVanGilsen> yes, emc closes the loop
[17:35:03] <SWPadnos> jimbo, the two numbers (commanded and actual) will be very close, or EMC will abort with a following error
[17:35:52] <JanVanGilsen> You can also use the "@" key to toggle between commanded and actual readings :)
[17:38:15] <jimbo> JanVanGilsen, Thank you.
[17:39:38] <JanVanGilsen> http://imagebin.org/52329
[17:42:17] <geo01005> looks great :)
[17:42:52] <JanVanGilsen> http://pastebin.ca/1459118
[17:44:35] <JanVanGilsen> this is the function that needs to be added to the lib/python/pyvcp_widgets.py file
[17:44:48] <genfool> Hello, noob here. Friend and I are building a small cnc machine and hope to exhibit it at a linux fest a few months from now. My job now, is to install the os any recommendations ?
[17:46:10] <Jymmm> CP/M
[17:47:05] <JanVanGilsen> it could be possible that the code i supllyed doesn't work :)
[17:47:29] <JanVanGilsen> i did mess alot in my pyvcp file :)
[17:49:14] <archivist> genfool, download the live cd it is all set up to to run EMC
[17:51:52] <geo01005> JanVanGilsen: I
[17:52:09] <geo01005> I'll have to try it out sometime, it would be nice to get it into the next release.
[17:53:41] <genfool> archivist, cool, looks like 8.04, somehow seemed a little dated. Thought I would ask first :)
[17:54:03] <SWPadnos> 8.04 is still the latest "LTS" (Long Term Support) release
[17:54:09] <SWPadnos> frim Ubuntu
[17:54:11] <SWPadnos> from
[17:54:14] <archivist> genfool, we stick at a long term support version
[17:54:56] <genfool> archivist, cool, have no issue with lts
[17:55:45] <archivist> genfool, where will the linux fest be?
[17:55:47] <JanVanGilsen> geo01005: we'll need somebody to review the code and add it to trunk
[17:56:32] <JanVanGilsen> volunteers ?
[17:56:36] <genfool> archivist, New Mexico, Nov. 14th
[17:59:34] <geo01005> is there anybody in particular that generally handles changes to pyvcp?
[18:01:08] <JanVanGilsen> geo01005 can't you test the code to make sure it works?
[18:01:37] <geo01005> sure, I just haven't done it before, let me fire up the emc box.
[18:01:46] <genfool> just in case any one is close and / or interested http://nmlinuxfest.ning.com/
[18:02:10] <JanVanGilsen> I'll help =)
[18:04:27] <archivist> genfool, you could also mention on the emc users mailing list
[18:05:18] <geo01005_home_> JanVanGilsen, Should I check out the latest code in trunk?
[18:05:59] <JanVanGilsen> you could, then you can generate a patch
[18:06:04] <JanVanGilsen> but it's not needed
[18:11:05] <genfool> archivist, great, will give it some thought, not trying to spam, trying to learn. suspect I will be around this channel lurking and learning :D
[18:11:14] <geo01005_home_> JanVanGilsen: Do you have an example that I could use in my XML file?
[18:11:24] <JanVanGilsen> its in the code :)
[18:11:50] <JanVanGilsen> the comments on to show how to use it :)
[18:12:33] <archivist> genfool, welcome
[18:13:25] <genfool> :)
[18:14:16] <JanVanGilsen> *top
[18:14:27] <geo01005_home_> got unexpected keyword argument "majorscale"
[18:15:14] <geo01005_home_> I don't need to recompile do I?
[18:15:29] <JanVanGilsen> did you add the code to the .py file ?
[18:15:33] <geo01005_home_> I'm not sure I put the widget code in the right place.
[18:16:23] <geo01005_home_> at put it at the bottom before the comment that says "this must come after all the pyvcp_xxx classes"
[18:18:15] <JanVanGilsen> i did put it right before the meter class? but i assume thats not realy nessesary
[18:21:43] <JanVanGilsen> well i gave you a wron file :)
[18:21:48] <JanVanGilsen> *wrong :)
[18:22:30] <geo01005_home_> Oh I see, yeah I moved the code, but still the same error.
[18:26:06] <JanVanGilsen> http://pastebin.ca/1459148
[18:26:12] <JanVanGilsen> try that one :)
[18:29:59] <geo01005_emc> http://pastebin.ca/1459152
[18:31:33] <JanVanGilsen> mm i'll try to get a working file and post that :-)
[18:32:15] <geo01005_home_> Ok :)
[18:32:31] <geo01005_home_> I didn't need to recompile anything right?
[18:32:52] <SWPadnos> no. python is interpreted
[18:33:21] <geo01005_home_> that is what I thought.
[18:33:29] <JanVanGilsen> what happens if you leave the <halpin> tag out?
[18:35:47] <geo01005_emc> works : http://imagebin.org/52333
[18:37:01] <JanVanGilsen> strange :)
[18:38:24] <geo01005_home_> is it because I didn't have anything connected to it?
[18:39:18] <JanVanGilsen> no, i assume you just found the first bug :p
[18:40:12] <archivist> * archivist considers http://xkcd.com/526/ for the metric threads on the list
[18:42:05] <JanVanGilsen> i always used pyvcp.graph.0.value pin
[18:44:50] <JanVanGilsen> try this: http://pastebin.ca/1459163
[18:46:10] <JanVanGilsen> the line creating the hal-pin was only executed when no <halpin> tag was used
[18:49:56] <geo01005_home_> it loads, but the pyvcp.graph.0.value pin dosn't exist anymore.
[18:51:28] <geo01005_home_> Ahh, it is now, pyvcp.my-graph
[18:55:37] <geo01005_emc> http://imagebin.org/52338
[18:56:43] <JanVanGilsen> well it seems to be working :)
[18:57:26] <geo01005_home_> yep :)
[18:58:39] <geo01005_home_> What is next?
[19:02:56] <JanVanGilsen> if you want it to be added to trunk: http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?CVS#Patch_Submission
[19:05:46] <JanVanGilsen> cvs diff -up > graph.patch
[19:06:55] <JanVanGilsen> from your cvs directory will create a patch file
[19:07:58] <JanVanGilsen> it seems that i left out the dotted lines somwhere :)
[19:09:32] <geo01005_home_> will that patch be added to the current release? or just trunk?
[19:11:38] <JanVanGilsen> somebody with cvs acces can add it to trunk, when its fully tested it will be released.
[19:13:48] <geo01005_home_> So I have added a SPI ADC component to the branch that I have checked out, So I need to check out a new branch so that the SPI stuff won't be added with the pyvcp patch right?
[19:14:40] <JanVanGilsen> i'm not shure
[19:17:55] <JanVanGilsen> http://www.w3reference.com/cvsdiff.html
[19:20:21] <JanVanGilsen> you can make a diff of the pyvcp_widgets.py file
[19:20:44] <JanVanGilsen> well i have to go..
[19:20:55] <geo01005_home_> Thanks for your help :)
[19:21:39] <JanVanGilsen> if you want to edit te code to get dashed lines, you'll need this: http://infohost.nmt.edu/tcc/help/pubs/tkinter/create_line.html
[19:22:55] <geo01005_home_> Ok, I'll give it a try.
[19:23:57] <JanVanGilsen> you'll need to add dash(#,#) to the create_line functions in drawscales()
[19:24:25] <geo01005_home_> Where did you intent to use dashed lines?
[19:24:29] <JanVanGilsen> sorry dash=(#,#)
[19:24:51] <JanVanGilsen> in the scale lines
[19:25:04] <geo01005_home_> Ahh, I see.
[19:27:30] <JanVanGilsen> the picture I sent first is "stippeled", but i removed it because i wanted to replace it with dash=(#,#) because that could be scalable
[19:28:01] <JanVanGilsen> if you want, i'll do it tomorrow and send a patch to emc-dev
[19:28:26] <JanVanGilsen> byebye
[21:11:25] <maddash> how the heck do you inline a function defined in one .c file into a call made from a different .c?
[21:18:35] <lerman___> Define the inline function in a .h file and include it.
[21:22:39] <maddash> yeah, but then I get these crazy "multiple definition" errors
[21:23:00] <maddash> even after I prepend "#if !defined AVERAGE_H #define AVERAGE_H" to my h file
[21:24:24] <lerman___> You need to NOT have the function defined in the .c file.
[21:25:07] <maddash> ARGH!!!
[21:25:50] <maddash> it doesn't make any sense -- gcc won't let me define ANYTHING in an h file that gets reference by several differ .c
[21:26:48] <lerman___> No. You can't define it; but you can declare it.
[21:27:43] <maddash> huh?
[21:28:53] <lerman___> Look up the difference between declaring a function (or variable) and defining a function (or variable).
[21:29:16] <maddash> geez
[21:29:45] <maddash> if I want a function to be inlined, I have to *define* it in the .h, no? declaring it isn't enough
[21:29:58] <lerman___> int foo -- defines a variable of global scope.
[21:30:00] <lerman___> extern int foo -- declares a variable of global scope.
[21:30:11] <SWPadnos> when do you get the error - compile time, link time ...?
[21:30:30] <lerman___> I don't generally use inlines (they are a relatively new addition to the language).
[21:30:51] <maddash> hang on a second -- if I invoke gcc separately on each file (ie, for i in `ls *.c`; do gcc ${i}.c; done) then the "#if !defined AVERAGE_H" won't work, right?
[21:31:02] <maddash> SWPadnos: link time
[21:31:35] <lerman___> That's what I would expect if you define the function more than once.
[21:32:21] <lerman___> It doesn't matter. Each .c file on a command line is compiled as a separate compilation.
[21:33:01] <maddash> so in order for the "multiple definition" error to go away, I'd have to invoke gcc on all .c at once, right?
[21:34:33] <lerman___> Nope. It will not go away. gcc is actually a script that invokes the compiler on each .c file independently. Depending on the options, it then links all of the .o files together.
[21:35:51] <maddash> so what difference would the "#if !defined" header file check make?
[21:36:59] <lerman___> See: http://gcc.gnu.org/onlinedocs/gcc/Inline.html for a discussion of inline functions.
[21:37:39] <lerman___> If a.h includes b.h and foo.c includes a.h and b.h, you don't want b.h to be included twice.
[21:38:35] <mdynac> good afternoon...
[21:39:39] <mdynac> trying to get emc2 on a ubuntntu 8.04 box, but the install script does not seem to find the emc repos....whats up with that?
[21:40:26] <mdynac> Could not open file /var/lib/apt/lists/www.linuxcnc.org_emc2_dists_hardy_hardy_source_Sources - open (2 No such file or directory)
[21:40:38] <mdynac> that would be the error...
[21:41:23] <maddash> fuck this. I'm defining it as a macro.
[21:42:22] <lerman___> mdynac: it appears that something is causing you to have "_" where you should have "/"
[21:42:42] <mdynac> ic, duh k thx
[21:44:05] <lerman___> Also, I see no hardy in emc2/dists -- just breezy and dapper.
[21:45:14] <mdynac> Ign http://www.linuxcnc.org hardy/hardy Packages
[21:45:15] <mdynac> Ign http://www.linuxcnc.org hardy/hardy Sources
[21:45:15] <mdynac> Err http://www.linuxcnc.org hardy/hardy Packages
[21:45:15] <mdynac> 404 Not Found
[21:45:15] <mdynac> Err http://www.linuxcnc.org hardy/hardy Sources
[21:45:15] <mdynac> 404 Not Found
[21:45:17] <mdynac> W: Failed to fetch http://www.linuxcnc.org/emc2/dists/hardy/hardy/binary-i386/Packages.gz 404 Not Found
[21:45:19] <mdynac> W: Failed to fetch http://www.linuxcnc.org/emc2/dists/hardy/hardy/source/Sources.gz 404 Not Found
[21:45:21] <mdynac> E: Some index files failed to download, they have been ignored, or old ones used instead.
[21:45:25] <mdynac> Reading package lists... Done
[21:45:27] <mdynac> Building dependency tree
[21:45:29] <mdynac> Reading state information... Done
[21:45:31] <mdynac> Package emc2 is not available, but is referred to by another package.
[21:45:33] <mdynac> This may mean that the package is missing, has been obsoleted, or
[21:45:35] <mdynac> is only available from another source
[21:45:37] <mdynac> E: Package emc2 has no installation candidate
[21:45:39] <mdynac> that would be the error ........
[21:45:48] <mdynac> so what be da haps??? people????
[21:48:35] <mdynac> okay the following two commands do NOT work on Ubuntu 8.04
[21:48:55] <mdynac> ./emc2-install.sh does not work......
[21:49:17] <mdynac> apt-get build-dep emc2 does not work....
[21:49:26] <mdynac> any help????
[21:53:47] <lerman___> maddash: You may be suffering from premature optimization. Don't make it fast until you are sure it is slow.
[21:55:51] <maddash> lerman___: actually, I am sure that it is slow. Unless my scope is broken.
[21:56:16] <SWPadnos> mdynac, you have a problem with spaces, dashes, and slashes
[21:56:39] <SWPadnos> here's one correct line: deb http://www.linuxcnc.org/hardy hardy base emc2.3
[21:56:48] <SWPadnos> note that it's linuxcnc.org/hardy hardy
[21:57:03] <SWPadnos> that's .org[slash]hardy[space]hardy
[21:57:23] <SWPadnos> you wrote above .org[space]hardy[slash]hardy
[21:57:25] <maddash> ok, suppose I have 3 .c's: a.c, b.c, and c.c, which contain a(), b() and c(), respectively. suppose that both b() and c() call a(). How would I make these calls inline, without resorting to dirty macro tricks?
[21:57:25] <mdynac> k thx
[21:57:49] <lerman___> maddash: what does the function/macro do?
[21:57:55] <SWPadnos> check __attribute__ ((inline)) (or always_inline or something)
[21:57:57] <mdynac> all i am trying to do is execute your install script.......
[21:58:16] <SWPadnos> mdynac, I took that line from the script
[21:58:30] <mdynac> k
[21:58:34] <SWPadnos> so something is changing between the web and you running the script, or between your sources file and IRC
[21:59:01] <maddash> SWPadnos: no, no, the problem is that gcc is invoked separately on each of {a,b,c}.c, so that gcc will NOT inline a() inside of either b() or c() because it has no clue on what the definition of a() is
[21:59:17] <SWPadnos> ok, that's certainly possible
[21:59:35] <maddash> lerman___: um, shifting of elements of an int array?
[22:00:03] <SWPadnos> http://gcc.gnu.org/onlinedocs/gcc/Inline.html
[22:00:13] <SWPadnos> oh, there it was earlier :)
[22:00:21] <maddash> SWPadnos: read it...
[22:02:04] <SWPadnos> what -O level are you using?
[22:03:27] <maddash> SWPadnos: -O3 (ftw)
[22:03:34] <SWPadnos> ok
[22:03:34] <lerman___> The problem is that the function must be part of a .h file so that it will be inlined in each of the files that includes it. It should also be declared static so that it is NOT multiply defined.
[22:05:59] <SWPadnos> bbl
[22:06:14] <lerman___> Me, too. bbl
[22:33:18] <mdynac> well no matter what i do i cannot get the ./emc2-install.sh to work, it just cannot find the linuxcnc.org hardy repos......
[22:33:31] <mdynac> anyone run it recently???
[23:11:50] <Goslowjimbo> geo01005: I see you have a change for an ADC via SPI. Is this by any chance through a Mesa I/O card?
[23:12:36] <geo01005_home_> Goslowjimbo, Yes I
[23:13:07] <geo01005_home_> I'm using a thermcouple to SPI chip to read the temperature on my reprap extruder.
[23:13:13] <geo01005_home_> thermocouple.
[23:13:29] <geo01005_home_> Very limited use though.
[23:13:40] <geo01005_home_> I'm using a 7i43.
[23:14:59] <Goslowjimbo> What do you mean by limited use?
[23:15:32] <geo01005_home_> I can only read one channel, and I can only read it about every 4 servo cycles.
[23:17:18] <Goslowjimbo> Do you know what is the time critical factor?
[23:17:25] <geo01005_home_> I'm using the Hostmot2 raw read and write functions in an unusual way.
[23:17:33] <geo01005_home_> What do you want to do with it?
[23:18:38] <Goslowjimbo> I want to interface to Mesa's 7i64 digital I/O board for a Bridgeport with toolchanger.
[23:19:34] <Goslowjimbo> I',ve already one of their other I/O boards for servo control, and one for quick I/O.
[23:19:55] <Goslowjimbo> Just need another 20 or so inputs and outputs.
[23:20:22] <geo01005_home_> hmm, I think it might be best to wait for seb to do the code.
[23:20:43] <geo01005_home_> Why not just get another anything I/O board?
[23:20:55] <geo01005_home_> out of PCI slots?
[23:21:05] <Goslowjimbo> Yep.
[23:21:23] <geo01005_home_> Parallel port being used as well?
[23:21:26] <Goslowjimbo> I am already using the 7i43.
[23:22:01] <geo01005_home_> what is the other card?
[23:22:29] <Goslowjimbo> I really want the current drive of the 7i64 so I don't have to have a driver board also.
[23:22:52] <geo01005_home_> I see.
[23:23:06] <geo01005_home_> what kind of stuff are you going to drive?
[23:24:56] <geo01005_home_> servos? or just slowish i/o stuff?
[23:25:10] <Goslowjimbo> I have a 7i43, 7i33, and 7i37 in the system. The PCI slots are taken up with a security system.
[23:26:02] <Goslowjimbo> I will use the 7i64 for toolchange solenoids and switches, and some spindle control I/O
[23:26:53] <Goslowjimbo> The servos are already handled by what I have. (and Estops, limit switches for the table and spindle.)
[23:26:59] <geo01005_home_> security system?
[23:27:50] <Goslowjimbo> It's the only computer I have in the barn, and doubles as a perimeter monitor. I have had some thieves visit before.
[23:27:56] <geo01005_home_> I was just looking at the 7i64 manual, it looks like you could maybe get it to work the same way that I got mine to work.
[23:28:22] <Goslowjimbo> I'm all ears.
[23:28:32] <geo01005_home_> hmm, I see.
[23:28:58] <geo01005_home_> are you familiar with the hm2 raw mode?
[23:29:34] <Goslowjimbo> Not yet
[23:30:27] <geo01005_home_> take a look here: http://www.linuxcnc.org/docs/devel/html/man/man9/hostmot2.9.html
[23:33:15] <geo01005_emc> http://pastebin.ca/1459417
[23:33:59] <geo01005_home_> ^^ This is the realtime component I wrote to misuse hm2 raw mode.
[23:36:24] <Goslowjimbo> Good. I'll study this. I think I would run into a problem with this, unless it could handle 32 bits at a time. If I understnad correctly, the 7i64 send and recieves a 32 bit frame.
[23:36:44] <geo01005_home> well....
[23:37:06] <geo01005_home> you still have to tell hm2 that you want to send data,
[23:37:15] <geo01005_home> then receive data,
[23:37:37] <geo01005_home> and that takes more than once cycle whether you have 32 comms or not.
[23:38:02] <geo01005_home> It would really be much better to have real SPI support for hm2.
[23:40:19] <geo01005_home> you will also need to know about how the hm2 interface on board the FPGA talks.
[23:42:06] <Goslowjimbo> Right. I've been trying to study that.
[23:42:23] <geo01005_home> Do you know where to find it?
[23:43:11] <Goslowjimbo> I've been looking in the Mesa stuff on CVS.
[23:44:10] <geo01005_home> so here: http://cvs.linuxcnc.org/cgi-bin/cvsweb.cgi/emc2/src/hal/drivers/mesa-hostmot2/firmware/src/regmap?rev=;content-type=text%2Fplain
[23:47:47] <Goslowjimbo> I had'nt reached that file yet. I'll study it. Thanks.
[23:49:18] <geo01005_home> Specificity you need to read the bspi section.
[23:49:38] <Goslowjimbo> Right.
[23:49:58] <geo01005_home> and you will also need a SPI firmware...