Thanks for that Jon. That helps explain this a bit further. I believe the base period in the ini is set to 100,000. Not sure if that is nS or u value? Can this be change to suit or is it tied to the speed of the system?
On Thu, May 7, 2020 at 6:54 PM John Dammeyer <jo...@autoartisans.com> wrote: > > > -----Original Message----- > > From: Dan Henderson [mailto:luvtof...@gmail.com] > > Sent: May-07-20 2:40 PM > > To: Enhanced Machine Controller (EMC) > > Subject: Re: [Emc-users] Fluctuating RPM using CUI ATM 10 encoder > > > > Why certainly Gene (see attached). I actually have it working a little > > better now. My spindle-at-speed LED will start going bonkers around 1200 > > rpm. I'm guessing this is when the counter "throws up it's hands and > says - > > I quit!" lol. The spindle will operate all the way to around 4700 rpm but > > anything above this and the MC-2100 shuts it down -- must be some kind of > > voltage limiter kicking in then. > > > > If you look at the source code for "encoders.c" John Kasunich's excellent > documentation says this: > > "The driver exports variables for each counters inputs and output. > It also exports two functions. "encoder.update-counters" must be > called in a high speed thread, at least twice the maximum desired > count rate. "encoder.capture-position" can be called at a much > slower rate, and updates the output variables." > > So if your encoder provides a quadrature count of 200 lines (800 > quadrature) and you turn that spindle at 4700 RPM (78.3333RPS) then 800 > pulses/turn * 78.33333 turns/sec = 62.666KHz so your BASE_PERIOD must be > at least 125kHz (8,000 nS) > > In your working example 1200 RPM is 20 RPS * 800 = 16,000 and twice that > is 32,000Hz (31,250 nS BASE_PERIOD). > What is your BASE_PERIOD set at in your INI file? > > Work it backwards. For example my PP HAL file says 24,000nS for the BASE > THREAD (41,667kHz). Assuming I have a 200 line encoder on the spindle then > 41,667kHz/2=20,8333 and divided by 800 = 26 RPS or 1562 RPM. Since I want > to turn my spindle up to 3000 RPM that means either I have to decrease the > BASE_PERIOD (increase frequency) or reduce the spindle encoder count to > about 100. > > That means I need no more than 100 slots per rev on a disk. That's doable > and from what I've read lots of people can thread with that. > > And, Sam Sokolik has been able to do rudimentary hex holes (although > slowly) with less than that. > > Now since I have a MESA 7i92H all the numbers will change. I've not yet > looked at the MESA software. > > Haven't even really followed the entire path from a > G33.1 Z-0.55 K0.025 > to the Z axis motion in steps/second tracking spindle RPM. > > John Dammeyer > > > > > > > > > > > > On Thu, May 7, 2020 at 2:29 PM Gene Heskett <ghesk...@shentel.net> > wrote: > > > > > On Thursday 07 May 2020 13:19:23 Dan Henderson wrote: > > > > > > > I believe this is open loop. Isn�t PID only used in closed loop > > > > control? > > > > > > > Its (the PID is) a waste of processor time if open loop. I don't use > one > > > of those in any spindle run by a vfd, the vfd is generally stiff enough > > > control by itself. If I thread on that machine, it will have a spindle > > > encoder, but its only job is to glue the axis motion being driven to > cut > > > the thread, to the spindle rotation, in the case of a g33.1, going both > > > in and out of the hole. If you aren't useing a PID for the spindle, > that > > > leaves motion I think. > > > > > > I think its time we saw your .hal file. Can you insert it into a mail? > > > > > > > On Thu, May 7, 2020 at 11:03 AM Gene Heskett <ghesk...@shentel.net> > > > wrote: > > > > > On Thursday 07 May 2020 11:27:57 Jon Elson wrote: > > > > > > On 05/06/2020 09:20 PM, Dan Henderson wrote: > > > > > > > I�ve confirmed the fluctuation occurs when spindle-at-speed is > > > > > > > configured. When I remove this feature, the spindle rpm appears > > > > > > > to stabilize. It�s almost like it gets caught in a loop trying > > > > > > > to chase its tail. > > > > > > > > > > > > This is VERY common in servo systems, and is due to delay in > > > > > > response of the object being controlled. > > > > > > You need to slow down the response of the PID to ignore the > > > > > > delay. This may be possible by adding > > > > > > D to it. > > > > > > > > > > > > Jon > > > > > > > > > > But my msg was that a near module generated spindle.N.at-speed was > > > > > never to be injected into any signal path leading back to a PID. > > > > > That near's output s/b only to that input to motion, and possibly > to > > > > > an indicator led in the gui so the operator can be advised if its > > > > > acting funkity. Flickering could be worn brushes in a brushed PMDC > > > > > motor for instance. > > > > > > > > > > What you are describing as delays can often be fixed by the proper > > > > > re-ordering of the addf's involved for the oscillating axis. That > > > > > aspect of configuring LinuxCNC hasn't been mentioned recently or I > > > > > wouldn't even have included that paragraph in my reply. > > > > > > > > > > And from Dan's description above, I think this is an entirely > > > > > different critter from a timeing delay. > > > > > > > > > > Cheers Jon & stay well, Gene Heskett > > > > > -- > > > > > "There are four boxes to be used in defense of liberty: > > > > > soap, ballot, jury, and ammo. Please use in that order." > > > > > -Ed Howdershelt (Author) > > > > > If we desire respect for the law, we must first make the law > > > > > respectable. - Louis D. Brandeis > > > > > Genes Web page <http://geneslinuxbox.net:6309/gene> > > > > > > > > > > > > > > > _______________________________________________ > > > > > Emc-users mailing list > > > > > Emc-users@lists.sourceforge.net > > > > > https://lists.sourceforge.net/lists/listinfo/emc-users > > > > > > > > _______________________________________________ > > > > Emc-users mailing list > > > > Emc-users@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/emc-users > > > > > > > > > Cheers, Gene Heskett > > > -- > > > "There are four boxes to be used in defense of liberty: > > > soap, ballot, jury, and ammo. Please use in that order." > > > -Ed Howdershelt (Author) > > > If we desire respect for the law, we must first make the law > respectable. > > > - Louis D. Brandeis > > > Genes Web page <http://geneslinuxbox.net:6309/gene> > > > > > > > > > _______________________________________________ > > > Emc-users mailing list > > > Emc-users@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/emc-users > > > > > > > _______________________________________________ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users > _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users