I'm not sure what level you're thinking about when you ask this question. If you're thinking in high-level terms like how to connect existing components, you can use pid to control a velocity simply by making its command and feedback be velocities instead of positions.
If you're thinking in low-level terms like what APIs there are for hal components, each thread has a period, which is the theoretical time in nanoseconds between runs of the realtime code. In components written in C, this is passed as the second argument to the function. In components written in comp, this is available as 'period' in any FUNCTION() and the convenience macro fperiod can be used to refer to the number as a floating-point number of seconds. This is often used for velocity calculations. For instance, stepgen uses it for velocity-mode control of steppers, and encoders use it to estimate velocity from received quadrature pulses. Other ways to access some notion of time in a realtime component are rtapi_get_clocks() and rtapi_get_time(). Jeff ------------------------------------------------------------------------------ What happens now with your Lotus Notes apps - do you make another costly upgrade, or settle for being marooned without product support? Time to move off Lotus Notes and onto the cloud with Force.com, apps are easier to build, use, and manage than apps on traditional platforms. Sign up for the Lotus Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
