[Emc-users] hal pid - how it works
I am looking at hal pid component in hal documentation and i don't understand how pid component for servo motors driving actually works. There is only command input to hal pid component (beside the feedback input). How is then the constant motor speed (or acceleration or synchronization with others motors) achieved. If you input the desired location (command input) to pid component the motor speed and acceleration will be set according to set pid parameters and will not be constant. Is desired path cut to small portions and fed to pid input in suitable time steps - if so, how is smooth movement of motor achieved in this case? Regards Klemen Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] Stepper strangeness - mixed up ini?
Thanks Alex Brian, I think I understand a bit bettter now but I'll have a play around tomorrow all being well ( I've been a bit under the weather for the last few days which is why I didn't get it sorted after I first wrote... Damn winter flu or 'man-flu' as my daughter calls it!!). Alex, yes the figures of 10,000+ and 2,000 are the ones reported in AXIS. You are correct that all the motors are 200 step ones driven in half step mode by simple L297/L298 drivers... except perhaps the one on the rotary axis which drives a 90 tooth worm and wheel - I ended up with a scale figure of 50 here and an A360 command does give one complete revolution of the table so maybe that driver is set up in full stepping mode... Brian, I had missed the trick of having DEFAULT_VELOCITY and MAX_VELOCITY set to cover the whole range of all the axes - I'll change that. You are right that the rotary table moves quite fast now, in fact, it is happy going at an indicated speed in AXIS of 2200 - whatever that equates to... This has really pleased me as I was struggling with the idea of setting up a servo motor on a little lathe headstock so that I can do threading and rigid tapping but, with steppers able to get up to this speed, I can probably forget servos for the time being and just hook up another stepper... The problem is though, that while I have made MAX_ANGULAR_VELOCITY = 2400 and DEFAULT_ANGULAR_VELOCITY = 2200 in the axes section of the ini file, when I start EMC2 up, the Jog Speed setting indicated in AXIS is about 12,000 and it is where this figure is coming from that I don't understand. Anyway, I'll have another play and, if I can't sort it, I'll post some more definite details.. -- Best wishes, Ian Ian W. Wright Sheffield UK The difference between theory and practice is much smaller in theory than in practice... - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users
Re: [Emc-users] hal pid - how it works
On Mon, 18 Feb 2008, Klemen Dovrtel wrote: I am looking at hal pid component in hal documentation and i don't understand how pid component for servo motors driving actually works. There is only command input to hal pid component (beside the feedback input). How is then the constant motor speed (or acceleration or synchronization with others motors) achieved. If you input the desired location (command input) to pid component the motor speed and acceleration will be set according to set pid parameters and will not be constant. Is desired path cut to small portions and fed to pid input in suitable time steps - if so, how is smooth movement of motor achieved in this case? Regards Klemen PID is only useful for controlling one physical quantity, such as a single motor's position. Although there is a single 'module' containing all of the different PID channels, they are completely separate from a control standpoint. Each servo cycle (defined by the length of the servo thread period) each PID controller reads the commanded value and feedback value, and updates its output based on the gain constants. You can think of P as a spring attached to the desired location, I is like a regulated gas cylinder with a restricted orifice, and D is somewhat like a damper. Together these components can produce fast movement to the desired point without oscillation. On top of this layer of control, the motion module tells PID to move in a cubic curve (position vs time) so that the discrete commanded movement is close to what is physically realizable. In conjunction with the kinematics module, the motion module also handles synchronized movement. Typical values for a servo cycle are around 0.1-1 milliseconds, so the amount of divergence in a cycle between the curved path created by a set of joints in a non-trivial kinematic configuration and the ideal straight line will be small, and will be corrected for in the next cycle. This is like approximating a curve with small line segments, but in reverse. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users