is the livecd for lucid still the same one? (missing the emc repository?)
very very rough - but seems to be working in sim. Still have some interlocking to smooth out and also need to add the spindle lock code. pretty short. http://www.pastebin.ca/1915435
and everything else I have not thought of.
I pretty much made everything pins so I could test what is happening easier (for me)
I wish I understood why tool orientation has such an effect on path with cutter comp on http://imagebin.ca/view/UhqDY72.html
[00:45:41] <jthornton> http://pastebin.ca/1915445
jthornton: You didn't post your tool table, what's the (numerical) tool orientation?
Or is it shown there and I don't see it?
Hey Sam, how are you? Or should I say, hope you're feeling better? Congrats on Dad moving the axes first time with a battery charger, cool!
Oops, got to go get parts before they close, back in a while
leave it to dad to see a problem. what happens when the spindle speed override is moved. ;) the way it works now is as the spindle speed is decreased though the gear threshold - it shifts ;) oops. so it looks like I have access to the spindle override pin though halui. I think I can use that to see if the spindle speed is being adjusted by that or by gcode. Then if it is adjusted by...
...the override - don't shift. just let the spindle motor (vfd) change the rpm/
and when shifting - if the spindle override is lower - still pick the gear that is the right range for 100% override.
jthornton: And the diagrams (several) in lathe chapter 1.7 don't help? http://www.linuxcnc.org/docview/html//lathe_lathe-user.html#r1_7
skunkworks: You're not using m-codes for gear selection?
yes - but the comp picks the correct gear/spindle motor speed for the cutting rpm selected
How can it know? Or do you have zero overlap in your available speed ranges?
Or is it biased toward low gear?
skunkworks: sometimes I'll pause a program (when the tool is in the air) and then turn spindle override down to zero to stop the spindle while I do something, then backup to 100%, then resume
so - if you say are running the spindle at say 3000rpm - the spindle motor is running at 3900rpm and the gearbox is in gear 16. NOw if I slide the override to 50 % - as it is now - the gear comp will now put the spindle into creep and shift into the correct gear for 50% OF whatever rpm was selected.
so - I think what I want is - if the override is used - don't shift. (only shift if the gcode commands it) (Can I know that) hmmmm...
spindle changing to creep while you're cutting seems pretty nonideal :-)
cradek: Is your spindle a DC drive? Congrats BTW on your preliminary test of the "encoder-only" (no-tach) method. Any more news on that?
no new news - the latest news is still that it works perfectly great
I hope to measure the lag (with a real scope) but not tonight
I think I can know that base on what the override is set to and what the commanded speed is. if the change in commanded spindle speed doesn't follow the ratio of the spindle override - it was a commanded speed change from gcode. (does that make sense?)
oh so like commanded / override = gear selection?
something like that. seems doable (until I actually try...) ;)
skunkworks: Oh, I dunno, I think I prefer having the operator pick a gear and having the machine stick with that. I guess I'm old school?
that's how I like my lathe - but with 16 gears instead of 2 I'm not so sure anymore
heh - I can have hal pick the gear pretty easilly without thinking :)
if you hope to tap with it, you'll have a second problem
that is working pretty well.
because the command changes without the override changing, and you sure don't want to switch gears for it
well I guess command goes from +500 to -500 and back to +500 so maybe you're fine - forget it
As long as there's a delay on "re-thinking"
well - yah - I think that might be workable.
Ooh, we're changing to 490... Wait, we're changing to 480... Wait, we're changing to 470...
I maybe need a way to ' lock ' it into a gear when needed.
I could have a 'don't shift' pin that when enabled doesn't shift the transmission.
oh this is fun :)
or - it only shifts from a stop.
On John's BP2 I treated his (hand-cranked) vari-drive as a five-step pulley, and he has a two-speed gearbox. So I reserved M40 and M50 for neutrals (just in case), and went low range: M41-M45 and hi range: M51-M55. Ten speeds ("gears").
You could do M41-M47 and M51-M57 if they're evenly split by a hi-lo gear. Or just start with granny at M41 and go up as they go. Either way.
kimk: This seems to be working. http://www.pastebin.ca/1915435
when it shifts into the correct gear - what ever s word is given. automagically
it shifts into the correct gear - what ever s word is given. automagically
granted - we probably don't need all the gears - but hell - they are there....
I like the idea of only shifting once as the spindle comes on
cradek: that solves a lot of these problems. doesn't it ;)
I think I might think very hard about that solution.
yes - including letting spindle-at-speed work to keep emc from moving until the whole thing is ready
usually the only times you need to change speeds/gears on a mill is when changing tools. you have to stop the spindle to change tools.
I think I am conviced.
that shouldn't be that much of a change
Convinced of what though?
only shifting gears at spindle on. Not while the spindle is running.
after the spindle is running - if the s-word is changed - or the override is used - only the vfd changes
just be sure SO to zero doesn't trigger it (I think you can tell the difference with that smattering of hal outputs...?)
I will see.
I was thinking about that in the back of my mind.
Ha, yes, only shifting while off would be good. There's a big lathe here (1937) just sitting around because one of the operators (2 years ago?) tried to do a shift as it coasted to a stop and broke one of the shift levers(?) in the transmission. There's a big 6" or 8" cylinder of 4120 or something sitting there to make a new shift lever(?), but it remains on the to-do list, lol.
hmm - s0 turns the motion.spindle-on to false. darn
so does running the spindle override to 0
might have to think abou that
wonder who/what relies on that behavior
well - override probably wouldn't be a problem. I could test to see if the override is zero and do something. and rigid tapping goes from some speed to - some speed - right?
fixing/changing it would save us a hundred "I programmed M3 and my spindle didn't come on" questions over the next decade too
You could set your minimum spindle override to 1% or something, and use a halui spindle cw/ccw/off/auto switch?
yeah, or fix the stupid in emc
It is getting late - and I am wondering if emc does need fixing. (or if it is me) ;)
in other news, carburetors don't work very well when there's a massive vacuum leak right under them
Ha, OK, goodnight Sam, don't want to wear you out on one of your first nights back
cradek: yeck. did the seal shrink?
skunkworks: I'd love it if someone would figure out who/what it would break if that was fixed, and then fix it
skunkworks: just hoses crumbling and falling off/apart
now I bet the cruise control works too :-)
Or just fix EMC and wait for the break reports, lol? It's the "Jesuit Method": "It is always better to ask forgiveness then to ask permission."
that's fairly true if sam'd be using master anyway
so - if I get what you are saying - the motion.spindle-on would stay true even if the S was commanded to 0 'If' the spinde was still 'on' (m3,m4)
so 'spindle on at zero speed' becomes a valid possible state, when it wasn't before
actually I like that it turns off when I turn it down to 0%...
The spindle overrride doesn't seem to have the problem of restarting the spindle - but - motion.spindle-on does go false.
I think I should just play with it and see if I can hack around it for now.
On at S0 (or hal tool change trickery) sounds like a very good idea, some spindles have to hold orientation for tool changes, and they don't have a shotpin or anything, they just hold position, servo-style.
or we need another pin :)
now that is just goofy. ;)
huh - there really doesn't seem to be any way to tell that the spindle had been commanded on when s0 is hit
huh - when the spindle override goes to 0% the motion.spindle-brake stays false. I can use that. I think that rigid tapping shouldn't be an issue - because it isn't commanding a S0 right? It goes from 100rpm to -100rpm. right?
but when S0 is commanded the brake does go true. (thought I had it there for a second)
dangit you're gonna make me look at the source
I think I can work with that.
I think that might be a bug... (s0 does make the spindle brake turn on - but 0% override doesn't) But I am not going to complain ;)
oh I forgot about this swirly mess
heh - don't look directly at the code!
it kind of needs a rethink
the nml messages and the g codes don't really line up 1:1
for instance there's no "set the speed" message
only "turn on and set the speed"
so S100 M5 is an unrepresentable state too
I don't know if that is a problem though (I had already dealt with that)
I don't know the spindle speed until the spindle is on. Not really an isssue
yeah, but it's just bad design deep down, and it shows (has caused plenty of bugs too)
so it needs a nontrivial fix (unfortunately)
not a problem. Like I say - I think I can work around it. :)
wow - a lot to think about. :)
I think I have a really good direction to go.
I wondered about that the other night, for those non-trivial fixes (years to fix?) how would git have a branch that's ahead of master? Maybe (in our case) a 3.0 version or something, much further off in the future? Wouldn't that have to be a static branch, because the latest fixes from master (2.5, 2.6, etc.) might no longer be appropriate? So you'd have to, what, cherry-pick any fixes you wanted? (All fixes, really?)
a branch for a big new feature works great. we do this all the time. whenever you're ready to incorporate that feature into a branch that's going to be released, you just merge it.
or when it's done, you can just merge into master
What would you name such a branch? Or what have you named some in the past?
there is a jointaxis branch or something like that.
locking-rotary, separate-g92, defor-format, ss-wrapped-rotary, random_toolchange
scroll down to the bottom here: http://git.linuxcnc.org/gitweb?p=emc2.git;a=summary
most of those are feature branches
OK, excellent. Glad to know this feature is available. Thanks.
many of those are merged into master already, like separate-g92, ss-wrapped-rotary, locking-rotary; others are not yet (or might never be) merged
The S0 issue I think is a non issue. As if I command a S0 for some reason - I know I have to command the spindle back on.
And it looks as if the spindle override is 0 - I have a few ways to check that. (I can actually look at the spindle override in halui or that the spindle brake is still off)
what was that python idle check to see overall machine performance?
umm that's not ringing a bell, sorry.
if that's what you meant, here's how to run it:
$ python -mtest.pystone
Pystone(1.1) time for 50000 passes = 0.53
This machine benchmarks at 94339.6 pystones/second
if you run it in a directory with 'test.py' you may get a bewildering error message instead (that's what I did the first time)
jepler: yes that was it, thanks
Pystone(1.1) time for 50000 passes = 0.62
This machine benchmarks at 80645.2 pystones/second
here Pystone(1.1) time for 50000 passes = 0.55
This machine benchmarks at 90909.1 pystones/second
boy - It sure gets tricky wrapping my head around how the comp acts. (running every ms) it isn't always what I think it is going to do.
hey - I think I have it working again. So - it only shifts on the m5 to m3/4 transission - spindle override works down to 0.
it worked using the spindle brake as the 'spindle off' signal. that way the feedrate override works down to 0.
you're off the hook! ;)
So - now I think I want to shift into the correct gear for the 100% spindle override overrride. so - if the overrride is set to 50% and the spindle is turned off and then back on - as is the comp will shift into whatever gear s*override. So every time you turn the spindle off and on it will shift into a lower and lower gear ;)
I don't know if there's a way to get "commanded spindle speed with no override applied"
I know the commanded spindle speed (with the override applied) and I know the override though halui :)
yuck, I guess you do
:) hack hack hack
what'll you do if the override is 0%?
I will have to check that.. if overide is 0 then command to vfd is zero
right, but what's the gear? With spindle override set to 0%, MDI M3 S1000
or does it not matter if the vfd is stopped -- you'll determine the gear as soon as SO is >0%
ah - I see - I may have to stay in current gear then.
As long as it doesn't do anything *stupid and it does the same thing every time - I am fine with it. :)
the only situation I would have to check is spindle off -> spindle on. If the FO is 0 stay in the current gear. That may be the only gotcha. (someone could have originally done 1rpm - which would be in gear 0. if they have the spindle override set to zero and start the spindle - I may have to do a gear change at that time. Not a big deal. Like jepler said - the second I am off of SO 0 - I know what the spindle rpm is
heh - that was rambling
I think I got there though
a problem trying to open nonexisting subroutine files with mdi and a candidate patch: http://www.panix.com/~dgarrett/stuff/mdi_sub_prob.txt
does this work? (I'm getting lost in those defines)
+#define NCE_UNABLE_TO_OPEN_FILE _("Unable to open file <%s>")
rs274ngc_return.hh:#define NCE_UNABLE_TO_OPEN_FILE _("Unable to open file")
I think it'll work
my own personal style would probably be to get rid of the #define and put the string right with the ERS
dgarr: did you do any testing of what happens if the bad O call is in a program instead of in MDI?
OK, I'll test that..
// TESTME!!! MORE THOROUGHLY !!!KL
tst.ngc does not need/want an m2?
(without trying it) it looks good to me. Interp::reset resets what looks like approximately the right things
jepler: not if you're calling it with o-call
it's like just a sub declaration
dgarr: you had another patch recently regarding tool parameters and the preview. It looks like I never pushed it. Can you remind me where it is?
or is my memory wrong..
tests for me OK with loaded progams too, will push
jepler: i believe the one you are thinking of was pushed 85c3daa66345
ah, to master only?
you haven't run into any problems in the meantime, have you?
side note: I sure was puzzled with what gitk was telling me when I did this: gitk 85c3daa663450550e9adfca5228f3636700eec73..origin/v2.4_branch
even more so because the bottom commit starts '85'
i think today's patch is not right for the case you mentioned of a sub calling a nosuch -- it stops but withc no error message
really? in my testing, I got the expected Unable to open file <nonexistent.ngc>
oh, if it's another layer deeper in subs?
(debug, tst3 calling tst1/nosuch/tst)
no error for nosuch with that
are you then doing MDI O<tst3> call?
cradek, playin around with touchy and if you remove else:
from emc_interface.py the program would not start running when u turn off single block u would have to press cycle start again
Al_Smt: yes I bet that's right
dgarr: hm and before your change at least you get an 'EOF in file' error
in the tst3 case
it would act more like a real single block should
Al_Smt: that switch does double duty as a feed hold too (which is what I mostly use it for) so I prefer it to "unhold" right away
i imagine the reset() is too brute-force when there are multiple call levels but the code is pretty opaque to me. the worst part of the 'before' behavior is that if you mistype a mdi subroutine name you cant get it right in any simple manner
dgarr: OK, I think I'll hold off on this patch for now. Let me know if you have an improved version
cradek, as long as you don't catch your shirt on it
dgarr: as to the tool patch, has that one been working for you? I see it's been a few weeks since I put it on master
I haven't heard anything, but that means nothing.
i haven't seen anything wrong but i have been workiing with a different machine that doesn't exercise it