On Thu, 2011-02-10 at 22:42 +1300, Marshland Engineering wrote:
> I now need to upgrade my rather large CNC Mill. I would like to
> duplicate my South Western Controller by being able to use CNC or hand
> wheels. For this I would need feedback from the servo drives back to
> the PC to be able to know where I am. 
> 
> The drives are 2 Kw Servo motors and I have servos drives for these
> using step and direction. I would feed the servo motor encoder signal
> back to the PC for the DRO input.
> 
> What card can you recommend for the PC to do the above. 
> 
> Thanks Wallace

You may not need a card. If your present system is working with a
step/dir motor driver, the encoder is wired to the driver and closes the
position feedback to the drive. If I recall correctly, in EMC2 the
display feedback loops the stepgen position to the axis position input.

---- From core_stepper.hal: ----
# connect position feedback from step generators
# to motion module
net Xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb
net Ypos-fb stepgen.1.position-fb => axis.1.motor-pos-fb
net Zpos-fb stepgen.2.position-fb => axis.2.motor-pos-fb

With this, the commanded position is assumed to be the real position
because that's the step/dir driver's job.

For a DRO setup, you can break the above connections, tap off the
present encoder, add some hal software encoders, then connect them to
the axis motor-pos-fb above.

---- From etch-servo/etch.hal ----
setp encoder.0.position-scale [AXIS_0]INPUT_SCALE
setp encoder.1.position-scale [AXIS_1]INPUT_SCALE

net enc0A encoder.0.phase-A <= parport.0.pin-10-in
net enc0B encoder.0.phase-B <= parport.0.pin-11-in
net enc1A encoder.1.phase-A <= parport.0.pin-12-in
net enc1B encoder.1.phase-B <= parport.0.pin-13-in

net Xpos-fb <= encoder.0.position
net Ypos-fb <= encoder.1.position


net Xpos-fb => pid.0.feedback  <-- don't use this connection
net Ypos-fb => pid.1.feedback  <-- don't use this connection
net Xpos-fb => axis.0.motor-pos-fb
net Ypos-fb => axis.1.motor-pos-fb
----

You'll need to add Z to the above. The PID connection is for the
position loop in EMC2, your loop is in the driver.

net Xpos-fb <= encoder.0.position => axis.0.motor-pos-fb
net Ypos-fb <= encoder.1.position => axis.1.motor-pos-fb

INPUT_SCALE is set in the .ini file, so you will need to add it to
your .ini . (BTW, the <= and => don't really do anything, they are
allowed characters that can be used to indicate data flow to the
reader.)

The problem with the above is the software encoder decoder/counter is
fairly slow, so if you have a high count encoder and high axis speeds,
you could lose counts. In this case you would need a hardware encoder
counter, such as in a parallel port FPGA board like Pico's USC, Mesa
7i43, Pluto-P, etcetera. The .hal connections would be similar to the
above. Or have two configs, keep your current config for CNC use, then
have a DRO config for manual use.
http://www.wallacecompany.com/machine_shop/EMC2/dro_vfd/ 
http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?PyVCP 

Another option is to connect the encoder feedback in a way that allows
EMC2 to check the position and set a fault if it sees a missed step. I
think this is described here:
 http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Steppers_With_Encoders 

This should get you started. I most likely missed something, or got
something wrong, so do some research to back up the above. Bonne chance.

-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/index.html
California, USA


------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to