#emc-devel | Logs for 2006-10-18

[15:26:53] <cradek> SWPadnos: about your last email: you could parse stdout
[15:27:06] <cradek> (not that I think it's a good idea)
[15:27:30] <SWPadnos> true, though there would be technical issues with that as well, no?
[15:27:42] <A-L-P-H-A> I gotta drive 140kms today...... getting $150 for it...
[15:27:45] <A-L-P-H-A> :/
[15:27:52] <SWPadnos> ie, you have to spawn the process with stdout directed back to EMC)
[15:27:55] <cradek> well I don't see any fundamental problem do you?
[15:28:06] <A-L-P-H-A> oops wrong chan for random thoughts.
[15:28:08] <cradek> right, sure
[15:28:25] <cradek> if that's the API you couldn't just spew whatever crap you want to stdout
[15:28:28] <SWPadnos> and emc has to know how to interpret whatever is printed
[15:28:46] <SWPadnos> which would be fine, if it generates Gcode or something, but vars, etc ...
[15:29:00] <cradek> one return value per line, interpreted the same way gcode's numbers are
[15:29:02] <SWPadnos> not insurmountable, but still a PITA
[15:29:21] <cradek> sure, like I said, I'm not implying it's a good idea
[15:29:26] <A-L-P-H-A> SWPadnos, no PITA is creating a data wrapper for Mysql results, and make them into objects to use.
[15:29:32] <SWPadnos> how would that work for a graphical program?
[15:29:51] <cradek> same way? I don't understand
[15:30:02] <SWPadnos> ok. I suppose they all have controlling terminals
[15:30:37] <cradek> yes, you can sure have stdout and a gui both.
[15:31:17] <cradek> all this aside, return values of only integers is also a serious limitation
[15:31:21] <SWPadnos> I'm thinking of something like an M code that runs a program where the user chooses a material, for example, and the program sets vars for spindle speed and feedrate scaling based on the chosen material
[15:31:26] <SWPadnos> yes
[15:31:40] <SWPadnos> the ability to return a pose would be nice
[15:31:59] <cradek> yes and I think the only other option you reasonably have is stdout.
[15:32:59] <SWPadnos> that's probably true
[15:33:25] <SWPadnos> and you still want the "normal" return value, for error reporting
[15:33:31] <SWPadnos> (if nothing wlse)
[15:33:34] <SWPadnos> (if nothing else)
[15:33:48] <cradek> yeah emc should be able to give an error if the script does
[15:54:29] <SWPadnos> right
[15:54:37] <SWPadnos> (sorry - wife came home for lunch)
[18:50:45] <alex_joni> hi
[19:25:13] <alex_joni> cradek: so basicly the issue is allowing programs or scripts from outside of emc2 to change some variable inside
[19:25:42] <alex_joni> * alex_joni is talking about M1xx and co again
[19:27:06] <cradek> right I think that's the goal
[19:27:31] <cradek> it's goofy that you can only pass it two numbers, but we take what we can get
[19:28:41] <alex_joni> ok, I was rather thinking the other way around
[19:29:13] <alex_joni> the most simple solution would be to expect a return code from the program/script
[19:29:22] <alex_joni> if it's negative interpret it as an error
[19:29:42] <alex_joni> 0 or positive would be the return value which could be interpreted as a result
[19:29:59] <cradek> yes but it's more useful if the program can return one or more floats
[19:30:01] <alex_joni> maybe have it stored into a variable for further reference
[19:30:05] <alex_joni> I agree
[19:30:14] <alex_joni> but that's a bit more complicated to implement
[19:30:22] <cradek> sure
[19:30:29] <alex_joni> and I'm not necessarely thinking about the emc2 part
[19:30:38] <alex_joni> rather harder to do on the program part
[19:30:45] <cradek> nah I don't think so
[19:30:49] <cradek> #!/bin/bash
[19:30:51] <cradek> echo 1.234
[19:30:53] <cradek> echo 2.345
[19:30:56] <cradek> exit 0
[19:31:31] <alex_joni> right
[19:31:32] <jepler> UNIX exit values range from 0 to 255
[19:31:50] <cradek> in emc: scanf(line, &(array[9900 + i++]))
[19:31:53] <alex_joni> jepler: guess that's it with the idea for exit values
[19:32:10] <cradek> the exit value should signal success (0) or an error (>0)
[19:32:15] <alex_joni> right
[19:32:28] <cradek> another reason to separate it, as swp pointed out
[19:33:09] <alex_joni> I'm not sure about 9900 + i++
[19:33:31] <cradek> there will probably have to be a max number of arguments
[19:33:33] <alex_joni> maybe 5000 + <m-code_nr>*10 + i++
[19:33:52] <cradek> if the user wants them saved, he can copy them to another number
[19:33:53] <alex_joni> if max is 10
[19:34:02] <alex_joni> ok, that works too
[19:34:06] <cradek> no need to waste all that space in the array on this simple thing
[19:34:27] <alex_joni> so then have a fixed number of vars for the return values
[19:34:37] <cradek> a maximum number of them
[19:34:43] <cradek> oh right
[19:35:16] <cradek> this feels so crappy to me
[19:35:46] <cradek> I'm afraid this is our "answer" to an interp-hal interface, and it stinks
[19:36:30] <cradek> but I guess it lets people do some things.
[19:36:51] <alex_joni> lets think about a better interface
[19:37:02] <alex_joni> assuming there are no coding-related limitations
[19:37:36] <alex_joni> we could have hot comments to do some things
[19:38:20] <alex_joni> or even a combination of g-code and hot comment for reading a value, or writing a value
[19:38:47] <cradek> alex_joni: what user request made you interested in doing this?
[19:39:10] <alex_joni> I think it started with the optional block switch
[19:39:19] <alex_joni> oddly enough :D
[19:39:40] <cradek> I don't understand how that's related
[19:39:58] <alex_joni> actually the request was for an external input for block-delete
[19:40:14] <alex_joni> and I said it would be far more valuable if we could do that with O-words and some HAL input
[19:40:35] <alex_joni> but O-words (IF for example) need the data as a variable in the interp
[19:40:52] <cradek> I see
[19:40:56] <alex_joni> so I was thinking how we could get data from HAL to the interp and the other way around
[19:41:15] <alex_joni> other way around is somehow solved (M1xx Px Qy)
[19:41:32] <alex_joni> simply use more M1xx's for more values
[19:41:38] <cradek> M1xx and block delete both break motion queueing don't they
[19:41:55] <alex_joni> I suppose they should
[19:42:25] <cradek> yuck
[19:42:27] <alex_joni> but I'm not 100% sure I grasp motion queueing to the full extent
[19:42:49] <cradek> it's just readahead in the gcode
[19:43:05] <cradek> you can't read past any decision based on these kinds of inputs
[19:43:44] <alex_joni> well.. you can, but any assumption will probably be false
[19:43:55] <alex_joni> it's just like branch prediction in processors :D
[19:48:06] <alex_joni> with this even the thing Guest560 is planning is doable
[20:10:44] <alex_joni> so.. any good ideas ?
[20:14:31] <cradek> no, just what I said earlier
[20:20:13] <alex_joni> how about .. any ideas?
[20:25:42] <cradek> haha, same answer
[20:26:20] <cradek> hey it's that finnish guy again
[20:26:28] <jmkasunich> yeah
[20:26:35] <jmkasunich> maybe finnish longer than I planned
[20:26:47] <jmkasunich> seems finnair is going on strike tomorrow
[20:26:53] <cradek> oh no
[20:27:00] <jmkasunich> oh yeah
[20:27:13] <jmkasunich> it was the lead story on the 11pm news just now
[20:27:30] <jmkasunich> would have been most informative if I actually understood a word of Finnish
[20:27:56] <cradek> good thing you have the internets
[20:28:19] <jmkasunich> good thing rockwell has a travel agent
[20:28:49] <alex_joni> hi jmk
[20:29:05] <alex_joni> when where you supposed to leave back?
[20:30:09] <jmkasunich> friday morning
[20:30:34] <jmkasunich> 10:50 from Vaasa to Helsinki, 14:20 from Helsinki to New York
[20:31:02] <alex_joni> hopefully you'll get the flight :)
[20:31:14] <alex_joni> last time I was in athens they just went on strike..
[20:31:20] <alex_joni> but I made it out of there just before
[20:31:26] <alex_joni> half an hour or so :)
[20:31:39] <jmkasunich> the strike is supposed to start at 1am Thursday (only a few hours from now)
[20:32:32] <alex_joni> 1.5
[20:32:50] <alex_joni> but they usually only strike for internal flights
[20:33:03] <alex_joni> not sure about connecting flights though.. that can be a problem :)
[20:33:35] <jmkasunich> http://www.finnairgroup.com/mediaen/mediaen_5.html
[20:33:46] <jmkasunich> international flights _will_ be affected
[20:34:19] <jmkasunich> one of the local guys we've been visiting suggested a ferry across the gulf from Vaasa to Stockholm ;-)
[20:40:59] <alex_joni> jepler: well.. you'll get to see sweden :)
[20:43:19] <jmkasunich> just what I wanted!
[20:43:36] <SWPadnos> bork bork bork!
[20:44:03] <alex_joni> hi sw
[20:44:13] <SWPadnos> hi
[20:44:15] <SWPadnos> aj
[20:44:19] <jmkasunich> where's Lerneaen_Hydra when I need him?
[20:44:26] <alex_joni> heh.. was too quick for tab-completion :)
[20:44:31] <SWPadnos> heh
[20:44:40] <Lerneaen_Hydra> here I am
[20:44:40] <alex_joni> jmkasunich: what for?
[20:44:45] <SWPadnos> the left hand didn't know how fast the right hand would be :)
[20:44:53] <SWPadnos> Sweden ;)
[20:45:18] <Lerneaen_Hydra> oh, borkland. nifty
[20:45:27] <Lerneaen_Hydra> what brings you to the land of cold?
[20:46:01] <alex_joni> a trip from the land of colder :)
[20:46:09] <Lerneaen_Hydra> oh dear
[20:46:21] <Lerneaen_Hydra> where to? stockholm?
[20:46:42] <alex_joni> 23:34 < jmkasunich> one of the local guys we've been visiting suggested a ferry
[20:46:46] <alex_joni> across the gulf from Vaasa to Stockholm ;-)
[20:47:23] <Lerneaen_Hydra> after stockholm ;)
[20:47:46] <alex_joni> New York >
[20:47:55] <alex_joni> I think :)
[20:48:24] <Lerneaen_Hydra> oh, so not a tour in sweden?
[20:48:31] <Lerneaen_Hydra> (can't say your missing much)
[21:04:37] <SWPadnos> as I recall, Miss Sweden from two years ago was quite lovely ;)
[21:04:54] <alex_joni> * alex_joni will be travelling to sweden in december
[21:05:04] <alex_joni> I heard it's quite awfull weather then
[21:05:14] <alex_joni> Lerneaen_Hydra: skaaene again :)
[21:05:44] <SWPadnos> I suspect that the entire northern hemisphere more or less has bad weather in December ;)
[21:05:48] <Lerneaen_Hydra> oh dear
[21:06:02] <alex_joni> SWPadnos: no snow
[21:06:04] <Lerneaen_Hydra> why not visit real sweden?
[21:06:12] <alex_joni> just dull, and rainy, and coldish
[21:06:16] <SWPadnos> bummer
[21:06:20] <alex_joni> Lerneaen_Hydra: how far north are you?
[21:06:34] <Lerneaen_Hydra> gothenburg
[21:06:40] <SWPadnos> but possibly better than COLD!, with 2 feet of snow on the ground, and no power
[21:07:27] <Lerneaen_Hydra> http://www.giervalk.bravepages.com/Sweden/Sweden-map-1.jpg
[21:07:31] <Lerneaen_Hydra> göteborg on that map
[21:08:19] <alex_joni> so about 4-500 km?
[21:08:27] <alex_joni> I'll be near malmoe
[21:08:50] <Lerneaen_Hydra> oh no no, closer, IIRC
[21:09:09] <alex_joni> this will be only for 1 day or so..
[21:09:18] <alex_joni> maybe when I'll be there longer
[21:09:23] <alex_joni> and it's not so freakin cold :D
[21:09:33] <Lerneaen_Hydra> around 200 or so
[21:09:42] <alex_joni> * alex_joni adds göteborg to his to-visit list
[21:10:10] <Lerneaen_Hydra> haha, it's actually a rather quaint city, no skyscrapers and lots of trams/busses
[21:10:22] <alex_joni> that's nice
[21:10:33] <alex_joni> I really liked Lund (where I'm going again)
[21:10:37] <Lerneaen_Hydra> used to (and still is, but much less) a large port
[21:10:46] <Lerneaen_Hydra> *less today
[21:10:46] <alex_joni> but I've been told it's not really a typical city
[21:11:29] <alex_joni> good night all
[21:12:12] <Lerneaen_Hydra> how so?
[21:13:58] <Lerneaen_Hydra> 'night
[21:16:29] <Lerneaen_Hydra> I'll call it a day too
[21:16:30] <Lerneaen_Hydra> 'night al
[21:19:28] <jmkasunich> dang, missed him
[21:22:34] <skunkworks> jmkasunich: played with pwmgen last night. Had some issues. The consensus is that it is me.
[21:23:20] <skunkworks> jepler gave me a hal file to test tonight
[21:24:06] <skunkworks> btw - hal scope is kick ass
[21:24:51] <skunkworks> first time I have acutally used it :)
[21:25:45] <jmkasunich> what kind of problems did you have?
[21:27:00] <skunkworks> I had 'up' hooked to a pin and had it outputting pwm when m03 was called
[21:27:10] <skunkworks> depending on s word
[21:28:18] <skunkworks> but the second I hooked down to a printer port pin - Up outputted pwm with m03 and m04 and the dowm pin was high all the time.
[21:28:29] <skunkworks> hal scope looked correct though.
[21:29:05] <skunkworks> if that made sense.
[21:29:54] <jmkasunich> down will only generate pwm if the value input is negative
[21:30:25] <jmkasunich> I dunno what m03 and m04 produce - need to halmeter the spindle pins and check that
[21:30:52] <skunkworks> yes - and when you change from m03 to m04 the spindle speed command would go negative.
[21:31:06] <skunkworks> what was going to pwmgen
[21:31:46] <skunkworks> and as long as up was the only pin connected to the printer port - I would only get pwm out of it with mo3
[21:33:14] <jmkasunich> very strange
[21:33:26] <skunkworks> And - the halscope looked correct. Up would output pwm with m03 and down would output pwm with m04
[21:33:49] <skunkworks> even with both pins connected to the printer port in hal. It was just odd
[21:34:32] <SWPadnos> skunkworks, one quick question: what actual voltage/current are you targeting with that drive?
[21:36:37] <skunkworks> I was hoping for 200v 40a - am I asking too much. Right now I am limited buy the mosfets to at the most 20. That would cover all of the servos we have to play with right now
[21:37:02] <SWPadnos> depending on the margin you want for the mosfet voltage, you can probably do the current just fine
[21:37:25] <SWPadnos> there's a significant hit to Rds(on) when you go above 200V, looking at various parts at DigiKey
[21:37:34] <skunkworks> right
[21:37:50] <SWPadnos> so if you can take a 10% margin, and spec the drive at 180V, you can use a 200V FET (unless jmk says you can'tdo that ;) )
[21:38:23] <skunkworks> jmk is probably spitting his tea back into his cup
[21:38:28] <SWPadnos> those have heh
[21:38:32] <SWPadnos> oops - heh only
[21:38:54] <jmkasunich> scope the peak voltage as you raise the supply
[21:39:12] <jmkasunich> I certainly wouldn't do 180V with 200V fets, but you never know
[21:39:23] <SWPadnos> what margin do you usually like?
[21:39:41] <jepler> skunkworks: did you find the problem yet, or are you still scratching your head?
[21:39:44] <skunkworks> jmkasunich: any ideas of the top of your head? (pwmgen)
[21:39:50] <jmkasunich> no
[21:40:00] <skunkworks> jepler: no leaving work here to play.
[21:40:09] <jmkasunich> its after midnight here, and I'm not awake enough to think well
[21:40:24] <skunkworks> Thats ok. Going to play with it more tongght.
[21:40:29] <jepler> see you jmkasunich
[21:40:31] <skunkworks> bbl
[21:40:37] <jmkasunich> re: margin: we use 1200V IGBTs on a 650-700v supply, for whatever thats worth
[21:40:50] <SWPadnos> ok, so you go for 2x - that's good to knw
[21:42:03] <jmkasunich> not quite 2x
[21:42:28] <SWPadnos> well, it's a good target - are there 1300 or 1400V IGBTs? (or is that round-off error ;) )
[21:42:29] <jmkasunich> usually with 750V bus, we see close to 1000V peaks during turn off (L * dI/dT)
[21:42:36] <SWPadnos> right - ok
[21:42:48] <jmkasunich> they make 600, 1200, and 1700V
[21:43:04] <SWPadnos> so you see a 1/3 or so spike, and try to build in a bit more margin than that
[21:43:17] <jmkasunich> we use 600V for 230V drives (350 or so DC), 1200 for 480V, and 1700 for 575/690V
[21:43:27] <SWPadnos> that's what I thought - 1700 is too much, 600 is obviously too little, so 1200 is close enough ;)
[21:43:59] <jmkasunich> the spike at 20A is probably a _lot_ less than what I see at 200-1000A
[21:44:05] <SWPadnos> heh
[21:44:12] <SWPadnos> true enough
[21:44:50] <SWPadnos> and it should be a constant (ish), given a particular current being switched
[21:44:59] <SWPadnos> in the same realm, anyway
[21:45:40] <jmkasunich> Mariss uses 100v fets with an 80V supply (20% derate)
[21:45:53] <SWPadnos> and they come apart at 113V ;)
[21:46:11] <jmkasunich> I use 1200V igbts with a 700V bus (40% derate)
[21:46:22] <jmkasunich> skunkworks probably wants something between
[21:46:37] <jmkasunich> 200V with a 30% derate would be 140V dc
[21:46:41] <SWPadnos> ok, I obviously don't know much about the arcana of switching drive design - that's why I asked :)
[21:47:19] <jmkasunich> to be honest, I don't know much about the power level skunkworks is doing
[21:47:33] <SWPadnos> itty bitty drivers, huh
[21:47:55] <jmkasunich> not really
[21:48:11] <jmkasunich> 180V and 20A is not childs play
[21:49:11] <SWPadnos> certainly not. relatively speaking though, it's small (for you)
[21:50:09] <SWPadnos> oops. time to go to dinner. see you later
[21:50:24] <jmkasunich> much later - like tomorrow
[21:50:26] <jmkasunich> goodnight
[21:50:34] <SWPadnos> heh - ok by me :) have a good sleep