#emc-devel | Logs for 2007-08-20

[15:15:51] <cradek> * cradek hides under the rug
[15:16:02] <alex_joni> heh
[15:16:08] <alex_joni> actually I'm not sure it does
[15:16:15] <alex_joni> but I was kinda hoping you would tell me :)
[15:16:42] <alex_joni> I started working on the stuff jeff proposed for digital inputs
[15:16:48] <alex_joni> and one of the things is wait for input
[15:17:13] <alex_joni> I got the command down to the motion controller, but I'm not quite sure where it would fit in best
[15:17:29] <alex_joni> I think it needs to get on the tc queue
[15:18:03] <cradek> I don't understand what it should do
[15:18:23] <alex_joni> say you have the following g-code:
[15:18:25] <alex_joni> G0 X10
[15:18:30] <alex_joni> G1 Y10
[15:18:31] <alex_joni> ...
[15:18:41] <alex_joni> M66 P0 E1 L1 Q4
[15:18:53] <alex_joni> the M66 is wait-on-input
[15:19:20] <alex_joni> the program execution needs to be frozen, until the input selected by P0 (motion.digital-in-00) turns true
[15:19:46] <alex_joni> Q4 defines the timeout to wait, if it didn't happen in 4 seconds, execution of g-code should resume
[15:21:18] <alex_joni> does that make sense?
[15:21:29] <cradek> sure
[15:21:32] <cradek> what are E,L?
[15:22:04] <alex_joni> E is type of action to wait for (rise, fall, active high, active low), and L selects between analog and digital inputs
[15:22:26] <cradek> ok
[15:22:30] <alex_joni> maybe that one (analog/digital) should go away, as the rise/fall/high/low makes sense for digital mostly
[15:22:47] <cradek> true
[15:22:48] <alex_joni> action also has immediate return
[15:23:04] <alex_joni> 0-immediate, 1-rise, 2-fall, etc
[15:23:30] <cradek> brb (I'll rad back)
[15:23:31] <cradek> read
[15:24:07] <alex_joni> there are a couple of loose ends for me:
[15:24:20] <alex_joni> 1. how does motion tell task that it finished a movement/command
[15:24:52] <alex_joni> 2. when the wait-for-input command is received from the interpreter it's not time yet to perform it, so I think it must go on the TP queue
[15:25:53] <alex_joni> I tried to document M66-M68 here: http://www.linuxcnc.org/docs/devel/html/gcode/main/index.html#sec:M66-to-M68:
[15:37:52] <skunkworks> alex_joni: that is going to be really cool.
[15:42:00] <cradek> I think you should just not queue past these, and handle them in task
[15:42:59] <alex_joni> past these is no issue
[15:43:04] <alex_joni> I solved that already
[15:43:14] <alex_joni> the problem is with the already queued commands motion has
[15:44:00] <alex_joni> task needs to wait for those to finish executing, before it begins to handle M66
[15:44:25] <cradek> ok I understand
[15:44:42] <cradek> I'd ask alex, he knows how task works better than anyone
[15:44:51] <alex_joni> unfortunately
[15:45:01] <jepler> isn't this what EMC_TASK_EXEC_WAITING_FOR_MOTION_AND_IO is for?
[15:45:14] <cradek> yes I think so
[15:45:24] <alex_joni> I think so too, but ain't quite sure :)
[15:46:07] <alex_joni> cradek: so you say task should keep checking the Io from motion (it's in emcmotStatus already) from time to time
[15:46:47] <alex_joni> hmm.. sounds like a good idea ;)
[15:47:24] <cradek> look at TRAJ_DELAY_TYPE, it does the EMC_TASK_EXEC_WAITING_FOR_MOTION_AND_IO
[15:47:41] <cradek> then when the delay is finished, it sets EMC_TASK_EXEC_DONE which lets it continue
[15:48:24] <alex_joni> case EMC_AUX_INPUT_WAIT_TYPE:
[15:48:25] <alex_joni> return EMC_TASK_EXEC_WAITING_FOR_MOTION_AND_IO;
[15:48:43] <alex_joni> seems ales does know some parts of this
[15:48:45] <alex_joni> too bad I didn't ask him :D
[15:48:51] <jepler> ales?
[15:48:57] <jepler> do you mean zles?
[15:49:02] <alex_joni> zles?
[15:49:06] <alex_joni> yeah zles
[15:49:10] <alex_joni> my evil twin
[15:51:03] <alex_joni> oh, the EMC_TRAJ_DELAY hint is a beautiful one
[15:51:32] <alex_joni> I just need to add EMC_TASK_EXEC_WAITING_FOR_DELAY for the postcond, and EMC_TASK_EXEC_DONE when it finished :)
[15:52:01] <cradek> EMC_TASK_EXEC_WAITING_FOR_ZLES
[15:52:12] <alex_joni> :P
[15:52:41] <alex_joni> nice, if I can find the time I'll finish it tonight
[15:54:04] <cradek> I think the default should be digital immediate
[15:54:15] <cradek> (you don't say what the default wait type is)
[15:55:03] <cradek> wait a sec, aren't M67/M68 redundant if the default is wait type 0?
[15:55:41] <alex_joni> yeah, kinda
[15:55:52] <jepler> I don't understand the purpose of WAIT_TYPE_IMMEDIATE, nor how any wait works with an analog value
[15:56:04] <alex_joni> jepler: it doesn't work with analog
[15:56:17] <alex_joni> and the WAIT_TYPE_IMMEDIATE can be removed from M66
[15:56:24] <jepler> M66 E1 seems to specify an analog value .. ?
[15:56:30] <cradek> how about M66 Px for digital input x, M66 Ex (or Qx) for analog input x
[15:56:36] <alex_joni> it exists because M66, M67 and M68 use the same CANON call
[15:56:51] <cradek> disallow P and E(Q) in the same block
[15:56:53] <alex_joni> jepler: you'll get an error message if analog and not immediate
[15:57:25] <cradek> sorry, we can tweak the gcode api later
[15:57:34] <alex_joni> hmm.. I only did it this way because it seemed reasonable to me at the time
[15:57:40] <cradek> (it should be as simple as possible)
[15:57:47] <alex_joni> cradek: I can surely change it at any time
[15:57:58] <alex_joni> I wanted to have M67 and M68 as simple as possible
[15:58:05] <alex_joni> (the most common used ones imo)
[15:58:25] <alex_joni> and have M66 as configurable as possible to use all other possibilities
[15:58:36] <cradek> yes but it could be just as easy with one mcode and optional (more complex) words
[15:59:03] <alex_joni> I think you are right :)
[15:59:12] <alex_joni> so.. just have M66
[15:59:28] <alex_joni> M66 Px is digital input, immediate return value to #5398
[15:59:29] <cradek> yes I think so
[15:59:47] <alex_joni> M66 Ex is analog input, immediate return value to #5399
[16:00:02] <cradek> why different #?
[16:00:30] <alex_joni> I know I had a reason.. but it eludes me right now
[16:01:11] <alex_joni> can't come up with one right now
[16:01:39] <alex_joni> and M66 Px Ly Qz (digital, wait type and timeout)
[16:01:57] <alex_joni> value into #5399, -1 if timeout
[16:02:09] <alex_joni> does that sound better?
[16:02:17] <cradek> yes
[16:02:23] <alex_joni> okie dokie
[16:02:36] <cradek> an error if E word and L word together
[16:02:42] <cradek> an error if P and E
[16:03:15] <cradek> an error if (Q || L) && !P
[16:03:16] <cradek> etc etc
[16:03:30] <alex_joni> right
[16:08:41] <jepler> maybe leave "rising" and "falling" out of the first revision
[16:08:52] <jepler> I think they will turn out to be unneeded
[16:09:01] <jepler> I know I suggested them in the first place :P
[16:09:11] <cradek> haha
[16:09:24] <alex_joni> jepler: those are actually more interesting for analog
[16:09:33] <alex_joni> but then you need to specify a treshold
[16:09:35] <cradek> "to go to" for level trigger is imprecise language, it implies an edge/transition
[16:10:08] <alex_joni> rise for digital means go to high
[16:10:17] <alex_joni> but if the input was already high.. that wouldn't be true
[16:10:57] <cradek> yes I understand the intent, I'm being pedantic about the language, sorry
[16:11:05] <cradek> I'll help fix it later if it needs fixin'
[16:11:31] <alex_joni> that's what I was after
[16:11:37] <alex_joni> :P
[16:13:03] <fenn> you can do all that fancy stuff with hal blocks (?)
[16:14:01] <fenn> alex_joni: can you get more than one input at once? like move to x y z, do something when a switch closes
[16:14:09] <fenn> do something else based on x y z
[16:14:45] <alex_joni> you can write :
[16:14:47] <alex_joni> M66 P0
[16:14:51] <alex_joni> #1=%5399
[16:14:53] <alex_joni> M66 P1
[16:14:57] <alex_joni> #2=#5399
[16:14:59] <alex_joni> M66 P2
[16:15:01] <alex_joni> #3=#5399
[16:15:13] <alex_joni> G1 x#1 Y#2 Z#3
[16:15:13] <fenn> ok
[16:15:37] <alex_joni> * alex_joni runs home
[16:15:39] <alex_joni> bbl
[17:03:08] <alex_joni> back
[19:12:05] <cradek> AXIS needs a tool table editor (NOT a text file editor)
[19:12:27] <cradek> I bet the nml stuff for that is completely bitrotted
[19:30:24] <alex_joni> it's not existing
[19:30:36] <alex_joni> but if you make a feature/bug report you can assign it to me
[19:30:46] <SWPadnos> hi guys
[19:30:53] <alex_joni> hi SWPadnos
[19:31:02] <SWPadnos> I just read back, and I have a comment on "wait for analog"
[19:31:07] <alex_joni> although I won't touch it before my vacation (starting on thursday)
[19:31:16] <alex_joni> SWPadnos: just a warning first :P
[19:31:36] <alex_joni> you're one of the programmers, so if it's usefull/nice you get to implement it :P
[19:31:37] <SWPadnos> the M code or one of the other words can specify whether it's a "wait for above" or "wait for below" (essentially the same as edge detect)
[19:31:40] <SWPadnos> no problem
[19:31:50] <SWPadnos> just set up a bug and assign it to me :P
[19:31:52] <alex_joni> ha
[19:32:21] <alex_joni> and you need to set trigger level
[19:32:23] <SWPadnos> I'm going to have a lot of other stuff going on in the next few weeks, much of which I'll be able to commit
[19:32:39] <SWPadnos> sure, but that can be another word like L2.75 ...
[19:32:50] <alex_joni> I'd use D which is float I think
[19:32:53] <SWPadnos> I'm not sure how the scale should be set though
[19:33:07] <SWPadnos> ok, you know that stuff waaaaaay better than I do :)
[19:33:20] <alex_joni> I just make it sound that way :D
[19:33:27] <SWPadnos> no, it's true
[19:33:52] <SWPadnos> (I know just about nothing, so if you know anything, you're waaaaaay ahead of me :D )
[19:34:01] <alex_joni> haha
[19:34:14] <alex_joni> not sure what to do first..
[19:34:20] <SWPadnos> on a separate note, my OpenMoko arrived today: http://www.openmoko.org/
[19:34:25] <SWPadnos> it's very cool
[19:34:28] <alex_joni> oh, cool.. I read about it
[19:34:30] <alex_joni> is it shiny?
[19:34:43] <SWPadnos> it's mostly matte, actually
[19:34:51] <SWPadnos> and a little rubbery - good gripping
[19:34:56] <alex_joni> should I continue with what I started? or should I fix the g-code api first?
[19:35:06] <alex_joni> is it big?
[19:35:18] <SWPadnos> I don't know. I think it's best to set down what needs to be done, before doing it
[19:35:21] <alex_joni> continue means working in task :/
[19:35:25] <SWPadnos> but that's often not the way it works :)
[19:35:36] <alex_joni> I'll do the task stuff
[19:35:46] <alex_joni> * alex_joni feels lucky tonight
[19:37:46] <SWPadnos> heh
[19:55:28] <cradek> alex_joni: there was tool table editing stuff in task. It may be gone, or broken, now
[19:55:49] <alex_joni> cradek: can't promise I'll look before my vacation on thursday
[19:56:03] <alex_joni> I'll be gone for 2 weeks +
[19:56:05] <alex_joni> ;-)
[19:59:51] <jepler> have fun!
[19:59:59] <alex_joni> I sure plan to..
[20:00:07] <alex_joni> going to france for 2 weeks
[20:01:03] <SWPadnos> bon journee
[20:01:10] <alex_joni> oh, mersi
[20:01:15] <SWPadnos> pas de quoi
[20:03:44] <jepler> alex_joni: anywhere in particular in france?
[20:05:31] <alex_joni> la rochelle - first week
[20:05:38] <alex_joni> then near le mans the second week
[20:07:36] <jepler> I've never been in those parts of france
[20:07:56] <alex_joni> we want to spend some time at the seaside the first week (actually ocean)
[20:08:01] <jepler> I've been more in the north and east
[20:08:09] <alex_joni> and the second week t visit the castles on the loire valley
[20:08:13] <alex_joni> and probably paris too
[20:08:25] <alex_joni> I thought le mans is a nice spot
[20:10:12] <alex_joni> I also liked the place where we will be staying (http://www.bellefontaine72.com/)
[20:12:11] <alex_joni> yay, it works :D
[20:12:16] <alex_joni> wait on input :)
[20:12:57] <jepler> hmm cool
[20:13:09] <jepler> yes indeed that looks like a nice place
[20:13:25] <alex_joni> not quite cheap.. but we'll be 6 people, so it's ok
[20:15:25] <jepler> alex_joni: I'm jealous .. though I got my fair share of vacations this year
[20:15:46] <alex_joni> I had a couple too.. but this should be nice :)
[20:16:02] <alex_joni> I'll make sure I get lots of photos
[20:29:10] <SWPadnos> here's a photo of the openmoko: http://www.cncgear.com/Files/openmoko.jpg
[20:29:22] <SWPadnos> pardon my ugly hand
[20:29:40] <SWPadnos> and the poor focus :)
[20:29:51] <alex_joni> nice
[20:30:11] <SWPadnos> once I stick a root filesystem on it, it'll even boot ;)
[20:30:23] <SWPadnos> right now it kernel panics
[20:30:35] <alex_joni> you can easily load one with initfs
[20:30:51] <alex_joni> but I guess you know that
[20:31:05] <SWPadnos> there's a remote update utility, I just need to get my Linux machine running so I can use it
[20:31:25] <alex_joni> initfs is the easiest way to get embedded going
[20:31:36] <alex_joni> it sticks the root filesystem right into the kernel
[20:31:53] <SWPadnos> there's an image for it, but the manufacturer forgot to stick the root fs in flash, so I have to do it myself
[20:31:56] <alex_joni> no need to worry about reading the fs, drivers & such
[20:31:59] <SWPadnos> ah
[20:32:16] <alex_joni> then if it can load other stuff it mounts it on top
[20:32:20] <alex_joni> replacing the initfs
[20:34:43] <SWPadnos> I'll be mostly getting this analog board design done in the near future, but after that I;ll play around with this :)
[22:04:58] <alex_joni> jepler: still around?
[22:38:15] <alex_joni> * alex_joni is happy
[22:38:18] <alex_joni> it seems to work as it should :)
[22:41:33] <SWPadnos> yay!
[22:50:43] <alex_joni> SWPadnos: by the time you have your board done, you'll be able to read it from g-code :P
[22:50:49] <SWPadnos> yay!
[22:51:02] <alex_joni> although I doubt you need this
[22:51:14] <SWPadnos> hopefully it'll be in production by the end of the week
[22:51:28] <SWPadnos> nope - I don't need G-code - only HAL and maybe some userspace stuff for serial and remote monitoring
[22:51:38] <alex_joni> that was my thinking too :)
[22:51:44] <SWPadnos> serial comms and remote monitoring, that is
[22:51:55] <alex_joni> who in a sane state of mind would use g-code on a new, clean app :P
[22:52:06] <SWPadnos> heh
[22:52:18] <SWPadnos> especially when the app is a 20000A power supply :)
[22:52:54] <jepler> what, a .02MA power supply? that doesn't sound like a very big number.
[22:53:08] <SWPadnos> not when you put it that way :)
[22:53:29] <alex_joni> MA or mA ?
[22:53:37] <SWPadnos> 0.02 mega-amps
[22:54:04] <SWPadnos> I think it's only 12 or 20 V though, so it's not that high total power
[22:54:22] <alex_joni> who rates PSUs in Mega-Amps?
[22:54:28] <SWPadnos> jepler seems to :)
[22:54:40] <alex_joni> that's 20kA
[22:54:42] <SWPadnos> yes it is
[22:54:51] <alex_joni> at 20V it's 400kVA
[22:54:52] <SWPadnos> that's why G-code is unnecessary ;)
[22:54:54] <alex_joni> not quite the smalles
[22:54:56] <alex_joni> t
[22:55:00] <SWPadnos> yep - like I said, not too big
[22:55:11] <SWPadnos> but still big enough
[22:55:45] <alex_joni> * alex_joni likes power supply cables for machines like that
[22:55:49] <SWPadnos> heh
[22:55:58] <alex_joni> had a ~400kVA spotwelder recently
[22:56:08] <SWPadnos> I think they were talking about paralleling 3 or 4 0000-size wires for that
[22:56:10] <alex_joni> it uses 2x95 mm^2 / phase
[22:56:59] <SWPadnos> some of their power supplies use a 6" x 2" copper bar for the output - with internal coolant conduits
[22:56:59] <alex_joni> or was that 3 x 95 mm^2 ?
[22:57:09] <alex_joni> heh
[22:57:12] <SWPadnos> this is a pulsed DC supply
[22:57:29] <alex_joni> wonder what size steppers jepler puts on that PSU
[22:57:47] <SWPadnos> 0.002MNm ;)
[22:57:59] <SWPadnos> hmmm - that would be a very big stepper, wouldn't it?
[22:58:19] <alex_joni> I recon it would
[23:06:08] <jepler> alex_joni: see, that's the joke -- like people say that their computer is "3000mHz" or has "1024mb" of RAM
[23:06:27] <alex_joni> missed the first line from SWPadnos
[23:07:38] <jepler> this stepper I first hooked up is marked "5V 3.6Ohm 1.38A/phase", dunno the supposed torque
[23:08:16] <jepler> "fingertip pressure at the end of a 3-inch bar" makes it stall, though
[23:09:02] <SWPadnos> strong finger pressure or light finger pressure?
[23:10:54] <jepler> halfway in between strong and light
[23:11:05] <SWPadnos> medium then :)
[23:11:23] <jepler> and actually I'm not stalling it, I'm pushing it from one position to the next while it's trying to hold
[23:11:42] <SWPadnos> ok, so that's even worse, since holding torque is the highest the motor can deliver
[23:12:24] <alex_joni> what voltage?
[23:12:33] <jepler> 24V drive, 5V faceplate rating
[23:13:05] <jepler> this isn't a motor I'm planning to use, it's just the only not-5-wire stepper motor I could dig up on short notice
[23:13:09] <SWPadnos> heh
[23:13:25] <SWPadnos> I mentioned that I have some servos with encoders, right?
[23:13:42] <jepler> yeah, you did
[23:13:52] <jepler> I'm going to start with the steppers, since they were included with the machine I ordered
[23:13:59] <SWPadnos> they're very inexpensive, 500 CPR encoders with index, ~120W continuous
[23:14:04] <SWPadnos> ah - ok
[23:14:18] <jepler> I need something to test pluto_step with anyway
[23:14:18] <SWPadnos> (inexpensive like $10 each or thereabouts)
[23:14:45] <alex_joni> SWPadnos: what rom?
[23:14:48] <alex_joni> rpm even
[23:14:58] <SWPadnos> lemme check - I think they might say ;)
[23:15:08] <alex_joni> roughly is enough
[23:16:16] <SWPadnos> 26V 4.2A 4000RPM
[23:16:36] <SWPadnos> they're Yaskawa "print motor"s - pancake style
[23:16:39] <jepler> * jepler overclocks his 24V power supply to 27V
[23:17:00] <SWPadnos> when I powered one up, I noticed it had a little bit of cogging, so that's a definite downside
[23:17:40] <SWPadnos> hmmm. that could have been the pin hole in the shaft though
[23:18:04] <alex_joni> nice
[23:18:22] <alex_joni> I assume no reduction on it.. right?
[23:18:35] <alex_joni> I mean gearhead
[23:18:46] <SWPadnos> nope - just a 6mm smooth shaft (plus hole)
[23:19:13] <alex_joni> would have been perfect geared down a bit.. but it's a nice one
[23:19:19] <alex_joni> how big is it?
[23:19:26] <alex_joni> palm size?
[23:19:45] <SWPadnos> yep
[23:20:16] <SWPadnos> actually about 17mm thick, and the flange is 120mmacross
[23:20:42] <alex_joni> reminds me of breakfast
[23:20:56] <jepler> alex_joni: for breakfast you eat something 17mm thick and 120mm across?
[23:21:00] <jepler> I prefer a nice bowl of cereal
[23:21:24] <alex_joni> an oversized pancake
[23:21:36] <alex_joni> (can be a stack of pancakes)
[23:22:24] <alex_joni> jepler: you forgot metallic, ~120W, 26V, 4.2A, 4000 RPM
[23:22:53] <alex_joni> well.. gotta catch some sleep
[23:23:08] <alex_joni> only 3.5 hours last night and it's 2:20 again :/
[23:31:24] <jepler> at some speeds you can just tap the bar on the motor and it will reverse
[23:31:27] <jepler> alex_joni: eek