#emc-devel | Logs for 2008-03-12

[04:59:17] <SWPadnos_> SWPadnos_ is now known as SWPadnos
[12:53:58] <CIA-22> EMC: 03jepler 07v2_2_branch * 10emc2/src/emc/usr_intf/stepconf/stepconf.py:
[12:53:58] <CIA-22> EMC: * correction to fix for SF#1906641: the first fix caused a TypeError exception
[12:53:58] <CIA-22> EMC: * do not warn that a file was 'modified' when it doesn't exist
[13:49:36] <jepler> I wonder if I should set dither-pwm by default in stepconf's spindle speed control
[13:50:31] <cradek_> definitely IMO
[13:50:45] <cradek_> or maybe use pdm?
[13:50:49] <cradek_> cradek_ is now known as cradek
[13:51:01] <jepler> well -- there's a spot to enter the carrier frequency; the box says next to it "enter 0 for PDM mode" or something like that
[13:51:07] <jepler> no user will know what that means, of course
[13:51:32] <cradek> hmm...
[13:51:32] <jepler> but these spindle interfaces that are intended for mach seem to specify a frequency, I dunno what they would do with PDM. throw a fit, maybe
[13:57:21] <fenn> checkbox for pdm grays out the box
[13:57:32] <CIA-22> EMC: 03jepler 07v2_2_branch * 10emc2/src/emc/usr_intf/stepconf/stepconf.py: fix 'offset' value calculated by stepconf for spindle speed control
[13:57:32] <CIA-22> EMC: 03jepler 07v2_2_branch * 10emc2/debian/changelog: fix 'offset' value calculated by stepconf for spindle speed control
[14:05:09] <CIA-22> EMC: 03jepler 07v2_2_branch * 10emc2/src/emc/usr_intf/stepconf/stepconf.py: dithered pwm is generally preferable since the pwm signal is so low-resolution
[14:05:10] <CIA-22> EMC: 03jepler 07v2_2_branch * 10emc2/debian/changelog: dithered pwm is generally preferable since the pwm signal is so low-resolution
[14:06:24] <CIA-22> EMC: 03jepler 07TRUNK * 10emc2/src/emc/usr_intf/stepconf/stepconf.py: merge spindle speed fixes from branch: pwmgen offset, dither-pwm
[14:06:39] <jepler> I hope I got all that right :-P
[14:08:49] <steves_logging> steves_logging is now known as steve_stallings
[14:09:26] <Guest931> :)
[14:09:30] <Guest931> woh
[14:09:35] <Guest931> Guest931 is now known as skunkworks_
[14:09:43] <skunkworks_> Hi steve
[14:09:59] <steve_stallings> Just awakening to the PWM discussion. The PMDX-106 spindle interface does not directly filter the PWM signal, rather it is measured by a microcontroller.
[14:10:09] <steve_stallings> Hi all
[14:10:28] <cradek> hi steve
[14:11:05] <steve_stallings> Since the PWM is often too low in frequency for effective analog filtering, we measure it and recreate a higher frequency equivalent that is more easily filtered.
[14:11:46] <jepler> steve_stallings: in that case, will dither-pwm be beneficial or harmful?
[14:11:52] <cradek> is a high/low ratio measured (which would make all the pwm/pdm tricks work), or is it some other thing that is more dependent on the particular features of the signal?
[14:12:10] <steve_stallings> I don't know what dither would do to this approach, but it could be interesting because we consider sequential values that vary too much to be a possible injection of noise and suppress the "invalid" readings.
[14:13:24] <cradek> hmm, I would have never thought of this
[14:14:54] <cradek> '
[14:16:44] <steve_stallings> True, it is not obvious. It evolved from trying to work with low frequency software generated PWM signals.
[14:17:05] <jepler> with dither-pwm, 100 microsecond base thread, and 100Hz carrier, you might have 2.5ms on + 7.5ms off in one cycle then 2.6ms on + 7.4ms off in the next cycle, if the actual desired duty cycle is about 25.5%.
[14:17:29] <cradek> yeah, all these schemes try to work around that same problem; no surprise that they may be incompatible with one another
[14:18:01] <steve_stallings> As long as dither is user selectable, things should be OK.
[14:18:53] <jepler> I wasn't adding a user interface check button, so a user wishing to change the dither-pwm setting would have to put a line in the custom.hal file.
[14:19:49] <steve_stallings> The I would beg for no dither to be the default, for my own selfish reasons of course.
[14:20:32] <jepler> dither is not the same as pdm mode -- it's clear enough from the datasheet that the pdm mode wouldn't work, but I'm not sure what problem dither poses
[14:21:11] <cradek> you could get aliasing
[14:21:21] <cradek> at certain speeds
[14:21:32] <cradek> (I assume the uC doesn't time every pulse)
[14:21:45] <jepler> I see that you can choose between a 1-second and 3-second PWM filter response on the pdmx-106, that should be enough time for things to even out
[14:21:48] <steve_stallings> Our approach to the resolution problem is to recommend running higher resolution and lower frequency, with 10 bits resolution at 10 Hz being the extreme.
[14:22:53] <jepler> cradek: depending on the micro, it's probably quite easy to count the "high" and "low" time of an input signal using pin change interrupts and free-running counters
[14:23:01] <steve_stallings> The filter response is on the output side in the analog integrator. Its purpose is to prevent blowing fuses in Seig DC motor controls that do not like sudden speed changes.
[14:23:24] <steve_stallings> Jelper - that is exactly what we attempt to do.
[14:23:50] <cradek> seems like you would get all the benefit from dither then...?
[14:24:02] <cradek> or I am missing something.
[14:25:05] <cradek> qsave
[14:25:09] <cradek> err sorry
[14:25:13] <jepler> if the micro correctly sees a 25% duty cycle and generates a 20kHz carrier, 25% PWM output for 10ms; then sees a 26% duty cycle and generates a 20kHz carrier, 26% PWM output for 10ms, and you filter *that* with a 1-second time constant it seems like you'd get a pretty good 25.5% filtered output.
[14:25:18] <steve_stallings> We measure EACH pulse and compare to the previous history. If it varies too much it is declared invalid and ignored. If Two pulses fail the test we "re-acquire".
[14:25:34] <jepler> ah, I see
[14:25:50] <jepler> and +- 100 microseconds length difference might be too different?
[14:26:00] <steve_stallings> However, I think the "fail" threshold is 10% or more. I will have to ask Bob.
[14:26:36] <skunkworks_> You ask the Break Out Board directly? ;)
[14:27:00] <steve_stallings> Normal S word changes will trigger the fail and re-acquire sequence.
[14:27:22] <cradek> I wonder how this would work with lathe CSS
[14:27:28] <jepler> yeah I was wondering that too
[14:28:10] <steve_stallings> Good question. I was thinking that the treshold for fail would allow slow tracking without a re-acquire.
[14:28:16] <cradek> I have a second or so response on mine. In some places I've had to put pauses to let the spindle come up to speed
[14:28:42] <cradek> can't just rapid in to a very small radius and start cutting
[14:28:58] <cradek> I suppose you need some serious spindle acceleration for good CSS response
[14:28:59] <steve_stallings> That is normal, even on big iron.
[14:30:01] <cradek> I hate to ask an off-topic question but do you know if mach does CSS? If not, it's probably not well tested on the various spindle controls people sell
[14:30:16] <steve_stallings> skunkworks - can you rephrase your question, we just monitor a control signal, typically a pin from the parallel port, or breakout board
[14:30:19] <jepler> "Indeed, the G96 command will tell Mach 3 to vary the speed continuously with diameter"
[14:30:47] <cradek> ah. wonder if people use it. (I have not seen it on youtube videos, but that's a very small sampling)
[14:30:58] <jepler> the duty cycle differences from dither-pwm are the smallest possible, so if continuously varying the duty cycle for css works, then varying it by +-1 BASE_PERIOD for dither-pwm should too
[14:31:31] <jepler> cradek: that's from http://www.cncathome.com/vfd.html which apparently has a video (I didn't try to view it)
[14:31:38] <steve_stallings> I think Mach does it, but like the threading it is considered to work if it seems to, instead of being checked with gauges.
[14:32:25] <cradek> hey, don't set the bar too high. I've still not bought any go-nogo thread gauges although I think about it every once in a while.
[14:32:52] <steve_stallings> jelper - OK, guess I was over-reacting because I was thinking of PDM initially.
[14:33:24] <skunkworks_> steve_stallings: did you see this? http://www.youtube.com/watch?v=ACvRilmIKDQ
[14:33:26] <jepler> hah
[14:33:40] <steve_stallings> I could bring some to the next Fest... 8-)
[14:33:54] <cradek> steve_stallings: if I have my lathe, that would be great
[14:34:39] <jepler> steve_stallings: if you have emc near one of your -106 boards and it's set up to use pwmgen for speed control you should be able to test it real easy. Run emc, open a terminal, run 'halcmd -kf', then 'setp pwmgen.0.dither-pwm 1'.
[14:34:39] <steve_stallings> Remind me as time nears. I plan to be there, and Matt says he is coming this year.
[14:35:22] <cradek> cool. haven't seen matt for a while.
[14:35:40] <steve_stallings> Currently everything is near everything, as we have finally started moving into our new offices and it is all in a big pile. 8-(
[14:35:54] <jepler> steve_stallings: oh .. that makes it a bit complicated then
[14:36:32] <steve_stallings> Todays task is to get the phone system alive at the new place.
[14:36:38] <skunkworks_> steve_stallings: sorry - I was trying to be funny.. BOB = Break Out Board.. you said you needed to ask bob about the 10% diviation.
[14:36:57] <steve_stallings> Ok, need more coffee...
[14:37:40] <steve_stallings> Bob is our software guru, and becoming a CNC weenie slowly but surely.
[14:38:47] <skunkworks_> cradek: does css work with threading - like - could it be used on jmkasunich variable dia/pitch threading?
[14:39:31] <cradek> I think so
[14:39:46] <cradek> although he would have to switch belts during the cut :-)
[14:39:58] <jepler> I am pretty sure we did a css+threading demo at fest
[14:40:11] <steve_stallings> That is a wild part being cut in JMK's video. Is it the one that raised the question about velocity bumps?
[14:40:46] <cradek> yes
[14:41:04] <steve_stallings> Evil problem. Did you figure it out?
[14:41:19] <cradek> well, it's considered to work because it seems to. I am trying not to look at the plots. (haha)
[14:42:09] <cradek> not really. (it's a hard problem)
[14:42:38] <skunkworks_> is it still looking like there needs to be more pid than just p?
[14:42:38] <steve_stallings> Adding PID to the slaved axis could get interesting.
[14:43:13] <cradek> my gut says that would help. but what a pain.
[14:43:23] <skunkworks_> heh
[14:43:47] <cradek> currently it's pretty easy to get "ringing" around the target, especially on a sluggish machine that can't really keep up very well
[14:43:55] <jepler> I'm too used to watching the sherline turn parts -- compared to that, jmk's lathe can really take off material
[14:44:04] <steve_stallings> Especially since most software PID routines assume constant sample interval time. Art overlooked that with his PID spindle speed control and it is awful.
[14:44:12] <cradek> jepler: the sherline can easily do that (but not in steel)
[14:45:17] <jepler> I noticed PID spindle control on the screenshots on that cncathome.com page I pasted earlier and wondered how well it worked
[14:45:29] <cradek> actually I watched a guy cut 0.1" radius off steel, all day long, at a NAMES demo
[14:45:33] <jepler> the slow response time of spindle motors makes it hard to have much "P"
[14:45:39] <cradek> he was selling his indexable tooling
[14:46:26] <jepler> (says the guy in the room who has the least experience at tuning any PID loops)
[14:46:55] <steve_stallings> The I and especially the D go crazy when delta-T is not a constant. Art was using one revolution as delta-T because that is what was available with index only.
[14:47:18] <cradek> sounds very hard to do with what's available
[14:47:27] <fenn_> i'm not really understanding why you need PID to slave one axis to another, why not just instantly set the commanded position to where you want it to be and let individual joint PID take care of it?
[14:48:13] <cradek> fenn_: because you'll get following errors if you don't keep within (near) the axis constraints
[14:48:52] <cradek> it's normal to take some time to catch up - that's why you start outside the thread - and you don't want to generate FEs or trip your amps whenever you start a threading pass
[14:49:15] <cradek> (and also, steppers don't have pid)
[14:50:39] <cradek> this is nice (and emc can do it): http://www.youtube.com/watch?v=DHlmkRnVdUs&NR=1
[14:53:11] <jepler> but we don't have a rigid tapping with peck cycle
[14:53:31] <jepler> hahah the comment says "it doesn't have any music!"
[14:53:33] <cradek> no, you'd have to use one G33.1 for each peck
[14:53:52] <cradek> (would be very simple to program that cycle)
[14:54:06] <skunkworks_> oloop :)
[14:55:45] <fenn> i'm going to strangle this dsl modem
[14:56:14] <jepler> fenn: I know how you feel
[14:57:50] <steve_stallings> looks like the modem is winning
[15:07:59] <steve_stallings> steve_stallings is now known as steves_logging
[15:20:27] <SWPadnos> jepler, I tried to fix that offset issue in stepconf last night, and I was going to do something else with the UI (like put in a selection for the PWM type), but I couldn't load the glade design
[15:20:48] <SWPadnos> using glade-3 I got a coredump
[15:21:01] <alex_joni> SWPadnos: meh, you need to do that by hand
[15:21:19] <SWPadnos> using glade-2 it loaded, but there was just one window and one dialog, very small size with no controls in them
[15:21:29] <SWPadnos> alex_joni, no way man, that's a visual design thing!
[15:21:51] <SWPadnos> I'm not going back to the mid '80s for GUIs :)
[15:22:43] <SWPadnos> err - or GUI design
[15:26:27] <alex_joni> suite yourself.. do it the mid 2000's way
[15:26:33] <SWPadnos> heh
[15:26:49] <alex_joni> keep trying to load it in a GUI designer for 4-5 days, then going back to the 80's way
[15:26:53] <SWPadnos> I didn't look at the contents of the file, it may be simple enough to change
[15:34:17] <jepler> SWPadnos: huh that's not good news
[15:34:51] <jepler> I use dapper, glade-gnome /usr/bin/gnome-2 to edit the stepconf.glade and I don't think it's ever crashed on me
[15:35:00] <jepler> if you have the non-gnome glade-2 that could explain why it doesn't load right
[15:35:03] <jepler> dunno about glade-3
[15:35:05] <SWPadnos> hmmm
[15:35:26] <SWPadnos> glade-2 didn't crash, but there were obvious issues with the loaded data
[15:35:47] <SWPadnos> I'm not sure if it's the glade-gnome-2 or glade-2 package. I'll check later
[15:41:14] <SWPadnos> I should mention that this is on 7.10, just so you know it isn't your fault :)
[15:44:22] <jepler> fwiw I am sure it's not my fault
[15:44:28] <SWPadnos> heh
[15:44:40] <jepler> but if the gtk/gnome people can't write decent software to save their lives, that can still make things uncomfortable for me
[16:06:04] <alex_joni> heh
[20:06:39] <jepler> hours later, and I *finally* figured out what steves_logging meant when he talked about pid with a varying time step
[20:08:14] <SWPadnos> heh
[20:08:28] <cradek> we can't all be the quickest one, jepler
[20:08:49] <SWPadnos> luckily, we also can't all be the slowest one :)
[20:08:59] <cradek> and thank goodness for that
[20:09:05] <SWPadnos> indeed
[20:09:14] <SWPadnos> I like to keep that one on a rotation
[20:46:47] <skunkworks> mach is evil. ;)
[20:46:59] <SWPadnos> Word is evil. mach can't compete
[20:47:02] <SWPadnos> :)
[20:47:54] <SWPadnos> (my wife and I just tried and failed to find a way of having a header/footer on page 1, but not on other pages)
[20:47:54] <cradek> evil?
[20:48:04] <skunkworks> Heh - I 'dislike' work
[20:48:06] <skunkworks> word
[20:48:08] <skunkworks> and work
[20:48:15] <SWPadnos> I dislike working with word
[20:49:04] <skunkworks> I always get formating questions for word and excel at work... I send my helper.
[20:49:52] <cradek> SWPadnos: \thispagestyle{headings}
[20:50:02] <SWPadnos> hmmm. I'm not sure that works in Word ;)
[20:50:24] <SWPadnos> I did recently find out how to do it in OpenOffice, and it's easy once you get used to it
[20:50:42] <skunkworks> he is fresh out of the university.. Knows all that useless stuff
[20:51:25] <cradek> what is university for if not to learn the minutia of microsoft products
[20:51:38] <skunkworks> :)
[20:51:46] <skunkworks> hmmm - need more coffee
[20:56:58] <SWPadnos> heh. the band "Was, Not Was" had a single called "I Feel Better Than James Brown" :)
[21:16:39] <alex_joni> SWPadnos: you need a section break
[21:16:51] <SWPadnos> ?
[21:16:51] <alex_joni> insert->break->section break (at the end of page 1)
[21:17:13] <SWPadnos> in Word?
[21:17:18] <alex_joni> then on the second page you can look at header/footer and uncheck a thingie which says connect to header/footer from page 1
[21:17:26] <alex_joni> (I think it says previous section)
[21:17:28] <alex_joni> yeah, in Word
[21:18:02] <SWPadnos> I was just surprised that there was no "Page Layout" menu/dialog (other than the one in the File menu, which we assumed was for printing)
[21:18:53] <alex_joni> let's move this from #emc-devel .. it's not really on topic :P
[21:19:00] <SWPadnos> heh
[21:19:30] <alex_joni> and we'll end up with jeff contributing to openoffice eventually :P