Boxford 125 lathe Tool Changer Comp FERROR (SOLVED)

More
01 Nov 2020 09:04 #187996 by Aciera
So if it backs up until the motor stalls would it not loose steps that way?

Please Log in or Create an account to join the conversation.

More
01 Nov 2020 10:01 #187997 by petermc
I think it shouldn't matter if it loses steps. It should rotate past the tool position then reverse a distance past the point that the pawl locks it. I reckon this locates the tools. For another tool change all it has to do is rotate past the desired tool position again then reverse to lock.

The main problem I see here is the fact that the commanded position continues to increment until it rolls over after 360 at which point it tries to reverse to get to the next location.

Please Log in or Create an account to join the conversation.

More
01 Nov 2020 11:06 - 01 Nov 2020 12:17 #187999 by Clive S

So if it backs up until the motor stalls would it not loose steps that way?


Good point. I wonder if it is resetting the count when it has finished reversing.

I am about to go and test something on the real machine.
I want to run from a fresh start. m6T1 to T8 one step at a time as I think it did more that one revolution in reverse at one point.
Re the Adir
      Adir      Tool-change-pos.cmd           stepgen.2.counts
T2   F               20.7                                   1449       forward
T3   T               43.2                                   3024       forward
T4   F               63.9                                   4473       forward
T5   T               86.4                                   6048       forward
T6   T               101.4                                 7497       forward
T7  T                129.6                                 9072       forward
T8  F                 150.3                               10521      forward

T7  T                  308.4                               215         went forward correct
T8  T                  329.1                               23037        forward
T6  F                 103.7                                7259           went reverse
T7 T                   126.2                               8834          forward
T8 F                    146.9                             10283         forward
T1 T                   169.4                              11858         forward
T3 T                    213.6                              14952        forward
T8 T                    324.7                              22729        forward
T6 F                   99.2989                            6951           went reverse
T3 F                   212.2                              14854          went forward correct
T1 T                    346.8                             24276         forward
T3 F                    31                                   2170      went reverse not at a tool position
T2 F                   187.3                              13111          forward 

When it goes forward it always backs up. When it goes in reverse you can't tell if it doe the backup because it's moving in that direction.

Also this is without the pawl in the turret so won't be missing steps
Last edit: 01 Nov 2020 12:17 by Clive S.

Please Log in or Create an account to join the conversation.

More
01 Nov 2020 12:59 #188003 by Clive S
Of course we have to remember that this comp was designed to run on linuxcnc 2.4 - 2.6 would anything have changed that might effect it's use !!

Please Log in or Create an account to join the conversation.

More
01 Nov 2020 13:04 #188004 by Aciera
To me it seems to do the unwanted reverse rotation whenever Tool-change-pos.cmd rolls over the 360° to a lower value.
Which makes somewhat sense since that's what it does when rotates backwards to lock the toolchanger (it reduces the position value by a bit).
But the idea of using the A axis seems to be that it would rotate in which ever direction the commanded position can be reached faster (ie <180°).

Please Log in or Create an account to join the conversation.

More
01 Nov 2020 13:19 - 01 Nov 2020 13:37 #188007 by Aciera
Ok now I feel really dumb.
My Rotary axis in 2.8 behaves exactly like that. If it is at 360° and I command it G0 A1 it moves backwards. I could have sworn it moves the shortest way.
Clearly I don't use it often enough.

[edit]
I just tried WRAPPED_ROTARY = 1 and while not exactly what you want could probably be used if the component was adapted. It then takes an angle and the sign determines the rotation direction. So instead of only subtracting a bit from the commanded position it would also change the sign to negative.

So clearly you are correct that something has changed how the rotary axis is handled.
Last edit: 01 Nov 2020 13:37 by Aciera.

Please Log in or Create an account to join the conversation.

More
01 Nov 2020 14:59 - 01 Nov 2020 15:09 #188009 by Clive S
I do thank you for your time and effort you have put in to help me :)

I think I have the scale correct.
From the comp
.

param rw float odd_move = 22.2
param rw float even_move = 24
will work for TCL 160 and TCL 125 and probably other lathes with the same 'move past pawl and reverse to stall against it' methodology.

These move figures are only half the actual move in degrees. The scaling takes care of the distance actually moved.
There is a very good reason for this.
It prevents the stepgen seeing any move as being in excess of 180degrees, therefore all moves between tool stations will be forward moves.
If you command a move to a position which is say 270degrees on a angular axis, the stepgen will try to move 90degress backwards
to get to the same point by the shortest route.
In theory unlinking the stepgen dir signal and using our own should work, but it didn't and the axis wanted to go backwards all
the time despite the flag being set at TRUE (FWD).
As this worked perfectly, I preserved my sanity and just left well alone.


