Feb 22 15:36:47 Has the meet come to order? Feb 22 15:37:02 * paul_c gets the big stick out Feb 22 15:37:10 It has now ;-) Feb 22 15:37:36 I kinda started goofing around with code on emc since I learned a little about compiling with gnu c Feb 22 15:38:03 I'll see if I can really mess it up Feb 22 15:39:01 oh..ray..is there any doc about getting logging to work from the gui? Feb 22 15:39:12 les: It is amazing how many developer resources are available with linux. Feb 22 15:39:33 can't get it to trigger Feb 22 15:39:44 Logging -- the best logger I know of is Dave E. Feb 22 15:40:17 He was sending me stuff for a while. I asked him to write up a howto but he never got there. Feb 22 15:40:32 well I am trying to do that spindle force detector in software Feb 22 15:40:47 did it in hardware and it works pretty well Feb 22 15:41:10 Maybe we can twist his arm at Fest. Feb 22 15:41:14 Don't need any extra sensors! Feb 22 15:41:26 I'll email him Feb 22 15:41:27 spindle force? Feb 22 15:41:33 Engval right? Feb 22 15:41:43 Yep. Feb 22 15:41:47 k Feb 22 15:42:25 well like many machines mine can supply a force of over 1000 lb to the gantry Feb 22 15:42:47 but Iwant to limit spindle force to about 100 lb Feb 22 15:42:50 for wood Feb 22 15:43:26 the 1000+ is for accelerating the machine mass only Feb 22 15:43:26 why not measure spindle load like the BigBoys do? Feb 22 15:43:53 I can, but I found a way to do it without that Feb 22 15:43:59 in software even Feb 22 15:44:13 proper routers measure spindle load, and will adjust feed rates on the fly to maintain say 70% of rated spindle power Feb 22 15:44:22 * rayh is all ears Feb 22 15:44:28 so if you hit a hard bit of wood, they slow down Feb 22 15:44:56 well I just solve a second order diff equation Feb 22 15:45:07 I need some motor constants Feb 22 15:45:14 and system inertia Feb 22 15:45:23 velocity Feb 22 15:45:29 and motor current Feb 22 15:45:59 motor current? how will you get that? Feb 22 15:46:27 right now from a shunt (I do it with hardware) Feb 22 15:46:32 paul_c: Checked in the tcl changes to tkemc and mini in emc. Feb 22 15:46:38 where do you read it in? Feb 22 15:47:00 but I could also get an approx from DAC voltage, since I run in current mode on the amps Feb 22 15:47:21 oh I use an external circuit to calculate it Feb 22 15:48:14 The stg card has several analog in pins. Feb 22 15:48:24 right Feb 22 15:48:27 but with using the number written to the dac I can get it in software Feb 22 15:48:33 close anyway Feb 22 15:48:55 using extra stg i/o would be better Feb 22 15:49:06 Any old process could read their values but fast enough to affect feedrate would take some rt. Feb 22 15:49:39 well that is why I am using the number written to the dac Feb 22 15:49:44 already there Feb 22 15:50:21 oh...also need two vel points Feb 22 15:50:32 to calc accel Feb 22 15:50:50 anyway I will play with it Feb 22 15:51:15 It has saved my system from damage when a bit breaks or dulls Feb 22 15:51:50 but I need logging to work to calibrate it Feb 22 15:52:01 ..in software Feb 22 15:52:29 just something to do while I wait for Rogier to do the next fix on segmentqueue Feb 22 15:53:24 les: There are a defined set of logging variables. Feb 22 15:54:08 * robin_sz reads the lathe threadign messages on emcdev Feb 22 15:54:20 ray: I was just trying it from the gui and not much happened Feb 22 15:54:40 we could just mail Art and ask him how he got thrading going in Mach2 ... Feb 22 15:54:45 now that I have a later version I tried it again Feb 22 15:55:19 robin_sz: Do that. Feb 22 15:56:01 most of it has been described on the list anyway Feb 22 15:56:26 My impression is that we need to close the loop on the spindle before we try to do much with threads. Feb 22 15:56:34 seems to be using some sort of basic PLL and a spindle sensor Feb 22 15:56:42 * robin_sz nods Feb 22 15:56:58 Art is using either a single stripe and a reflective pickup, Feb 22 15:57:09 or multiple stripes and an index mark ... Feb 22 15:57:10 I've listened to quite a few lathes while threading and hear the spindle motor snort when the tool hits the work. Feb 22 15:57:34 Mach 2 uses the spindle as a reference and slaves the motion to that Feb 22 15:57:58 right - "electronic gearing" Feb 22 15:57:58 I think that Matt found a 100 ppr encoder burried in his Hardinge for threading. Feb 22 15:58:01 just an ordinary encoder would be fine I would think Feb 22 15:58:16 Art has ben using 1 ppr or 8 ppr Feb 22 15:58:18 needs to be homed somehow like any axis Feb 22 15:58:33 1ppr would be vulnerable to spindle speed variations Feb 22 15:58:39 possibly Feb 22 15:58:39 yes Feb 22 15:58:48 that why they went 8ppr and a index mark Feb 22 15:58:59 Once the tool "bites" spindle speed remains fairly constant Feb 22 15:59:15 hopefully we could support 1 and higher (higher would require an index) Feb 22 15:59:19 IMHO You'll get hobby level threads until you servo the spindle. Feb 22 15:59:30 dont see why Feb 22 15:59:35 servo as in activly controll it? Feb 22 15:59:49 Right. Ramp it just like the others. Feb 22 16:00:00 I disagree Feb 22 15:59:51 slaving the motion should be just as good Feb 22 15:59:51 my Boxford is a plain old induction motor Feb 22 16:00:10 ...so is my Boxford Feb 22 16:00:19 well, I get pretty damn good thread on my colchester Feb 22 16:00:19 want a cnc lathe though Feb 22 16:00:21 should be able to use an induction motor on the spindle Feb 22 16:00:31 activly controlling multiple HP gets spendy Feb 22 16:00:36 You need the ramp anyway for css. Feb 22 16:01:08 most VFDs can give you ramping, but servo control of position is a whole 'nother level Feb 22 16:01:19 run spindle with a standard couple hp dc motor Feb 22 16:01:29 constant surface speed doesn't require servo control Feb 22 16:01:43 so .. if my manual colchester can get damn good threads with a free-running induction motor on the spindle, why cant a modern CNC lathe Feb 22 16:01:53 You need velocity control. Feb 22 16:02:03 why? Feb 22 16:02:07 cause your manual colchester has the leadscrew geared to the spindle Feb 22 16:02:12 yes ... Feb 22 16:02:22 doesn't matter what the spindle does, the leadscrew and carriage follow Feb 22 16:02:36 and if a cnc lathe had a ballscrew geared to the spindle? Feb 22 16:02:44 I don't think any commercial machine does it that way. Feb 22 16:02:57 not physically geared, electronically geared Feb 22 16:03:18 yes, electronically eared instead of phsyically geared .. should be at least as good Feb 22 16:03:52 that's the way I would do it - use spindle encoder as reference, electronically gear axis to that Feb 22 16:03:59 * robin_sz nods Feb 22 16:04:14 spindle can be constant speed or VFD, doesn't matter. Feb 22 16:04:18 I've got no issues with e gearing. My issues are with the spindle control. Feb 22 16:04:32 rayh: I think they are separate issues Feb 22 16:04:35 Yes it does matter when you are dealing with a good spindle. Feb 22 16:04:40 I have been looking around for a old cnc with burned control Feb 22 16:05:00 Hardinge or something Feb 22 16:05:25 Load variations need to be taken into account at the spindle part of the control rather than just asking a geared axis to follow. Feb 22 16:05:47 rayh: I disagree Feb 22 16:05:49 I did not know that emc could not servo the spindle Feb 22 16:05:44 les: Got three of them in the garage. Feb 22 16:05:52 yeah? Feb 22 16:06:12 Get your truck up here tomorrow and one's yours. Feb 22 16:06:21 hmmm Feb 22 16:06:32 converted chuckers? Feb 22 16:06:44 Nope real chncs. Feb 22 16:06:50 if the "gears" can follow the accel/decel of the spindle under load variations, then it doesn't matter. Using a manual lathe (real gears) I've cut threads while cranking the spindle by hand Feb 22 16:07:00 rayh: so why can my manual colchester manage to do it without controlling the spindle speed? Feb 22 16:07:39 on manual if spindle speed slows carriage feed does too Feb 22 16:07:59 right - if the axis are e-geared to the spindle, the same happend Feb 22 16:08:02 yes ... and why cant we do that? thats what electroic gearing is Feb 22 16:08:19 that would require more than one ppr on the spindle encoder Feb 22 16:08:25 it would ... Feb 22 16:08:44 Yep. The theory is there but in practice, the Mazaks that I'm familiar with don't trust a free wheeling spindle. Feb 22 16:08:51 a few hundred for smooth motion at low speeds Feb 22 16:09:16 nah, no one cuts threads at slow speed on cnc do they? Feb 22 16:09:23 I can watch actual spindle speed when a tap goes in and no change is speed. Big change in load. Feb 22 16:09:36 6000rpm isn't uncommon Feb 22 16:09:37 400 to 100rpm I have heard quoted as normal Feb 22 16:09:44 * robin_sz no Feb 22 16:09:47 about 500 (x4) would be about perfect Feb 22 16:09:48 nods Feb 22 16:10:03 The last repo machine I installed was tapping alum at 5k rpm. Feb 22 16:10:10 wow Feb 22 16:10:11 I think less would work as well, depending on speeds and spindle inertia Feb 22 16:10:18 yup Feb 22 16:10:25 big 10" chucks help here Feb 22 16:10:28 put a big mother flywheel on the spindle, and you _could_ use 1ppr Feb 22 16:10:33 its a sampling thery issue really Feb 22 16:10:40 theory Feb 22 16:10:46 just a PLL Feb 22 16:11:27 Art has done a lot of macro work, with multiple passes, spring passes, lead ins etc etc Feb 22 16:11:30 right les - input signal is the _variation_ in spindle speed - because of inertia that's a fairly low bandwidth, hence you don't need a real fast sample rate Feb 22 16:11:54 right Feb 22 16:12:13 and we are also talking about two (all be it) similar methods - Single point thread cutting on a lathe, and rigid tapping on a mill. Feb 22 16:12:24 well 1ppr would have a bandwidth of half spindle rpm Feb 22 16:12:32 on a Mill, spindle does need tighter control. Feb 22 16:12:52 true Feb 22 16:12:58 less inertia I guess Feb 22 16:13:02 but even on a mill, spindle control and axis following the spindle are two different things Feb 22 16:13:40 rigid tapping always sounds like a recipie for breaking taps to me Feb 22 16:14:11 spindle electronic gearing could be a big problem with steppers Feb 22 16:13:36 you could rigid tap with a plain induction motor if: Feb 22 16:13:57 a) you plug reverse the motor when you reach the desired depth Feb 22 16:14:22 b) the hole is deep enough that you don't bottom out before the motor reverses Feb 22 16:14:53 c) your e-gearing can keep up with the rapid change in spindle speed (no 1ppr encoders here) Feb 22 16:15:14 Man not only wants rigid tapping, he wants blind hold tapping as well. Feb 22 16:15:19 there in lies the problem - Tapping in blind holes to the full depth. Feb 22 16:15:34 paul_c: for that, you need full spindle control Feb 22 16:15:58 I think I said that a little while back... Feb 22 16:16:00 and a good prayer relationship with the big guy. Feb 22 16:16:08 my point is that the spindle control part and the e-gearing part are independent Feb 22 16:16:24 get the e-gearing done, and you'll be tapping thru holes without even a VFD Feb 22 16:16:31 yes with 1ppm you would need 2 revs to recover from the hiccup when the tool enters or leaves the work Feb 22 16:16:42 jmkasunich: In essence I agree with you but they must work together to produce a good thread. Feb 22 16:16:59 _then_ add the advanced spindle control for those who want the blind holes and can spend the $$ for a servo spidle Feb 22 16:17:51 What I've never understood is how the testing was done with the K&T Feb 22 16:18:05 It must have had spindle control. Feb 22 16:18:06 rayh: of course there is always more quality for more $$, but if you say "you must servo control the spindle to thread" and we code accordingly, then the low buck guys will never thread at all Feb 22 16:18:21 suspect it was with a Delta Tau card at GM Feb 22 16:18:37 I don't agree. If the INI says open loop spindle then it should. Feb 22 16:18:37 I don't see why a sherline with the standard spindle motor and an encoder can't cut threads Feb 22 16:19:00 well .. if Mach2 can d o it .. ( and it can) Feb 22 16:19:39 Can it meet go/nogo in steel? Feb 22 16:19:44 the Mach2 guys are reporting excellent threading with e gearing and free running spindles ... Feb 22 16:20:02 I know that the 1ppr with the dos version can't. Feb 22 16:20:14 that was AGES old ... Feb 22 16:20:29 this is a 'last 3 weeks' development Feb 22 16:20:58 Well the spindle can be free running...as long as the carriage tracks it Feb 22 16:21:07 exactly Feb 22 16:21:25 ray - a sherline should be able to cut fine pitch threads with shallow passes using a fairly low ppr encoder, because light passes don't slow the spindle much Feb 22 16:21:30 les talked about following based on ppr. If 1 ppr results in two turns to recover a thread done this way will look pretty crappy. Feb 22 16:21:38 persoanly I favour the car timing pulse style pick up Feb 22 16:21:55 if you want coarse threads and heavy passes in steel, use a higher ppr encoder, and a beefier spindle motor/flywheel Feb 22 16:21:56 32 tooth cog, one missing tooth for index, Feb 22 16:22:14 thats how most cars derive their timing Feb 22 16:22:26 or 60 +1 Feb 22 16:22:39 rayh: it only needs two turns to recover the _change_ in speed - with sufficiently light cuts, the change in speed can be kept small Feb 22 16:22:46 sure ... Feb 22 16:23:42 Okay. I think that we may be getting to the heart of the issue. Do we want to keep EMC dumb so that we have to do things like take light cuts. Feb 22 16:23:56 so high ppr encoders or close loop spindles are only needed when you expect the speed to change under load - IOW, when you want to push the machine. The production guys will do that, so let them spring for the encoders and/or servo drives Feb 22 16:23:45 id like to see segmot working right first though Feb 22 16:24:03 ha me too Feb 22 16:24:21 but we just have to hold our breath and wait for rogier Feb 22 16:24:29 rayh: so if you have a ligth spindle and want to take heavy cuts, use a 100ppr encoder Feb 22 16:24:30 * paul_c wants emc2 working Feb 22 16:24:41 IMO let's make EMC capable for those who need to push their machines. Feb 22 16:24:44 rayh: I want to make sure emc works with _both_ the sherline (light cuts) _and_ with the Mazak Feb 22 16:24:45 Even fred does not know how that code works Feb 22 16:25:25 if you can replace 500 bucks of expensive hardware (spindle servo) with a few hundred lines of code .... Feb 22 16:25:42 exactly Feb 22 16:25:59 robin_sz: I don't believe that you can. Feb 22 16:26:00 if emc needs spindle servo to thread, I for one will never be able to cut CNC threads Feb 22 16:26:04 yes spindle servo is not required...just a spindle encoder Feb 22 16:26:16 rayh: well, the mach2 guys seem to be doing just that ... Feb 22 16:26:17 rayh: you can, _within limits_ Feb 22 16:26:31 light cuts Feb 22 16:26:42 Yes and if you make the limits low enough we can all do it with our fingers. Feb 22 16:26:45 as long as the user can live with the limits (light cuts, etc), it works. If the user needs better, spend the bucks Feb 22 16:27:06 emc should work with both the cheap and expensive setups (hence hal) Feb 22 16:27:16 i think some of the guys where doing 4 passes for fairly deep cuts Feb 22 16:27:28 the pool cue guys threading brass a lot with it Feb 22 16:27:33 I'm not talking bucks here. I'm talking making the software capable of doing the work that needs to be done for the most demanding situations. Feb 22 16:27:44 We can always dumb it down. Feb 22 16:27:47 thoretically just a $100 hollow shaft encoder would do it, no? Feb 22 16:27:56 theoretically Feb 22 16:28:27 practically, 8 bits of white tape stuck on the chuck, and a led pick-up seem to work too Feb 22 16:28:39 or even a belt driven one will work. Feb 22 16:28:46 rayh: then we're miscommunicating - I thought you said that to thread, you need servo control of spindle, as in "machines with single phase induction motors need not apply" Feb 22 16:29:22 Not at all. If an integrator wants to take that risk we should let them. Feb 22 16:29:30 induction motors are fine Feb 22 16:29:40 paul_c: the other approcah used is to just drill 8 holes in a pulley flange on the machine ... Feb 22 16:29:50 even a little belt slipping would be ok Feb 22 16:30:03 ..if the carriage tracks it! Feb 22 16:30:06 But if an integrator has a Mazak with the drive and motors to allow full servo control of spindle, they should be able to make that decision as well. Feb 22 16:30:27 so sanity check: Feb 22 16:30:41 how many of our users have small home/shop mills Feb 22 16:30:46 how many have a mazak Feb 22 16:30:56 I know of two. Feb 22 16:31:11 Mazak's that is. Feb 22 16:31:42 Couple of K&T mills and a few other higher end machines. Feb 22 16:31:59 abut overall .. what numbers do you think ... Feb 22 16:31:39 Two projects: 1) High quality e-gearing that makes good threads using 1ppr IF spindle speed is constant, and good threads using a 100PPR (or more) encoder, even when spindle speed varies, and Feb 22 16:31:59 2) spindle control to make sure spindle speed stays constant, if you have the hardware for it Feb 22 16:32:04 robin: I think the hobby v commercial is a smoke screen. Feb 22 16:32:36 I disagree ... its about developing stuff that is *appropriate* Feb 22 16:32:54 some of us commercial guys think we are doing hobby stuff sometimes Feb 22 16:32:56 haha Feb 22 16:32:56 sure we *should* cater for both Feb 22 16:33:11 but we shoud cater for the majority first IMHO Feb 22 16:34:07 if we do servo-spindle only, we'll be out on a limb Feb 22 16:34:24 Did anyone say servo only? Feb 22 16:34:31 nope Feb 22 16:34:43 sounded like you did - maybe we mis-interpreted Feb 22 16:34:40 I hear several saying no servo. Feb 22 16:34:56 we are saying we shouldn't _require_ servo Feb 22 16:35:02 exactly Feb 22 16:35:13 I still think servo spindle and e-gearing are two independent things Feb 22 16:35:20 Hobby or commercial...there is no need to close a servo loop on the spindle drive Feb 22 16:35:37 if you servo the spindle, then all of a sudden your egearing has zero jitter Feb 22 16:35:56 and you don't need to accel/decel the carriage Feb 22 16:35:59 Nice! Feb 22 16:36:09 but the actual egearing is exactly the same for servo and non-servo spindles Feb 22 16:36:13 so servo spindle can _improve_ threading - no one is questioning that Feb 22 16:36:14 Nice, yes but not required Feb 22 16:36:56 right - egearing alone is enough to make threads (good threads if the bandwidth is appropriate for the variation in spindle speed) Feb 22 16:36:58 higher ppr and gains can do the same thing Feb 22 16:37:13 Since the most of the servo code is already in there, why can it not be applied to a spindle. Feb 22 16:37:29 so .. do the e-gearing right, and iff the user happens to havea servo spindle then he *may* see some benefit .. but both should produce damn good results Feb 22 16:37:42 spindle is velocity control, not position Feb 22 16:37:46 Granted. Feb 22 16:37:55 Could be both. Feb 22 16:38:00 true Feb 22 16:38:12 right - toolchangers on mills for instance Feb 22 16:38:20 thats more 3rd/4th axis stuff on a lathe though Feb 22 16:38:36 Live tooling on my Sherline lathe?? Feb 22 16:38:47 Ive seen live tooling in lathes doing nice hex heads for instance Feb 22 16:38:54 but spindle "position" can go to infinity if you run all day - so it would normally be velocity control Feb 22 16:39:14 switch to position mode only when needed Feb 22 16:39:19 zackly Feb 22 16:40:33 moving on.... Feb 22 16:40:43 right Feb 22 16:40:45 so ,... Feb 22 16:40:49 robin_sz: That live tooling a hex is interesting to watch. Feb 22 16:41:17 rayh: indeed it is .. Feb 22 16:41:26 Try a triangle. Feb 22 16:41:30 more e-gearing... Feb 22 16:42:55 john said "but spindle "position" can go to infinity if you run all day" and this is the reason that I've thought that we needed another rotary defintion. Feb 22 16:43:16 One that returned to zero after 360. Feb 22 16:44:18 Right and wrapped linear will do that well. Feb 22 16:43:57 rayh: sometimes it needs to be more than 360 - for instance rigid tapping may want to make 20 revs then reverse Feb 22 16:45:11 .... If the system knows the pitch and the finish point, it won't need to count the turns... Feb 22 16:45:58 but _IF_ you have ray's high end servo drive you may want to command the spindle to do a nice trapezoid ending at exactly the desired depth (in a blind hole) Feb 22 16:46:34 IOW, command the spindle to make 20 turns, and let the e-gearing control the Z axis Feb 22 16:47:00 We've got a couple of the mill canned cycles that require known spindle orientation now. Feb 22 16:43:06 jmkasunich: Any thought on where to put the code for {minimill|bridgeport|dumb}io in the emc2 tree ? Feb 22 16:43:51 paul_c: Seems to me that it shouldn't be in emc2. Feb 22 16:44:10 emc2 still needs IO Feb 22 16:44:19 and an IO controller Feb 22 16:45:00 paul_c: src/emc/io? Feb 22 16:45:48 emc/io would imply hardware interface (to my way of thinking) Feb 22 16:47:48 to me, that dir in the existing emc tree is for "non motion io", aka spindles, lube, toolchangers, etc. Feb 22 16:48:00 perhaps emc/src/aux? Feb 22 16:48:22 emc/iotask ? Feb 22 16:48:29 sure Feb 22 16:48:40 or iocontrol Feb 22 16:48:45 the I/O programs should be a combination of wiring below the HAL and classicladder above. Feb 22 16:48:51 I like iocontrol better Feb 22 16:49:29 * rayh has the impression that he's not going to win today. Feb 22 16:49:48 * paul_c understands where rayh was going... Feb 22 16:49:53 and why. Feb 22 16:50:10 * paul_c also agrees in part. Feb 22 16:50:27 but in the practical stream... Feb 22 16:51:04 best left till we can pass diagrams around... Feb 22 16:51:47 let's not start on threading stratagies just yet. Feb 22 16:51:56 we already did Feb 22 16:51:59 a while ago Feb 22 16:51:16 I guess there are two ways to thread. Feb 22 16:51:49 1) make spindle just another axis, (controlled). Then threading is just a move - an angled line Feb 22 16:52:17 2) assume spindle is uncontrolled, and track it (egearing) Feb 22 16:52:32 2a) spindle actually is uncontrolled Feb 22 16:52:42 2b) spindle is controlled Feb 22 16:53:06 1 doesn't work unless you have the hardware to control the spindle Feb 22 16:53:14 I thought ray was favoring 1 Feb 22 16:53:17 2 works either way Feb 22 16:53:37 lathe threading can use 2a or 2b Feb 22 16:53:47 (or 1) Feb 22 16:54:20 tapping needs either 1 or 2b (but "control" can be as crude as plug reversing the motor if your egearing is good enough) Feb 22 16:54:36 Without servoing a spindle (but encoding it) you could have a system that could take light or deep cuts...you could even turn off the spindle motor and turn it back on with little ill effects. Is that not enough? Feb 22 16:54:54 The problem with doing 1 is that we can't command a continuing velocity other than a very large position number. Feb 22 16:55:25 right - plus the fact that few hobby machines and even some commercial ones don't have servo drives on the spindles Feb 22 16:55:51 Why would that matter? If you don't have don't use it. Feb 22 16:56:12 if we implemented threading using 1, then if you don't have it, you don't thread Feb 22 16:57:22 be better to use 2) and add 1) at a later stage for those that can. Feb 22 16:57:23 Good reason not to do 1 Feb 22 16:57:48 I favor 2, with 2b to support those with servo spindles Feb 22 16:58:18 why have two fundamentally different approaches? Feb 22 16:58:29 Yes with 2 threading = $100 encoder and you are good to go Feb 22 16:59:28 * paul_c thinks talk of servo'd spindles cloaud the bigger picture. Feb 22 17:01:52 Do we have spindle feedback at all now? Feb 22 17:02:00 I don't think so Feb 22 17:02:08 I have it in hardware Feb 22 17:02:17 limited Feb 22 17:02:20 right, but does emc do anything with it? Feb 22 17:02:50 just estop if below a certain min value (feed to high etc) Feb 22 17:02:52 last year I sent two hollow shaft encoders to Fred, Matt made adapters to connect them to a sherline mill and lathe Feb 22 17:03:23 I dunno if Fred has done anything with them... if not, we should get them back so we can test threading on sherlines Feb 22 17:03:37 they were 1024 ppr IIRC Feb 22 17:04:55 200k pps at max rpm? Feb 22 17:05:03 well they were free... Feb 22 17:05:17 we'de have to test at lower speed Feb 22 17:05:36 (or use an STG or something that can read fast encoders) Feb 22 17:06:04 I think the hp chip can do 500k or so...don't remember Feb 22 17:06:22 checking Feb 22 17:06:30 besides, it's only 10KHz at 600rpm Feb 22 17:06:35 that's fast enough for testing Feb 22 17:06:40 We don't even have a variable to tell where the spindle encoder is. Feb 22 17:06:45 10 Meg Feb 22 17:07:03 rayh: afiak, threading is an emc2 feature, hal will handle the spindle encoder Feb 22 17:07:22 Max pps -- had that argument on cad_cam. Feb 22 17:07:34 the motion module will have to have code added to use the encoder Feb 22 17:07:36 Kay -- emc2 it is. Feb 22 17:08:12 We still need code throughout to make use of the thread feature. Feb 22 17:08:27 And if lathes, what will we do with the interpreter? Feb 22 17:08:34 right - interp, tp, motion module - all get touched Feb 22 17:09:55 This will probably cause great stress but I'd like to see an INI variable INTERP = lathe or mill. Feb 22 17:10:06 no stress here Feb 22 17:10:20 * jmkasunich knows nothing about the interpreter Feb 22 17:10:26 some G codes are lathe specific Feb 22 17:10:50 The code changes sounded horrible when Fred suggested how to do it. Feb 22 17:11:00 I imagine tool offsetting is much different for lathe and mill - lathe tools aren't always round Feb 22 17:11:36 tool offsets require length in Z & X as well as tip radius Feb 22 17:11:51 And round is fairly limiting even with mills. xy only Feb 22 17:12:09 and circular interpolation is always in the XZ plane Feb 22 17:12:28 how is the interp "constructed"? part of emctask? statically linked with other code, or a stand alone process, etc? Feb 22 17:12:43 Right. That was done, IMO, so that Tom wouldn't have to deal with cutter shape. Feb 22 17:13:00 I was wondering about having two interpreters, one for lathe, one for mill, and you just load the appropriate one Feb 22 17:13:23 NML Feb 22 17:13:29 the interp is linked to emctask Feb 22 17:13:52 so for different interps you'd need milltask and lathetask? Feb 22 17:14:14 be the easiest route Feb 22 17:14:20 I guess I don't see that. Feb 22 17:14:33 but the differences aren't that great... Feb 22 17:15:03 What I see is a stack of motion commands negotiated between interp and task. Feb 22 17:15:49 we have [bunch of common emctask source files]+[bunch of common interp source files]+[several machine specific source files] all linked together Feb 22 17:16:07 so add another link command that uses different machine specific files Feb 22 17:16:29 rather than adding complexity to the files themselves by making them handle both types of machines Feb 22 17:16:55 Isn't motion motion? Feb 22 17:17:09 probably, Feb 22 17:17:14 but TP might change Feb 22 17:17:19 and interp would change Feb 22 17:17:25 as far as the interp is concerned, the differences would be in tool offsets & canned cycles Feb 22 17:17:27 I was speaking primarily about interp Feb 22 17:18:26 That was my thinking. The NML output of the interpreter, and it's world view is the thing that needs to be configured for lathe. Feb 22 17:18:52 the interp knows nothing about NML Feb 22 17:19:13 Cannonical commands? Feb 22 17:19:24 I'm over my head when talking about the interp, but just rambling on, it would be nice if each canned cycle was a separate source file... if lathe needs G33, then g33.o gets linked into the lathe interp Feb 22 17:19:50 not quite as simple as that, but doable. Feb 22 17:20:19 certainly splitting out the canned cycles *should* be done. Feb 22 17:20:54 Interesting idea if we made a macro.o. Feb 22 17:22:04 ultimately, I want conditionals and branching too Feb 22 17:24:17 You bet. I just don't know how the "world view" will take to it. Feb 22 17:24:53 Maybe we ought to get Tom at Fest to describe world view. Feb 22 17:25:36 conditional & branching is part of ISO G code Feb 22 17:35:27 hey...I'll bet matt knows about getting the logging to work... Feb 22 17:36:06 That's what I need. A big file full of following error data Feb 22 17:36:20 tuning ff0, ff1, ff2 Feb 22 17:36:51 without wishing to sound like a stuck record ... Feb 22 17:37:05 did you see what Art did with the rutex tuning? Feb 22 17:37:13 no what Feb 22 17:37:32 ive not played with it .. but basically, it draws a graph of the actual servo response Feb 22 17:37:43 and repeatedly runs a point to point motion Feb 22 17:37:57 you tweak PID and watch the graph in real time Feb 22 17:38:18 cool Feb 22 17:38:24 start of with say 5 steps, increase it to 1000 or more once the tuning is ball park Feb 22 17:38:43 I have pid zeigler nichols tuned pretty well Feb 22 17:38:59 but am currently running without ff Feb 22 17:39:02 sounded like a neat graphical tool for the average user Feb 22 17:39:07 * mshaver hasn't done logging yet... still reading... Feb 22 17:39:23 you see I costed up the plaques based on segmentqueue Feb 22 17:39:23 sounds like emcstripchart Feb 22 17:39:34 now I am a little desperate Feb 22 17:40:02 paul_c: yes, similar .. except AIUI stripchart shows waht hapapned, this shows whats happening .. slight difference Feb 22 17:40:13 robin_sz: How do we read the actual response of a motor on the other side of a Rutex? Feb 22 17:40:35 rayh: not sure .. I think its all I2C comms on the rutex Feb 22 17:40:49 robin_sz: emcstripchart plots live data as it is happening. Feb 22 17:41:04 I guess the position comes is read of the encoders directly anyway Feb 22 17:41:10 paul_c: OK, that sounds similar then Feb 22 17:41:34 robin_sz: halscope will do similar for emc2 Feb 22 17:41:40 paul_c: so with a simple series of G1X0, G1X20; repeat until bored; we are there Feb 22 17:41:46 jmkasunich: right. sorted then Feb 22 17:42:03 but ... can we tweak the variables of PID as we watch eh? Feb 22 17:42:09 well if I could just see the data I get following error down to just about nothing Feb 22 17:42:24 (with ff) Feb 22 17:42:28 if we export the tuning params as hal parameters, then yes, we can tweak them Feb 22 17:42:35 'k Feb 22 17:42:43 halcmd setp Feb 22 17:43:13 if we were so inclined we could write a gui that displays multiple params and lets you click on one to change it Feb 22 17:43:39 I might do that eventually, on the back burner for now Feb 22 17:43:50 robin_sz: You need to come to NAMES + Fest for (at least) 2 reasons: Feb 22 17:44:22 robin_sz: 1. To help us compare Mach2 to emc. Feb 22 17:44:45 robin_sz: 2. To contribute your C++ expertise. Feb 22 17:45:04 my C++ expertise is not that strong ... Feb 22 17:45:20 my general OO design is good though Feb 22 17:45:22 stronger 'an mine! Feb 22 17:45:30 as for mach2 Feb 22 17:45:40 well, use the best bits :) Feb 22 17:45:44 Wait a minute. You're saying that rutex has I2C and shows position??? Feb 22 17:46:02 AIUI its soemthing like that .. I dont have a rutex, Feb 22 17:46:09 that's it though, I've (we've) never used it so aren't familiar Feb 22 17:46:11 just been watching the list Feb 22 17:46:12 Remember that rutex is open loop. Feb 22 17:46:21 sorta ... Feb 22 17:46:42 but you can hook the endocders back up to the PC as well as the rutex drive Feb 22 17:46:53 so you know where it is ... Feb 22 17:46:56 If you have an stg or KM board. Feb 22 17:47:20 nah, mach2 can take encoders straight up a parallel port Feb 22 17:47:26 or does rutex have encoder pos as I2C Feb 22 17:47:27 so long as speed is not too oquick Feb 22 17:47:46 And are willing to make a driver for both it and the rutex or gecko. Feb 22 17:47:50 so can emc2 with jmk's encoder component Feb 22 17:48:02 quite Feb 22 17:48:18 But you still have to have a way to get the signals into the PC. Feb 22 17:48:20 and in mach2 the readout from the encoders is jsut that ..a readout Feb 22 17:48:30 its not involved in the control at all Feb 22 17:48:43 rayh: emc2 can read encoders in software, just bring them in the parport Feb 22 17:48:52 up to 10KHz, maybe higher Feb 22 17:48:57 Right but fast enough to tune Feb 22 17:49:09 a 6 k rpm motor Feb 22 17:49:17 what ppr encoder? Feb 22 17:49:07 yeah, fast enough for a graph Feb 22 17:49:19 something I want to try is to control a servo system using polled encoder feedback through an ordinary port and a dac made form a port + an r2r ladder Feb 22 17:49:21 with a 2k encoder? Feb 22 17:49:56 100 rev/sec * 2k ppr = 200khz - not reading that in SW (neither is mach2) Feb 22 17:49:57 How fast do we have to poll that parport to do that. Feb 22 17:50:24 quite Feb 22 17:50:36 to read encoders in SW you need to poll at least the count rate, preferrably twice the count rate. Feb 22 17:50:47 I've polled at 20KHz on a 233MHz box Feb 22 17:50:50 better off running it into a counter and snapshotting it Feb 22 17:50:50 1/2 the period of one encoder tick Feb 22 17:51:25 if you need faster, use STG, or Jon's board, or Abdul's board, or whatever. with hal, you can mix and match Feb 22 17:51:42 but to catch the quadrature pahse shift it would have to be x4 right? Feb 22 17:51:48 phase Feb 22 17:51:59 at least Feb 22 17:52:13 you need to sample at >= the "count" rate - that is x4 the cycle rate Feb 22 17:52:16 so you limit your "active tuning" routine to axis speeds compatible with polled encoder interfacing & extrapolate the high speed behavior Feb 22 17:52:35 so when I was sampling at 20HKz, I could capture up to 20K counts or 5K cycles per second Feb 22 17:52:43 simple impulse tuning can ge most of it done Feb 22 17:52:48 how close are we to having a working emc2 system ? Feb 22 17:53:09 * robin_sz holds his arms way way apart Feb 22 17:53:12 I think Matt has the motion modules sort of working Feb 22 17:53:34 integration to the rest (emctask, emcio) is a way off I think Feb 22 17:53:44 OK... That leaves the run script to get working Feb 22 17:53:47 with 0.001" resolution, jmk could tune at 5"/sec, right? that's pretty fast... Feb 22 17:53:59 Ah. The rutex page offers optional SPI Interface for host control. Feb 22 17:54:30 impulse tuning can have problems with non linear stick slip Feb 22 17:54:33 mshaver: care to comment on the state of emc2 motion module? Feb 22 17:54:48 re: integration - if I can get the motion<->hal stuff going, the rest will follow pretty closely Feb 22 17:55:25 * paul_c has tkemc<->motion working... Feb 22 17:56:33 mshaver: I have a busy week (I really shouldn't even be here now), but starting next week I should be able to help with that) Feb 22 17:57:45 back to motion<->HAL Feb 22 17:58:02 If halScope will do all the logging Feb 22 17:58:30 and deal with pin polarties Feb 22 17:58:54 great chunks of code can go... Feb 22 17:59:22 along with most of the macros defined in mot...h Feb 22 17:59:35 that's the idea Feb 22 18:01:40 but will halScope handle non-HAL data ? Feb 22 18:02:29 no and yes Feb 22 18:02:42 no it won't handle non-hal data, but Feb 22 18:02:59 any data can become hal data if you export it as a parameter... Feb 22 18:03:34 is there a limit on how many HAL parameters there are in a system ? Feb 22 18:04:08 limited by the size of the hal shmem area - takes about 40-50 bytes for each parameter/pin/etc, mostly for the name Feb 22 18:04:42 currently the shmem size is 64k, cause my rtai box complains about larger blocks, but I think that's a config issue Feb 22 18:05:07 anywan, we can handle 1000+ items as it is now, and that should be expandable Feb 22 18:05:37 also, any process can export parameters, even if it doesn't otherwise use hal Feb 22 18:07:05 re: the current state - I've got it to where I can load all the modules + usrmot. I can then say, "dac 0 2.5" in usrmot and 2.5 shows up on the axis0.volts HAL pin Feb 22 18:07:05 I can't yet do a "halcmd axis0.position 2.5" and have the readout in usrmot change :( Feb 22 18:07:05 I think the problem is in exthalmot.c in the function encder_real_all() Feb 22 18:07:06 I don't think I'm addressing the array of postion values that's passed to the function as an arg Feb 22 18:07:08 not correctly addressing anyway... Feb 22 18:07:10 plus, I need to make a run script that sets everything up with one command to make testing easier Feb 22 18:08:31 scripts/realtime start Feb 22 18:09:06 I should modify scripts/hal_demo to use the realtime script Feb 22 18:09:14 I mean sets up all the hal links from module to module, etc. Feb 22 18:09:56 matt: you might want to use hal_demo as a pattern for such a script - the circle demo does that, you could either add another demo to the list, or copy the file and hack away at it Feb 22 18:12:19 in the meantime, can we change the name of motmod.o to motion.o ? Feb 22 18:12:34 fine by me Feb 22 18:12:58 paul_c: It's on my list! Feb 22 18:13:27 I'll see what I can do in the next few days Feb 22 18:13:35 my task this week then: Feb 22 18:14:00 commit a run script and a basic set of config files. Feb 22 18:14:53 should tool.tbl be in the root dir, configs, or programs ? Feb 22 18:15:21 configs Feb 22 18:15:33 paul_c: what should we call the run script? I was thinking about "emcrc", more unixy? Feb 22 18:15:50 that would be .emcrc Feb 22 18:15:54 paul_c: want my configs thought? Feb 22 18:16:08 do I ? Feb 22 18:16:15 you might ... Feb 22 18:16:23 ./ Feb 22 18:16:30 configs/ Feb 22 18:16:42 mill/ Feb 22 18:16:51 mill/config Feb 22 18:16:57 mill/tool.tbl Feb 22 18:17:06 lathe/ Feb 22 18:17:09 etc Feb 22 18:17:26 and the user could add mill2, etc if needed Feb 22 18:17:32 zacktly Feb 22 18:17:33 I think I like it Feb 22 18:17:38 mill.config & mill.tbl Feb 22 18:17:43 nope Feb 22 18:17:53 use dirs Feb 22 18:18:08 tool tables should be linked to program files... Feb 22 18:18:41 'program files' ? Feb 22 18:18:48 *.ngc Feb 22 18:18:50 hmmm... this is starting to look like we're talking about the user's directory tree Feb 22 18:19:04 which brings up the matter of "make install" Feb 22 18:19:22 I normally associate tool tables with machines ... Feb 22 18:19:33 it sounds like we want the user to store his part programs in the emc2 tree Feb 22 18:19:57 should we install emc like other unix apps? (in /usr/bin, etc.) Feb 22 18:20:03 perhaps make install should install emc2 on the users machine, and we don't tell him where to put his part programs Feb 22 18:20:05 uh huh Feb 22 18:20:10 program files should be in the home dir Feb 22 18:20:23 'the' home dir? Feb 22 18:20:29 the users home dir? Feb 22 18:20:34 there is a programs dir in the tree, but I understood those to be samples that come with emc, not the users stuff Feb 22 18:20:38 ~/emc Feb 22 18:20:54 or summat Feb 22 18:21:45 perhaps the tool tables should also be in ~/emc, not in the emc2 tree itself - they are also user specific Feb 22 18:22:01 with samples & configs in /usr/share/emc Feb 22 18:22:06 anwyay ... I like the idea of a dir for each machine or machine setup, with the configs, the .var files etc for that particular setup all in one place ... Feb 22 18:22:23 I would prefer to see them keeping a common name across different dirs Feb 22 18:22:54 and using # for comment lines... Feb 22 18:23:29 ./run_emc -d config/mill Feb 22 18:23:47 robin_sz: I think you're ight, rather than .ini, .run, etc. Feb 22 18:24:03 * robin_sz thinks he is right too ;)