Hi My first time here, hope you can assist.
I have a working stepper driven lathe under Mach, but am not happy with Mach on many levels and use Linux for everything else, so am migrating to EMC2. I have all the basic stuff working, but I cannot do any threading. I have a single pulse from the spindle from a hall-effect sensor. (On the opposite side of the pulley I have embedded 4 magnets, 1 x 10mm and 3 x 4mm, which if the pickup is shifted, give a 'timing pulse' which works with Mach, so could use that set up) I found an archived reply on this forum as below to a very similar query /"You need an index input, as EMC doesn't start a threading pass until it sees an index. Looking at http://www.linuxcnc.org/docview/html/examples_spindle.html (the last section) I think you need at least the following lines added to your HAL loadrt encoder num_chan=1 addf encoder.update-counters base-thread addf encoder.capture-position servo-thread setp encoder.0.position-scale 1 net spindle-position encoder.0.position-interpolated => motion.spindle-revs net spindle-velocity encoder.0.velocity => motion.spindle-speed-in net spindle-index-enable encoder.0.index-enable <=> motion.spindle-index-enable net spindle-pulse-and-index parport.0.pin-11-in => encoder.0.phase-A encoder.0.phase-Z ;set to correct pin. " /I am afraid I do not understand how encoder.0.phase-Z could be connected to anything, there is only one index pulse. I included the above into my .hal minus the last line. The lathe still does not start a threading cycle and if I watch the spindle-pulse-and-index, it does change but only every 5 seconds or so, not continuous flickering as I would expect. If I rotate the spindle manually, I get a positive indication every rev, so maybe the hal monitor display just cannot update quickly enough. Have I missed something or is the answer that you cannot thread with just an index pulse and you must have a timing pulse too, connected to encoder.0.phase.Z perhaps?? Would my 4 magnet set-up through a second pickup provide that, if a timing pulse is required , or is that too coarse? thanks Mick ------------------------------------------------------------------------------ _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
