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