On Tue, 2008-06-24 at 21:32 -0700, [EMAIL PROTECTED] wrote:
> Hi all
> I need to have the tool prep number output as a 4bit BCD

You may need to make a small HAL component to convert your
iocontrol.0.tool-prep-number into your 4 bits. It could be a routine to
divide by two to extract each bit. If I recall correctly one four bit
word of BDC is good for 9 tools.

Check here for the current components:

http://linuxcnc.org/docview/html/

and "comp" tool:

http://www.linuxcnc.org/docview/html//hal_comp.html

For my lathe, I used an encoder to get the current turret slot number in
four bit binary, then compared it to the slot requested, and stopped
seeking when I got a match. I converted the binary to decimal with the
weighted sum component:

http://www.linuxcnc.org/docview/html//man/man9/weighted_sum.9.html

which was already available. I then wrote a component to handle the
sequencing and timing. After some study, making your own components is
fairly easy.
 
> The machine already has a plc that will use that format (along with a
> start tool change output
> and a finish tool change input )
> I looked through the archives for an example but most are a swing arm
> type
> tool changer mine is a carosel where the tool in the spindle will go
> back
> to the pocket it came from 
> I am using a Mesa 5i20 card if that helps or not
> 
> 
> Thanks in advance
> 
> Terry

I have a mill with a tool changer that sounds like it might be similar
to yours. Currently, tool one of twenty four has a home switch on it.
The original system I believe expected the operator to home the carousel
at power-up, then the system would keep track of the number of bucket
moves. I plan on making a six bit encoder and use the same system as my
lathe.

-- 
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)


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to