Re: [Emc-users] My HNC Lathe Remap M Codes

2015-07-13 Thread Erik Christiansen
On 12.07.15 08:33, Kirk Wallace wrote:
> It takes a while for the flux in a clutch to collapse after turning the 
> signal off. 
  ...
> I suppose I could improve the clutch driver to short the coil to
> ground or drive it low, but some sort of delay will be needed anyway.

Probably. Is the current flowing after driver turn-off circulating
through a simple flywheel diode? That's great for protecting the driver
against the turn-off back-emf, but makes for a slower field decay than
would occur with a zener diode in series with the flywheel diode. The
higher the clamp voltage (but still well within the driver's ratings),
the more quickly the field decays. A Transorb comes to mind as a beefy
clamping device, available in just about every voltage rating you could
wish for.

There's also the question of the quality of the solenoid clutch winding
insulation. Allowing 100v of back-emf would doubtless be risking
insulation breakdown on a nominally 12v coil, for example.

Erik

-- 
Bertolt Brecht: Grub first, then ethics.

--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] My HNC Lathe Remap M Codes

2015-07-12 Thread Kirk Wallace
I mentioned remapping m-codes my HNC lathe on IRC. So far it looks like 
I got M41/M42 working (Thank you Michael H.).

M41 Spindle Low, releases the high speed clutch and engages the low
M42 Spindle High, releases the low speed clutch and engages the high

http://www.wallacecompany.com/cnc_lathe/HNC/00051-1a.jpg
http://www.wallacecompany.com/cnc_lathe/HNC/

It takes a while for the flux in a clutch to collapse after turning the 
signal off. The newly energized clutch engages almost instantly, so the 
two clutches bind up the works and stop the motor and spindle -- not 
good. A G4 like delay was added to allow the current clutch to disengage 
before engaging the new clutch. I suppose I could improve the clutch 
driver to short the coil to ground or drive it low, but some sort of 
delay will be needed anyway. I'm thinking a smarter driver could also 
soft start the engagement, ... or I could just remember to stop the 
spindle before changing speed range ... which would also solve the 
clutch binding problem -- too many options. Maybe I will need to add 
logic to check that the motor is stopped.

There may be a chance that an M40 neutral code might be handy, but I'm 
not sure why at the moment.

M41/M42 was chosen because it seems to be popular:
http://www.helmancnc.com/cnc-m41-m42-m-codes-for-gear-selectio/


Edits to my existing configuration:

> hnc.ini
> ~~~
> ...
> [RS274NGC]
> ...
> REMAP=M41  modalgroup=10 py=m41
> REMAP=M42  modalgroup=10 py=m42
> ...
> [PYTHON]
> TOPLEVEL= /home/kwallace/linuxcnc/configs/python/toplevel.py
> PATH_APPEND = /home/kwallace/linuxcnc/configs/python
> ...
> ~~~


> toplevel.py (new file)
> ~~~
> #!/usr/bin/python
>
> import remap
> ~~~


> remap.py (new file)
> ~~~
> #!/usr/bin/python
>
> import emccanon
>
> def m41(self, **words):
> emccanon.CLEAR_AUX_OUTPUT_BIT(1)  # spindle high clutch
> emccanon.DWELL(1) # allow time for the clutch to release
> emccanon.SET_AUX_OUTPUT_BIT(0)# spindle low clutch
> return
>
> def m42(self, **words):
> emccanon.CLEAR_AUX_OUTPUT_BIT(0)  # spindle low clutch
> emccanon.DWELL(1) # allow time for the clutch to release
> emccanon.SET_AUX_OUTPUT_BIT(1)# spindle high clutch
> return
> ~~~




-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/

--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users