After struggling unsuccessfully for a long time to try to find the direct relevance between the HAL tutorial and driving my stepper spindle ( I haven't yet given up on this as I get the impression that it may give me a bit more speed ) , I came across a script that Geert had made a year or so ago. With a little bit of tweaking this is now embedded in a lathe HAL file and is driving the spindle motor. I must admit that I can't understand just how this script works as it seems totally different to the HAL tutorial and this is the reason that I still have a couple of problems that I can't sort out. The HAL and INI files are here - www.watchman.dsl.pipex.com/cnc/lathe.hal and www.watchman.dsl.pipex.com/cnc/lathe.ini .
The only way I found to get any speed out of the stepper with this script was to tweak the BASE_PERIOD and SERVO_PERIOD in the ini file until the computer began to complain - I think they may still need a little adjustment as I occasionally still get a 'real time task delay' error. Having done this, I can get the stepper to run up to 300 R.P.M - not as fast as I would have liked but still fast enough for most of the things I want to use it for at the moment. However, to get it to run at this speed via G-code I need to tell it to M03 S60000 ! Try as I might I can't see where I should apply a scaling factor to bring this down to a realistic figure. Oh, and the link to John's description of how EMC2 works 'under the bonnet' seems to be broken from the linuxcnc page. If anyone can offer any advice to get me a bit further on with this I would be most grateful. I now need to try to learn about classic ladder to find a way to set or alter the spindle direction......... -- 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 the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users