On Tuesday 08 July 2014 12:05:20 Sebastian Kuzminsky did opine And Gene did reply: > On 7/8/14 09:05 , John Kasunich wrote: > > I believe Jeff Epler wrote a HAL component years ago to > > do just this. I'm not at a Linux box right now, but I think it > > might be called "offset". It adds a value to the outgoing > > position command, and subtracts the same value from the > > incoming position feedback. It is intended to be installed > > between motion and either the PID loop (servo) or the > > stepgen (stepper). > > > > The other half of the equation, accel and velocity limiting, > > also has a ready-made HAL component, limit3. The offset > > from the THC goes into limit3, and even if it instantly steps, > > the output of limit3 obeys acceleration and velocity limits. > > That output would then go to the offset block. > > This sounds perfectly reasonable to me. (Disclaimer: i dont know how a > torch height controller should work.) > > Here's an ascii-art pseudo-code hal diagram describing how i'd try to > do it: > > thc.voltage -> pid -------\ > axis.N.motor-pos-cmd -> offset -> limit3 -> (actual joint cmd) > axis.N.motor-pos-fb <---/ ^---------------(actual joint fb) > > The pid component would maintain the thc voltage by adding or > subtracting an offset to/from the commanded Z position as needed, based > on torch voltage (and some statically controlled setpoint). > > Maybe some extra circuitry to toggle the pid enable pin when the > corner-lock condition kicks in.
I'd think not Sebastian, as the man page says disabling that zero's everything at the PID.N.out. error too. Would it not be better if the enable pin going false froze it at the current state? But from the manpage, I don't see how that could be done. Maybe a sample-hold between the output and the load, and freeze it at the last sample? I can see where that might "wind up" the PID, so maybe its the PID.N.cmd that needs the sample-hold. Obviously I'm playing "pin the tail on the donkey" here till the donkey objects and kicks me into the next drainage. ;-) Ideally, the PID should stop calculations at the servo-thread rate while corner-locked, but I don't know how a gate could be put between the servo- thread and the PID execution, effectively switching it in and out of the servo-thread execution loop. I just don't see how it could be done in the .hal file. Maybe its PID that needs a modification, an added "do-calcs" pin, and feed the corner-lock into that. If do-calcs is false at the entrance to the modules execution, do nothing and jump straight to the exit? That would freeze it in its present state I would think. > The limit3 component limits would be setp to the joint position, > velocity, and acceleration limits from the ini file. 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) Genes Web page <http://geneslinuxbox.net:6309/gene> US V Castleman, SCOTUS, Mar 2014 is grounds for Impeaching SCOTUS ------------------------------------------------------------------------------ Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
