#emc | Logs for 2010-12-18

Back
[00:04:22] <theorb> theorb is now known as theorbtwo
[00:38:57] <JT-Shop> say goodnight Gracie
[01:16:14] <fragalot> fragalot is now known as Guest54132
[02:54:49] <kirk_wallace> Hello, I'm running into a problem programming an AVR. While I setup some LED's for trouble shooting, if someone could let me know if this code should work, it might save me some time. SIGNAL (SIG_INT0)
[02:54:49] <kirk_wallace> {
[02:54:50] <kirk_wallace> // Capture Bits 4 - 7, then load OCR0A
[02:54:50] <kirk_wallace> OCR0A = 0b1111000 & (PORTD<<1);
[02:54:50] <kirk_wallace> }
[02:56:34] <kirk_wallace> I want it to read port D, shift the bits up one, then mask the bottom four bits to 0.
[02:57:00] <i_tarzan> not avr skill but which languages does an avr support besides C ?
[02:57:46] <kirk_wallace> I only know of C and Assembler.
[03:29:08] <Valen> your probably best off asking in #avr
[03:35:07] <kirk_wallace> Yeah, I just thought I'd ask. I'm not into the AVR scene yet. I have the LEDs rigged up. I just need to add some code to light the LEDs at key points. I guess I wouldn't learn as much if things worked the first time.
[03:40:09] <Valen> #avr is pretty friendly really
[03:40:27] <Valen> but I think your code does what you say
[03:40:46] <Valen> * Valen has a moderatly accurate USB enabled flashing light AVR on his desk lol
[03:44:02] <Valen> http://failblog.org/2010/12/17/epic-fail-photos-oddly-specific-2/4
[04:14:13] <kirk_wallace> I was looking through the manual for something else and found that PORTD<<1 may need to be PIND<<1 instead.
[04:57:59] <kirk_wallace> It's alive. It helps to read the fine manual.
[05:16:33] <atmega> which avr?
[06:29:32] <kirk_wallace> Oops a little late, but I am using an ATtiny2313(20 pins) , but have an ATmega16 in the wings(40 pins, woo hoo).
[06:40:38] <Valen> * Valen is playing with atmega32u2 usb
[07:34:04] <X704> X704 is now known as WalterN
[07:36:16] <Guest54132> Guest54132 is now known as fragalot
[07:51:48] <mhaberler_> mhaberler_ is now known as mhaberler
[08:02:41] <droid> droid is now known as Guest97780
[08:37:38] <davec> davec is now known as Guest39745
[09:24:13] <davec_> davec_ is now known as Guest5982
[10:54:22] <droid> droid is now known as Guest34322
[12:17:47] <ries_> ries_ is now known as ries
[13:06:14] <jthornton> morning
[14:50:11] <kgartner> how do I turn on all debugging messages to print to dmesg when using halrun?
[15:00:13] <kgartner> never mind... got it figured out
[15:36:37] <droid> droid is now known as Guest47515
[16:37:03] <skunkworks> how come you cannot disable checkboxes in pyvcp?
[16:38:51] <skunkworks> because why? ;)
[16:55:47] <jthornton> because no one told them you can?
[16:56:42] <skunkworks> heh
[16:57:23] <skunkworks> I was just thinking. I was going to add a collet unclamp check box - but wanted to grey it out during spindle operation/auto
[16:57:57] <mhaberler> jthornton: I'm back in fix-wiki-on-demand mode
[16:59:42] <jthornton> I'm still d/l build dep :/
[17:03:52] <jthornton> skunkworks: that makes sense to do that
[17:04:38] <skunkworks> You can disable buttons.. I suppose I could do something fancy with a push-unclamp - push clamp.
[17:05:14] <skunkworks> toggle
[17:06:44] <jthornton> I have two buttons one for clamp one for unclamp for my collets
[17:07:00] <jthornton> they are enabled only in manual...
[17:07:22] <skunkworks> Thought of that also
[17:07:29] <mhaberler> are you doint this in gladevcp?
[17:07:37] <jthornton> just incase I had a brainfart
[17:07:44] <skunkworks> mhaberler: not yet
[17:07:53] <jthornton> LOL, I'm still d/l build-dep
[17:08:01] <mhaberler> I see. WIdget-consulting-on-demand
[17:13:48] <droid> droid is now known as Guest44864
[17:25:48] <jthornton> * jthornton wanders up to vacuum pack the jalapeño cheddar sausage...
[17:51:16] <Jymmm> jthornton: Very rarely have I found cheese IN sausage works/taste too good.
[17:51:36] <Jymmm> only a couple of exceptions
[17:52:21] <Jymmm> jthornton: These are good http://www.foodnetwork.com/recipes/paula-deen/sausage-balls-recipe/index.html
[20:14:15] <Farthen> can anyone tell me why the stepconf wizard behaves different than emc itself? i tell it to invert some ports to make it work with the test in stepconf and then it doesn't work in emc. the opposite is also possible: a setting that doesn't work with the wizard but with emc itself.
[20:15:28] <Farthen> is there some difference between those two and how they communicate with the stepper driver?
[20:17:47] <andypugh> There shouldn't be
[20:17:54] <andypugh> Which version of EMC2?
[20:19:01] <andypugh> I confess it is quite some time since I actually looked at stepconf.
[20:20:01] <Farthen> it's 2.4.6
[20:20:18] <andypugh> OK, I can't really suggest upgrading then
[20:20:38] <Farthen> i'm using a TB6560 card btw
[20:21:07] <andypugh> Which ports are you inverting, and in which part of the GUI?
[20:22:34] <andypugh> I guess you mean the "invert" checkboxes in the "Parallel Port Setup" pane?
[20:22:38] <Farthen> yes
[20:23:09] <andypugh> And your comparison is with hand-editing the hal file to invert ports?
[20:23:23] <Farthen> nope, with inverting different ones
[20:24:17] <andypugh> I am not sure how you are changing settings in "emce itself"
[20:24:36] <Farthen> no, i don't change settings in emc
[20:24:59] <Farthen> i mean that the stepconf wizard has some test buttons where you can test your axes
[20:25:19] <Farthen> when i make it work with those tests 2 out of 3 axes don't work in emc
[20:25:29] <andypugh> So, the issue is that Axis Test in Stepconf works, but when you start emc2 with the generated config, it doesn't work?
[20:25:39] <Farthen> exactly
[20:26:15] <andypugh> My Finger of Suspicion would point at Amp-Enable
[20:26:42] <Farthen> yeah, exactly
[20:26:43] <andypugh> (It can't spell, that finger)
[20:26:59] <Farthen> i need to invert all of them to make it work in emc
[20:27:04] <andypugh> Can you pastebin your hal file to www.pastebin.ca ?
[20:27:15] <Farthen> sure, wait a sec
[20:28:24] <andypugh> Stepconf doesn't do anything to amp-enable pins, I don't think. It may be that they default to low in the Axis test, then get driven high when you run EMC2
[20:30:54] <Farthen> that may indeed be the case here
[20:30:56] <Farthen> http://pastebin.ca/2023050
[20:32:16] <Duckie> hi
[20:32:16] <the_wench> hello Duckie, you have a question?
[20:32:24] <Duckie> yes :)
[20:32:45] <Farthen> i'm still pretty much trial-and-erroring this config to make everything work. if anyone has something better for the TB6560 i would be glad to see it ;)
[20:32:55] <andypugh> ignore her, she's a bot. But feel free to ask :-)
[20:33:11] <Duckie> how make a charge pump (air press for my toolchanger) -> hall and config
[20:33:47] <andypugh> Farthen: I was hoping for the .hal file, that's the stepconf file.
[20:33:52] <Farthen> sorry
[20:33:56] <Farthen> where do i find that one?
[20:34:21] <andypugh> In your config directory, it will be in a directory called the same thing as the machine name
[20:34:30] <Farthen> ah, found it
[20:34:54] <andypugh> Duckie: Do you want the hardware or the software part of the charge pump?
[20:35:16] <Duckie> first software
[20:35:21] <Farthen> http://pastebin.ca/2023053
[20:35:54] <andypugh> There is a charge pump HAL module. All it does is flip the output bit every thread cycle.
[20:36:19] <andypugh> http://www.linuxcnc.org/docview/html/man/man9/charge_pump.9.html
[20:36:47] <Farthen> do you think the board needs it?
[20:37:13] <andypugh> Not your board, no, I was answering Duckie.
[20:38:59] <andypugh> Farthen: I see your problem: xenable is allocated to three separate Parallel port pins, but that means that the "net" linkage keeps over-writing things.
[20:40:12] <andypugh> You either need to wire x-enable, y-enable and z-enable to different pins, or only wire x-enable then split that in hardware to drive all the enable pins.
[20:40:47] <Farthen> in the gui this is marked as power amp ("endstufe aktivieren" in german)
[20:41:19] <andypugh> That might be an interesting translation error then.
[20:41:36] <Farthen> oh well ;)
[20:42:02] <andypugh> Hmm, how can I start up the stepconf wizard in German?
[20:43:18] <Farthen> you should be able to change your LC_ALL variable to "de_DE" any try again
[20:43:24] <Farthen> *and
[20:43:50] <andypugh> Duckie: You need to add to your hal file loadrt charge_pump / addf charge-pump base-thread / net cp charge-pump.out parport.0.pin-10-out (or similar)
[20:43:56] <Farthen> can i somehow set up 3 power amps - per axis one?
[20:44:20] <andypugh> How happy are you withhand editing the HAL file?
[20:44:52] <Farthen> i could do that if the gui isn't capable of doing it, sure
[20:46:00] <andypugh> I can only see one "enable" option in the english version too.
[20:46:41] <Farthen> ok, no problem. if i can get it to work that way then why not? ;)
[20:47:47] <andypugh> Farthen: No guarantees, but http://pastebin.ca/2023060 should give you amp-enable on all three parport pins.
[20:48:23] <andypugh> No, ignore that
[20:49:04] <Duckie> @andypugh i got also a 'sensor for cylinder toolchanger' (if cylinder is up of the air press) use pin1 and pin13 relay for changer pump. how hal code?
[20:49:42] <andypugh> Farthen: http://pastebin.ca/2023062
[20:50:03] <andypugh> (I just changed two of the spare xenable signals to be yenable and zenable
[20:50:25] <Farthen> ok, i will try and find out which ones are the right
[20:52:41] <andypugh> Farthen: Quick primer on the hal "Net" command. The first word after "net" is a signal name, and you can choose anything you like. The other items have to be HAL pins, and have to exist in HAL. You can add one output pin (writers) and as many input pins (readers) to any signal name as you like.
[20:53:21] <JT-Shop> Farthen: http://www.linuxcnc.org/docview/html/hal_basic_hal.html
[20:53:38] <Farthen> ok, thanks
[20:56:57] <JT-Shop> Farthen: if your using Axis you can also test a stepper system with the Calibration window even though it was written for servos
[20:58:08] <Farthen> the calibration window in stepconf?
[20:59:45] <skunkworks> JT-Shop: That is what I did - 2 buttons - clamp/ unclamp and then disabled them if the spindle was on or not in manual
[20:59:50] <skunkworks> worked great - thanks
[21:02:13] <andypugh> JT-Shop: If I may be allowed a moment of pedantry: "superceded (UK) or superseded (US)"
[21:03:09] <andypugh> Superseeded might be one of those bagels that drop bits everywhere :)
[21:05:30] <Farthen> how can i invert one of those power amps?
[21:05:51] <Jymmm> -
[21:05:55] <Duckie> http://pastebin.com/xSzBVfCQ is this OK (with sensor + relay charge-pump) ?
[21:07:06] <JT-Shop> andypugh: where is that superseeded?
[21:07:32] <Jymmm> Superfarmer.com
[21:07:34] <JT-Shop> darn it is not the throw out bearing but something in the double clutch :/
[21:07:51] <andypugh> Farthen: You know, I am not all that sure that my earlier advice was right, it ought to be the case that you can add as many parport pins to the xenable signal as you want
[21:08:25] <andypugh> JT-Shop: In the deprecated command section of http://www.linuxcnc.org/docview/html/hal_basic_hal.html
[21:09:00] <Farthen> but i have 3 amps one for each axis. so i want only those to be enabled that are actually used
[21:09:37] <andypugh> Farthen, now that you have edited the hal file, stepconf would over-write those changes
[21:10:31] <andypugh> But the line in your existing HAL file for pin 9 shows how it is done: setp parport.0.pin-09-out-invert 1
[21:10:51] <Farthen> what is the 1 for?`
[21:11:05] <andypugh> 1 == "true"
[21:11:16] <Farthen> if i leave it out nothing happens?
[21:11:45] <andypugh> I think if you leave it out you get an error, as setp needs a pin and a value.
[21:11:51] <Farthen> ok
[21:12:06] <Jymmm> I wonder if TRUE works too
[21:12:14] <andypugh> invert 0 means "don't invert" invert 1 means "please invert"
[21:12:22] <andypugh> Yes, you can use TRUE
[21:12:37] <Jymmm> what about MAYBE
[21:13:43] <Jymmm> or ONLYONWEDNESDAYS
[21:14:12] <Jymmm> EMC2 READ MY MIND DAMNIT!
[21:15:14] <Farthen> i ommitted that and emc tried to kill my y axis. that's because i asked xD
[21:15:27] <awallin> you don't have the HAL<->brain interface yet??
[21:15:29] <Jymmm> why did you leave it out?
[21:15:49] <Farthen> because i'm silly and don't know anything about this language ;)
[21:16:12] <Jymmm> Well, if he told you what yo use, why wouldn't you use it as is?
[21:16:23] <Farthen> no, that was before you told me
[21:16:50] <JT-Shop> andypugh: LOL I'll fix that
[21:26:22] <andypugh> Duckie: You can't use a function name for a signal name I don't think.
[21:27:00] <Farthen> oh well, my y axis is freaking out. like 30 steps left, 20 steps right, 5 steps right. pretty much random i guess. anyone has any idea? the stepper motor is making strange noises and it really doesn't sound right.
[21:27:02] <andypugh> try something like net cpo <=charge-pump.out instead
[21:27:43] <andypugh> Farthen: It's reading your mind. Now concentrate....
[21:28:05] <Farthen> ok, i'll try
[21:28:18] <andypugh> Farthen: That is with no movement commands?
[21:28:31] <Farthen> that's with a normal movement command in one direction
[21:29:06] <andypugh> Step and direction pins swapped can sometimes do that
[21:29:40] <andypugh> Or step to both step and direction.
[21:30:12] <JT-Shop> * JT-Shop settles down with the 1956 F40 manual to see how a double disk clutch comes apart
[21:30:28] <Farthen> nope, they are correct
[21:31:06] <andypugh> You seem to be assuming that you have been given the correct manual for the version of the driver board you have been sent..
[21:31:23] <andypugh> Was it from china, via eBay?
[21:32:26] <Farthen> exectly. one of those cheap ones. but the provided config works with {insert evil commercially available windows product here}
[21:32:51] <Farthen> *exactly even
[21:33:08] <andypugh> If you mean Mach3, then they are not especially evil, and started with the same code base many years ago
[21:33:53] <Farthen> yes, i meant mach3
[21:35:29] <andypugh> Random movement... Are you sure that all the motor power leads are tight? (And with one of those boards, don't even think of disconnecting a motor power lead with the board powered up)
[21:35:43] <Duckie> euh, what line must be changed?
[21:36:18] <andypugh> Duckie: I get worried at about line 14
[21:37:01] <andypugh> I might be wrong, the difference between _ and - might save the day
[21:37:29] <Farthen> andypugh: i once got it working. but after changing that thing in the hal config my y axis does these weird things
[21:37:39] <andypugh> But I would tend to keep the signal names very different from pin and function names
[21:38:49] <andypugh> Machine -> Halscope
[21:39:01] <andypugh> (Sorry, that was for Farthen)
[21:39:21] <andypugh> Have a look at what your y-enable signal is doing
[21:39:38] <andypugh> (Might as well look at step and dir too)
[21:39:47] <Farthen> i tried inverting it but that doesn't help
[21:40:10] <andypugh> Pastebin your current hal file if you like
[21:40:33] <Duckie> @andypugh got this now http://pastebin.com/xMAHiRJL
[21:40:41] <Farthen> i can but i didn't change anything but inverted x and y power amps according to the "datasheet"
[21:43:40] <andypugh> Duckie: Maybe I am confused, where does this charge pump output go to? Typically a charge pump is a square wave indicating to the safety circuit that the software is alive and in control. If it flatlines (high or low) then it indicates a computer crash, and everything shuts down. Is that your situation?
[21:44:48] <andypugh> Farthen: What is Halscope showing?
[21:45:14] <andypugh> (Set it to watch the actual parallel port pins)
[21:47:21] <Farthen> i'll try tomorrow i guess. i will be trying to understand this "datasheet" a bit more
[21:47:52] <Farthen> (which is not really more but some screenshots of mach3 and a pinout table)
[21:47:53] <andypugh> I doubt there is very much to understand.
[21:48:28] <andypugh> Getting late in Germany (is that where you are)?
[21:49:03] <Farthen> yep. actually not that late but i also have some other stuff to do today
[21:49:39] <Duckie> @andypught charge pump is for my airpress (pneumatics needed-> toolchange)
[21:49:46] <andypugh> Agreed it is not "Linux Late", that happens about 5am.
[21:50:09] <Farthen> i can as well stay up until 3am or later for some long hacking sessions but this is not one of these days i think
[21:50:59] <andypugh> Duckie: What sort of signal do you need, and when? I think we have set off in the wrong direction
[21:51:03] <Farthen> going to bed before dawn is lame, i know xD
[21:51:16] <andypugh> Depends who Dawn is
[21:51:30] <JT-Shop> unless you get up before dawn
[21:52:19] <Farthen> you, that should lead to a strange time paradox
[21:52:23] <Farthen> *yeah
[21:53:50] <andypugh> I do quite a few day-trips to Germany from the UK. Getting up before I have gone to sleep is fairly normal those days
[21:54:33] <JT-Shop> Ouch!! new clutch disks and dual clutch pressure plate is $425
[21:54:55] <andypugh> JT-Shop: What vehicle?
[21:55:21] <andypugh> If it makes you feel better, an alternator for my bike is $1000
[21:55:38] <andypugh> (Probably for yours too)
[21:56:33] <JT-Shop> Ferguson F40 tractor
[21:57:00] <JT-Shop> I think I'll just have a few glasses of wine and it will get ordered :) with no pain
[21:57:55] <JT-Shop> I know the manual for my bike was $150 and 4" thick... I hope I never have to get an alternator
[21:57:59] <andypugh> I would examine the parts first.
[21:59:07] <JT-Shop> I did take it apart and it has been "fixed" once or twice so by the time I "fix" it (right of course) and purchase the two new clutch disks I just have to toss $200 more in the pot for new
[21:59:59] <JT-Shop> the bellville springs look kinda worn and they are 11" in diameter
[22:00:10] <skunkworks> http://imagebin.org/128515
[22:00:45] <skunkworks> other than it looks like a 6 year old setup the xml
[22:01:08] <andypugh> JT-Shop: Are the Bellevilles included in that $425 though?
[22:01:12] <JT-Shop> if a 6 year old would do my graphics they would look better
[22:01:20] <JT-Shop> andypugh: yes complete assembly
[22:01:52] <JT-Shop> and it takes 2 days to take it apart and put it all back as you have to split it in two large parts]
[22:03:05] <andypugh> Seems I exaggerated the alternator cost, by assuming that the $ cost would depend on exchange rate, rather than actually being fewer $ than £ (grump) http://www.mrcycles.com/fiche_section_detail.asp?section=49747&category=Motorcycles&make=YAMAHA&year=2004&fveh=1221 and http://www.bodgesoc.org/OhDear.jpg
[22:03:41] <JT-Shop> anyway I can make a new throttle bracket while I wait as the old one has so much pitting the friction disk would not hold the throttle setting
[22:06:02] <JT-Shop> oh you like to drag your knee when riding with that one
[22:06:13] <Duckie> i doesn't know what signal, (is it for the tool come out the mill -> with air)
[22:08:18] <JT-Shop> WOW 450lbs and 1000cc's that is a rocket for sure
[22:08:38] <JT-Shop> mine is 850 lbs and 1800cc's
[22:10:58] <andypugh> I only drag a knee on the track. But 180kgs and 180hp is fun.
[22:12:05] <andypugh> Less fun with 5" of snow though. It is parked at work as I took a test car home to check out a logger, and now a dump of snow has happened and I am not at all sure how I am going to repatriate the the bike before the new year.
[22:13:22] <andypugh> I am really quite tempted to buy a set of screw-in spikes for the little knobbly-tyred bike.
[22:14:32] <andypugh> Sorry Duckie I missed that in the banter
[22:15:21] <andypugh> I think you probably don't need a charge-pump at all. Why did you use that phrase?
[22:18:10] <JT-Shop> andypugh: I did that when I was a kid up in Alaska on a Honda 50 Super Sport with wood screws and another tube for a liner
[22:19:11] <andypugh> I was thinking about a more expensive option: http://www.supatracks.com/best-grip-screw-in-ice-studs.html
[22:20:01] <JT-Shop> I had to make do back in 68
[22:22:03] <Duckie> thought i must use this (note: i am a beginner user) any doc how?
[22:29:22] <andypugh> Duckie: Why "Charge Pump"? It is hard to point you to the correct docs without a better idea what you wish to do.
[22:31:12] <Duckie> thought the word mean for something like air pump so pneumatic.
[22:31:59] <Duckie> i need air for change the tool in the racked toolholder.
[22:33:04] <andypugh> Ah! No, that is completely the wrong thing.
[22:33:57] <andypugh> A "charge pump" means electrical charge, and is a safety circuit concept.
[22:34:28] <andypugh> What do you actually want to happen, and when?
[22:35:20] <Duckie> when my toolchanger is on the position of t1 the air go on, release the tool.... and pick tool.
[22:35:31] <andypugh> (And sorry for telling you to edit your HAL file in ways that are not at all useful)
[22:36:11] <andypugh> What sort of toolchanger?
[22:36:41] <Duckie> racked toolchanger (i use that patch, :)
[22:36:46] <andypugh> Toolchangers are rather a complex subject, as they all tend to be rather different.
[22:37:27] <andypugh> The patch is a bit unsupported, there are reasons it is not in the main version.
[22:37:35] <JT-Shop> there needs to be some kind of way to use a comp or something for all the funny tool changers out there
[22:37:57] <Duckie> -> emc 2.4.6 with patch is update on 7dec 2010 .
[22:37:58] <Duckie> http://wiki.linuxcnc.org/emcinfo.pl?RackToolChanger
[22:38:22] <andypugh> I am suggesting the possibility of calling a G-code sub on M6 on emc-devel at this very moment
[22:38:47] <JT-Shop> that would work well I think
[22:39:12] <andypugh> The problem is that it is not easy for a comp or Classic Ladder routine to move an axis
[22:39:17] <Duckie> like this? g00 m06
[22:39:54] <JT-Shop> Duckie: you have a different X location for each tool as I recall??
[22:39:54] <andypugh> No, more that M6 would call a G-code sub defined in the ini file
[22:42:12] <andypugh> Duckie: Simplest at the moment is to just not use M6 for a toolchange. Write yourself a G-code subroutine that moves the axes and operates the air valves (You can set output pins from G-code http://linuxcnc.org/docs/html/gcode_main.html#sec:M62-to-M65 ) then does the M6 G43 to set the offsets
[22:44:25] <Duckie> hm, i will check this doc and come maybe tommorow back. (time to sleep here), thanks and bye