So I am not sure where we can go from here. :(

I wonder if AndyPugh linuxcnc.org/docs/2.7/html/man/man9/carousel.9.html could be get to work.

Edit: Have you seen this: It was referenced in the readme.
.TH TOOLCHANGER "9" "2011-05-10" "EMC Documentation" "HAL Component"
.de TQ
.br
.ns
.TP \\$1
..

.SH NAME

toolchanger \- This component controls the Boxford 240 Lathe Auto Tool Changer. M6 calls this
.SH SYNOPSIS
.HP
.B loadrt toolchanger
.SH FUNCTIONS
.TP
\fBtoolchanger\fR (uses floating-point)

.SH PINS
.TP
.B toolchanger.toolchange\fR bit in \fR
Receives signal from M6 that tool change required
.TP
.B toolchanger.toolnumber\fR s32 in \fR
Receives Tx data from M6 (tool number requested) Only allows 1-8
.TP
.B toolchanger.currenttoolnumber\fR s32 in \fR
Receives old tool number
.TP
.B toolchanger.position-cmd\fR float out \fR
Sends location required
.TP
.B toolchanger.toolchanged\fR bit out \fR(default: \fIfalse\fR)
Sends signal when tool change finished
.TP
.B toolchanger.ishomed\fR bit in \fR(default: \fIfalse\fR)
Status of A axis homing
.TP
.B toolchanger.jog-forward\fR bit in \fR(default: \fIfalse\fR)
Facilitate jogging of stepgen via component
.TP
.B toolchanger.jog-back\fR bit in \fR(default: \fIfalse\fR)
Facilitate jogging of stepgen via component
.TP
.B toolchanger.jog-move\fR float in \fR(default: \fI0\fR)
distance to jog
.SH PARAMETERS
.TP
.B toolchanger.odd-move\fR float rw \fR(default: \fI22.2\fR)
distance from odd tool station to even one
.TP
.B toolchanger.even-move\fR float rw \fR(default: \fI24\fR)
distance from even tool station to odd one
.TP
.B toolchanger.divisor\fR float rw \fR(default: \fI2\fR)
used in calculating reverse move to lock
.TP
.B toolchanger.fudge-factor\fR float rw \fR(default: \fI1\fR)
additional move to ensure locking
.SH AUTHOR

ArcEye schooner30@tiscali.co.uk
.SH LICENSE

GPL
Last edit: 01 Nov 2020 15:09 by Clive S.

Please Log in or Create an account to join the conversation.

More
01 Nov 2020 16:07 #188017 by Aciera
I doubt that you can use the carousel version. As I don't think it supports you kind of locking mechanism.

I did butcher the toolchanger.comp a bit just a shot in dark really as my C knowledge is miniscule. But if you feel brave enough you can give it a try although I probably broke more than anything else.
The idea was to let the commanded position add up beyond 360. Note that I removed the trick with the half angles as this is now not relevant anymore. So you would need to divide your scale by two.

File Attachment:

File Name: toolchanger.comp
File Size:13 KB
.
Attachments:
The following user(s) said Thank You: Clive S

Please Log in or Create an account to join the conversation.

More
01 Nov 2020 17:34 #188022 by Clive S

The idea was to let the commanded position add up beyond 360. Note that I removed the trick with the half angles as this is now not relevant anymore. So you would need to divide your scale by two.

File Attachment:

File Name: toolchanger.comp
File Size:13 KB
.


Thanks I will certainly give it a try tomorrow morning .
Watch this space :

Please Log in or Create an account to join the conversation.

More
02 Nov 2020 14:30 #188113 by Clive S

The idea was to let the commanded position add up beyond 360. Note that I removed the trick with the half angles as this is now not relevant anymore. So you would need to divide your scale by two.

File Attachment:

File Name: toolchanger.comp
File Size:13 KB
.


Thanks I will certainly give it a try tomorrow morning .
Watch this space :


Ok update and a question first.

When it reverses to lock the pawl it will miss steps because it will stall the motor.
So the question is does it reset the stepgens before it moves to the next tool ?

Now for the good news. It is working but I need to do a bit more testing.

I have spent a lot of time getting the scale correct.
Between us it appears to work it certainly does not go backwards.

I am not sure yet if when locking the pawl and loses steps it keeps in sync.

Re: the fudge move is there only one place to adjust the amount of reverse or is there two values i.e. one for odd and one for even numbers.

But a massive step forward. Thanks you so much for keeping with me and sorting this out.

When I can guarantee that it is working 100% I wonder if we can get the new comp into the list for others to use. :) :) :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.107 seconds
Powered by Kunena Forum