hey Andy and Rene
I thought the wiki was the Docs. But looking in the installed html docs
that come with the iso as rene said there is nothing about random position
toolchanging. Or if there is I would love to know. I think I understand
how it works but would appreciate come confirmation.
here is what is in the wiki my comments are below in red
Prepare operation
The prepare operation is initiated by a T command. This
toolnumber is used in a later change step as the M6 command carries no tool
number attribute by itself. The following signals support the prepare step
- tool-prep-number: out,s32: the tool number to prepare
- tool-prep-pocket: out,s32: the commanded pocket number to position the
toolchanger to. Valid only when RANDOM_TOOLCHANGER is set. The tool table
is searched for the given tool number, the corresponding pocket number is
retrieved and signaled with this pin.
- tool-prepare: out, bit: iocontrol signals to start a prepare.
- tool-prepared: in, bit: acknowledge line that the tool-prepare line
has been noticed by the toolchanger, the tool-prep-number or
tool-prep-pocket has been read if needed and the prepare operation has been
started (FIXME: or completed? this would defeat the purpose of running in
parallel)
So this is how I understand it.. if someone could write up a better
explanation I would appreciate it..
I think the Iocontrol pin "tool-prep-number: out,s32" comes from linuxcnc
and is triggered by the toolnumber in the Gcode.
so if the tool number requested was T2 then linuxcnc would search the tool
table and find out which pocket number matched T2.
Just say T2 was in Pocket 1. Iocontrol pin "tool-prep-pocket s32 would
have a value of 1. (think its 1 but it might be zero depending on how the
counting works)
I could get this info into classic ladder by connecting it to
classicladder.0.s32in-00. (If you then checked in the Hal configuration
window in the axis gui the Iocontrol pin "tool-prep-pocket s32" would show
a value of 1) This would just connect up the stream of data. I would
still have to actually signal the toolchanger to prepare the correct
pocket. I would do this with "iocontrol tool-prepare: out, bit" This is
the signal that should actually make the toolchanger start to prepare the
tool.
This is where the info gets hazy in the wiki. I think after classic ladder
(the toolchanger) has moved to the correct pocket and is all finishing
moving pockets, it should signal to linuxcnc that the magazine is ready to
go.
To actually get this to work, my classic ladder would have a counter set up
triggering as each pocket goes past the sensor. I would have a compare
variable box comparing the requested tool number with the number in the
counter. once they were the same then the magazine would stop at that
pocket and signal to linuxcnc that the correct pocket (and tool) was ready
for a tool change.
I would do this by connecting the classic ladder output to iocontrol
tool-prepared for example (net classicladder.0.out-05 => iocontrol
tool-prepared)
Now that the magazine is controlled and set its time to use the
toolchange iocontrol pins.
Change operationThe change operation is initiated by an M6 command, which
relies on the number of the tool to be loaded having been set by a previous
T command. When using a random toolchanger with prepare
capability, it might make sense to execute the T
immediately after an M6 to give the prepare mechanism ample time to
position. In nonrandom or manual toolchange scenarios this has no effect so
T and M6 could well be on the same line.
The following signals support the change step:
- tool-number: out,s32: the tool number currently loaded (in spindle).
- tool-change: out, bit: iocontrol signals to start a tool change
operation.
- tool-changed: in, bit: acknowledge line that the tool-change line has
been noticed by the toolchanger, the tool-number has been read if needed,
and the change operation has completed
1. An M6 command initiates the tool loading cycle. iocontrol asserts
tool-change.
2. The toolchanger completes the tool load and signals that with
asserting tool-changed.
3. iocontrol the tool-changed pin at 1, and deasserts tool-change to
acknowledge.
4. The toolchanger sees tool-change going low and in response deasserts
tool-changed. The change cycle is now complete.
This is how I understand the actual tool change operation.
I think the iocontrol toolchange: out, bit tells classic ladder to swap the
tool in the magazine pocket with the one in the spindle.
I would make this work by by connecting iocontrol toolchange to my classic
ladder input pin I am using to start the plc into toolchange.
for example net iocontrol toolchange => classicladder.0.in-04.
Once classicladder has completed the toolchange it would signal linuxcnc by
connecting a classicladder output to iocontrol tool-changed: in, bit:
for example net classicladder.0out.07 iocon