On Fri, 2008-08-15 at 23:13 +0200, josep M. giili freixa wrote:
> i have a lathe retrofited whit servos. I tried to run it whit Mach3
> but i have problems when threading. Now testing Emc2  but when
> configuring it whit Stepwizard all run fine except threading. Gcode
> stops in g76 line waithing for spindle sincro.
> I`m unable the get a explanation in the manuals of how arrange spindle
> sincro for threading in the Hal file.
> I have a simple 2 axis step-dir and a spindle whit 200 ppr encoder
> A,B,Z chanels .
> can anyone help-me whit the Hal file i need for this lathe.
> tks. Josep.

For my lathe I copied Jon's (Pico Systems) config files. From those I
pulled out the threading parts and modified a little.
~~~~~~~~~~~
# Set the s/w encoder scale to match the physical encoder
setp encoder.N.scale [SPINDLE]INPUT_SCALE

# Connect encoders to EMC2's software decoders
net SpindleEncoderA parport.<portnum>.pin-<pinnum>-in encoder.N.phase-A
net SpindleEncoderB parport.<portnum>.pin-<pinnum>-in encoder.N.phase-B
net SpindleEncoderZ parport.<portnum>.pin-<pinnum>-in encoder.N.phase-Z

# Connect the s/w encoder index to the motion controller
net spindle-index-enable (continues on next line)
encoder.N.index-enable motion.spindle-index-enable

# Connect rev count (actually s/w encoder scaled output) 
# to the motion controller
net spindle-pos encoder.N.position motion.spindle-revs

~~~~~~~~~~~
I think that's it.

Basically you set up an encoder and scale it to the number of counts per
revolution, then feed the index and the encoder counts since last index
to the motion controller. At the start of each thread pass, EMC2 waits
for an index. When the index triggers, the count is zero'd and then the
Z axis is moved based on the spindle's count. At the end of the thread
to tool is retracted, moved to the beginning and waits for another index
to zero on. 

-- 
Kirk Wallace (California, USA
http://www.wallacecompany.com/machine_shop/ 
Hardinge HNC/EMC CNC lathe,
Bridgeport mill conversion, doing XY now,
Zubal lathe conversion pending
Craftsman AA 109 restoration
Shizuoka ST-N/EMC CNC)


-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to