CAD CAM EDM DRO - Yahoo Group Archive

Re: [CAD_CAM_EDM_DRO] EMC2 Screw Cutting Problem

on 2008-05-21 07:13:29 UTC
mart_wid wrote:

>Hello group, this is my first post.
>I would like to use my lathe with EMC2. I have set it up successfully
>in the past with both Mach 3 and TurboCNC. The problem I have is with
>screw cutting not functioning. Both axes move very smoothly and the
>spindle index signals (1 ppr and 48 slots) show up with good clean
>pulses in Halscope, so I know communication is ok. When I run one of
>the sample threading files all goes well up to the point where screw
>cutting starts - then the lathe stops and EMC2 waits at the G33 or G76
>line like it's waiting for spindle pulses. Does something else need to
>be setup in the Hal or Ini files? I might add that my programming
>skills are about zero so any answers must be in plain english please.
>One other thing - would it be hard to get spindle speed on screen? Many
>Thanks, Martin.
>
>
The way EMC2 does threading is basically by electronically gearing axis
motion to the position of the spindle. That's a little different from
the way the other controls do it - I think they use estimated velocity
to more or less do feed rate scaling.

It's not clear to me that you have loaded an encoder counter to read the
spindle feedback. When using Halscope, were you looking at the parallel
port pins? I'll assume that the two bits are connected to parallel port
pins 11 and 12 - you'll need to edit those to whatever is appropriate
for your machine. Lines that begin with "#" are comments, and may be
left out or included (they'll be ignored).

Here is what you'll need to add to one of your HAL files:

#--- START HERE
# load the software encoder counting module
loadrt encoder num_chan=1

# we need counter mode, since this isn't a quadrature encoder
setp encoder.0.counter-mode 1

# 48 slots = 48 counts per revolution
setp encoder.0.position-scale 48

# reading the parallel port needs to be done in the fast thread
addf encoder.update-counters base-thread

# updating position output can be done at a slower rate
addf encoder.capture-position servo-thread

# connect the two parallel port input pins to the encoder counter
# change the numbers to suit your setup
net count_bit encoder.0.phase-A parport.0.pin-11-in
net index_bit encoder.0.phase-Z parport.0.pin-12-in

# connect the encoder counter output to the motion controller
net spindle_pos encoder.0.position motion.spindle-revs

# connect the encoder velocity output to the motion controller, for CSS
and FPR modes
net spindle-vel encoder.0.velocity motion.spindle-speed-in

# and allow the motion controller to tell the encoder counter when to
reset the count
net spindle-index motion.spindle-index-enable encoder.0.index-enable
# --- END HERE

It looks complex, but it's not that bad, really :)
You may want some filtering on the spindle velocity output. If so, take
a look at the sample config sim/lathe - it has everything set up for
threading, CSS, FPR, nice on-screen readouts, etc.

Side note: there aren't too many EMC2 users on this list. For specific
configuration information, it may be better to ask on the emc-users
list. You can subscribe here:
<https://lists.sourceforge.net/lists/listinfo/emc-users>, or just mail
to the list here: <emc-users@...>

Hope this helps
- Steve

Discussion Thread

mart_wid 2008-05-21 06:13:36 UTC EMC2 Screw Cutting Problem Stephen Wille Padnos 2008-05-21 07:13:29 UTC Re: [CAD_CAM_EDM_DRO] EMC2 Screw Cutting Problem mart_wid 2008-05-21 14:42:33 UTC Re: EMC2 Screw Cutting Problem Stephen Wille Padnos 2008-05-21 15:40:37 UTC Re: [CAD_CAM_EDM_DRO] Re: EMC2 Screw Cutting Problem mart_wid 2008-05-22 03:34:20 UTC Re: EMC2 Screw Cutting Problem Stephen Wille Padnos 2008-05-22 11:15:08 UTC Re: [CAD_CAM_EDM_DRO] Re: EMC2 Screw Cutting Problem mart_wid 2008-05-22 13:32:53 UTC Re: EMC2 Screw Cutting Problem Stephen Wille Padnos 2008-05-22 13:40:15 UTC Re: [CAD_CAM_EDM_DRO] Re: EMC2 Screw Cutting Problem mart_wid 2008-05-22 14:49:33 UTC Re: EMC2 Screw Cutting Problem Stephen Wille Padnos 2008-05-22 15:12:52 UTC Re: [CAD_CAM_EDM_DRO] Re: EMC2 Screw Cutting Problem mart_wid 2008-05-23 10:31:58 UTC Re: EMC2 Screw Cutting Problem mart_wid 2008-05-23 10:59:54 UTC Re: EMC2 Screw Cutting Problem Stephen Wille Padnos 2008-05-23 12:27:36 UTC Re: [CAD_CAM_EDM_DRO] Re: EMC2 Screw Cutting Problem mart_wid 2008-05-23 14:25:17 UTC Re: EMC2 Screw Cutting Problem Stephen Wille Padnos 2008-05-24 07:47:21 UTC Re: [CAD_CAM_EDM_DRO] Re: EMC2 Screw Cutting Problem mart_wid 2008-05-24 10:24:43 UTC Re: EMC2 Screw Cutting Problem