Boxford 125 lathe Tool Changer Comp FERROR (SOLVED)

More
5 years 2 months ago #217857 by rider-83
Thanks Clive, I shall have a good look through soon.
I've been struggling for over a year with this project. I'm finding that there is a lot of information regarding Linuxcnc but its scattered all over the place in a matter that makes it very difficult to work out what to do with it. I think its a very capable and impressive system , but probably the worst thing I've ever encountered in thirty years in terms of guidance on how to use. There is just to much stuff to wade through in order to simply understand the basics of how it all works. I think there is to much assumption that every one is a Linux coding expert. However, I'm starting to get to grips with it.
It's taken me this long to even find out that you have actually got this ATC to work, as your thread didn't bubble to the surface until Andy pointed me to you.
Thanks for your help so far, and sharing your work :)

Please Log in to join the conversation.

More
5 years 2 months ago #217969 by rider-83
I can see that 'toolchange.comp' is now present in the Modules folder.
So if .ini & .hal are set up correctly, is this all that is required for the turret to rotate at the command of M6?
I'm assuming that 'toolchange.comp' handles the messages, or are there other things that are required?
I can't see anything else that has changed after issuing HALcompile.

Please Log in to join the conversation.

More
5 years 2 months ago #218020 by andypugh
In the header comments of the toolchanger.comp there is a sample HAL configuration.

You need, as a minimum, these connections:
Code:
loadrt toolchanger addf toolchanger servo-thread net tool-change iocontrol.0.tool-change => toolchanger.toolchange net tool-changed iocontrol.0.tool-changed <= toolchanger.toolchanged net tool-number iocontrol.0.tool-prep-number => toolchanger.toolnumber net tool-oldnumber iocontrol.0.tool-number => toolchanger.currenttoolnumber net apos-cmd toolchanger.position-cmd => stepgen.2.position-cmd net toolchanger-stepgen-fb <= stepgen.2.position-fb => toolchanger.stepgen-pos-fb net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

Please Log in to join the conversation.

More
5 years 2 months ago #218080 by rider-83
Within the toolchanger.comp there is a statement:

#### CONNECT TOOLCHANGER.ENABLE AND STEPGEN.n.ENABLE TO THE SIGNAL YOU WANT

net ATC-enable <= YOURPIN => toolchanger.enable => stepgen.2.enable

Yet, this isn't present in Clive's .HAL file ?
Also, what is YOURPIN supposed to mean?

Please Log in to join the conversation.

More
5 years 2 months ago #218089 by rider-83
I've got It working. I went out on my mountain bike in the rain and it came to me what was supposed to happen.

Instead of using the '.emc-enable-in' I borrowed ' iocontrol.0.lube' because the other was already being used.
So I have:

net ATC-enable <= iocontrol.0.lube => toolchanger.enable => stepgen.2.enable

Am I correct in thinking you are borrowing this iocontrol.0.lube Pin as a signal channel ?

The footer of my HAL file for my Boxford 160 now reads:

loadrt toolchanger
addf toolchanger servo-thread

net tool-change iocontrol.0.tool-change => toolchanger.toolchange
net tool-changed iocontrol.0.tool-changed <= toolchanger.toolchanged
net tool-number iocontrol.0.tool-prep-number => toolchanger.toolnumber
net tool-oldnumber iocontrol.0.tool-number => toolchanger.currenttoolnumber

net apos-cmd toolchanger.position-cmd => stepgen.2.position-cmd
net toolchanger-stepgen-fb <= stepgen.2.position-fb => toolchanger.stepgen-pos-fb
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
net ATC-enable <= iocontrol.0.lube => toolchanger.enable => stepgen.2.enable

Works fine so far. I'll give it a good testing :)

Please Log in to join the conversation.

More
5 years 2 months ago #218091 by rider-83
Turret rotating wrong way

Please Log in to join the conversation.

More
5 years 2 months ago #218094 by Clive S

Turret rotating wrong way
Try swapping one set of coils over on the stepper A or B.

Or try changing the sign on this line setp stepgen.2.position-scale 33.446

to setp stepgen.2.position-scale -33.446 (but use your number in scale)

Please Log in to join the conversation.

More
5 years 2 months ago #218115 by Aciera

net ATC-enable <= iocontrol.0.lube => toolchanger.enable => stepgen.2.enable

Am I correct in thinking you are borrowing this iocontrol.0.lube Pin as a signal channel ?

Not exactly sure what you are doing there but the idea of toolchanger.enable is to connect it to a signal that reflects the state of the machine enable (eg you would not want it enabled if the machine was in estop)
Note that if you want to reuse a signal then you need to use the same signal name. So if your 'iocontrol.0.emc-enable-in' pin was already connected like this:
net yoursignalname <= iocontrol.0.emc-enable-in ...

then you can connect it to another pin by connecting that pin to the same signal:
net yoursignalname => toolchanger.enable => stepgen.2.enable

 

Please Log in to join the conversation.

More
5 years 2 months ago #218241 by rider-83
Hmmm,
Turret is moving 90degrees per each movement and not 45..

Please Log in to join the conversation.

More
5 years 2 months ago #218242 by Aciera
Sounds like you need to adjust the scale for the stepgen.

Please Log in to join the conversation.

Time to create page: 0.138 seconds
Powered by Kunena Forum