On 03/08/2014 08:42 AM, Michael Chism wrote:
> Hi Kirk,
>
> The tool carousel I think is switch based with proxy switches.
>
> Could I use something when the tool carousel comes in, some kind of
> program to move the spindle up to a preset position (that's set off
> machine home)? Then move the. Carousel up or down till selected tool,
> then go back to the tool changer position (again referenced from
> machine home?
The tool change is set off by two g-code commands, the T word invokes a
tool prepare routine, an M6 invokes the change routine.
If you have your machine running with LinuxCNC, but without the changer,
you can most likely see this in your .hal file:
"...
# tool change loopback
net tool-prep-loop iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
net tool-change-loop iocontrol.0.tool-change => iocontrol.0.tool-changed
..."
When LinuxCNC sees an Tx it generates a tool-prep-loop
iocontrol.0.tool-prepare signal and passes the tool number. It looks in
the .hal file to see where to pass the signal, which from the above, is
connected to iocontrol.0.tool-prepared. The prepare signal is use to
tell LinuxCNC that the tool is prepared, so basically nothing happens.
If you disconnect these signals, the tool prepare can be used to invoke
a process, then the result can be used to let prepared know that the the
tool is prepared. The same holds true for the change signals.
My HNC lathe tool changer file looks something like this:
"...
### TURRET ###
# create signals for tool loading loopback
net turretPrepare iocontrol.0.tool-prepare iocontrol.0.tool-prepared
net turretChange iocontrol.0.tool-change turret.0.position-change
net turretChanged turret.0.position-changed iocontrol.0.tool-changed
..."
The prepare does nothing, but the change is linked to turret.0 which is
a HAL component.
~~~~~~~~~~~~~~~ turret.comp ~~~~~~~~~~~~~~~
pin out bit stop "Connect this pin via .hal file to the turret stop
solenoid signal.";
param rw s32 state_turret "This parameter holds the value of the current
state of the turret change process; idle, seeking, stopping, parking.";
param rw s32 settle "This parameter holds the initial value and then the
count down of servo periods to allow settling of the turret mechanism
before invoking next state proceedure.";
param rw s32 settle_stop "This is the initial settle time in servo
periods between activating the stop solenoid and when the turret comes
to rest.";
param rw s32 settle_park "This is the initial settle time in servo
periods between deactivating the turret rotate solenoid and when the
turret descends to the park position.";
function _ nofp;
license "GPL";
;;
FUNCTION(_) {
if (position_change) {
switch (state_turret) {
case 0:
if (position_requested != position_current &&
position_requested>0 && position_requested<9) {
seek=1;
state_turret=1;
} else {
position_changed=1;
}
break;
case 1:
if (position_requested == position_current) {
stop=1;
settle=settle_stop;
state_turret=2;
}
break;
case 2:
--settle;
if (settle<=0) {
seek=0;
settle=settle_park;
state_turret=3;
}
break;
case 3:
--settle;
if (settle<=0) {
stop=0;
state_turret=0;
position_changed=1;
}
break;
default:
state_turret=0;
break;
}
} else {
seek=0;
stop=0;
position_changed=0;
}
}
~~~~~~~~~~~~~~~ turret.comp ~~~~~~~~~~~~~~~
The above just creates signals in a sequence based on proximity sensor
inputs. This is very basic C language. Studying the comp documents may
get you up to speed on this:
http://linuxcnc.org/docs/html/hal/comp.html
Generally, a carousel changer does not need a prepare since the tool in
the spindle needs to go back to the slot it came from so nothing can be
done before the change. So the key point here is to break the change
loop, connect the change signal to a custom comp, ladder or other, then
connect the result to the changed signal.
>
> I don't know squat about Linux programming, that's why the offer to
> pay someone to write the code was and is still on the table.
>
> I have been looking at some example tool charger case examples , I
> understand most of it. But would not know how to write one.
>
> I find it odd that someone has not done a vmc like a tree or haas or
> fadal with this type of tool changer before.
There is a Mazak project that has a changer:
http://git.linuxcnc.org/gitweb?p=linuxcnc.git;a=tree;f=configs/attic/demo_mazak;h=c5d645e5cde8eb26d75075f233fb41a7be2b3573;hb=HEAD
This BOSS looks like it has a PLC changer:
http://git.linuxcnc.org/gitweb?p=linuxcnc.git;a=blob;f=configs/by_machine/boss/boss.hal;h=5756d7725d9bbdf961849180c3f18569a372c3cd;hb=HEAD
It looks like the PLC component is not there though.
> Any idea of anyone who is a pro at Linux that I could get a hold of
> and willing to help with the progaming?
I see the process as going like this:
Document changer and spindle hardware and signal types, voltages:
sensors
motors
hydraulics
pneumatics
existing controller
Figure out the sequence of events
Decide the type of control software: comp, ladder, other
You can start on the list and ask questions here as you go or maybe
someone will chime in. I'm in the middle of another project myself.
--
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries. Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers