On Fri, 09 Apr 2010 15:40 +0200, "Slavko Kocjancic" <[email protected]> wrote:
> > While I'm not C programmer I throw view in source to check how to manage > that. But I'm lost. The home routines are in separate file but are > little complicated. I have simple aproach in mind. When home move is > ended just calculate difference from current position and home position. > But found that isn't so easy. The machine coordinate are preseted in > midle of sequence too. As machine need to reset coordinate in correct > place to get screw compensation ready. > > Other option seems to be something like: > > save all joint's positions > call doHome > calculate differences and print message > > ...but can't find that doHome point. Seems that homing is just initiated > and finish is in motion routine. ?!? > > just to much for me... Real-time control software tends to look a little different. The code runs from beginning to end at a specific interval - usually every 0.001 seconds for mot of EMC's motion control code, including the homing code. The homing code contains a state machine. If the state is IDLE, then it does nothing. Otherwise, it takes actions depending on the current state. That action may include changing to another state. I'm somewhat reluctant to do something like this inside the homing code. It is a niche function, and would probably not work at all (and even give false indications) if used on a servo machine with index pulses. However, it might be possible to do the detection in an external (custom) HAL component. The homing state is brought out on a HAL pin, so the component can know what is going on. Regards, John Kasunich -- John Kasunich [email protected] ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
