LinuxCNC 2.9 vs. 2.8 Using A-Axis for ATT

More
12 Feb 2021 17:00 #198549 by Barry
I have been using LinuxCNC 2.8 and with the A-Axis netted to a 6 position Automatic Rotary Tool Turret on a Lathe. This arrangement has worked great until I updated to LinuxCNC 2.9 to get built in G7x capability.

However, in Revision 2.9, the cutting tool shows in AXIS GUI rotating around the X-axis. Since the cutting tool is represented in AXIS as a thin wafer triangle, it's shape is distorted as the tool turret rotates around the X-Axis to the different tool positions.

This was not the case in Linux Revision 2.8....the A-Axis rotation did not show in AXIS GUI so the cutting tool shape did not get distorted.

Is there a way to turn off the A-Axis rotational graphic in AXIS LinuxCNC 2.9?

Thank you,

Barry

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

More
12 Feb 2021 18:15 #198557 by andypugh
Have a look at GEOMETRY in the [DISPLAY] section of the INI.

Just remove the reference to A.

I don't think that the behaviour actually changed between the versions. Did you just copy your config across, or make a new one?

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

More
13 Feb 2021 00:28 #198625 by Barry
OMG...Thank you Andy!!!! :) You nailed it. Thank you. Thank you. Thank you!! :)

Here's the interesting part. The .ini file I used in both LinuxCNC 2.8 and 2.9 was identical! :-o.
Weeks ago I must have commented out GEOMETRY in the display section (i.e. #GEOMETRY = xz) as I was figuring out how to convert from 2.7 to 2.8 and accidentally left it that way, but this did not make any difference in appearance nor functionality between 2.7 and 2.8. Regardless, the A-Axis did not show rotation on the screen. Apparently this was a bug resolved by Release 2.9 because when I converted to 2.9 the A-Axis started showing rotation on the screen by having GEOMETRY commented out. Note: I still had a machine running on 2.8 and verified this finding just now.

Well the silver lining in this experience was that it motivated me to explore a new control strategy for the tool turret that did not require using a defined Axis. So I spent all day learning more about HAL, the Carousel module and M-codes 62-68.

I noticed that information and examples for using the Carousel module were sparse. There is one example under VMC_Tool change in the installed files but there is little to no explanation on how to connect it to real world parallel pins nor how to use it with a stepper motor. Any information you could direct me to on this would be helpful and appreciated.

Have a nice weekend Andy.

Thank you again,

Barry

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

More
13 Feb 2021 15:25 #198682 by andypugh

I noticed that information and examples for using the Carousel module were sparse.


It is so exquisitely documented in the manpage that further examples seemed superfluous. :-)

linuxcnc.org/docs/2.8/html/man/man9/carousel.9.html

If you describe your toolchanger then I can advise how to set it up.
You don't generally need M62-68 codes to run a toolchanger. M6 Tnn (or, if you wish, just Tnn) is generally enough.

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

More
13 Feb 2021 22:35 #198741 by Barry
LOL...Thanks Andy. I needed a good laugh at myself today. I honestly agree, the Carousel man page was "exquisitely documented" by you but please trust me when I say that I'd already spent hours and days looking at it 100 times trying to figure Carousel out as a newbie before posting for help. I feel like I'm working on getting a 3rd Engineering degree the past 6 months putting together all of the puzzle pieces for Remapping, G-Codes, M-Codes, O-Codes, Hal, LinuxCNC, different GUI interfaces etc. It seems the more I learn the more I realize I don't know, but it's been fun and at some point will come together in my mind.

I've attached the files necessary to provide help and see where I am so far on this project. You'll notice that the hal file shows 3 ATT control options that I've experimented with.

Option 1: Uses the A-Axis. Position is controlled by an O-code sub using typical G-Code position commands. This works fine now that you solved my A-axis graphic display problem for me.

Option 2: Uses M68 E0 Q commands in an O-Code Sub. This option works but I haven't figured out yet how to maintain unidirectional wrapped rotary, nor how to home the ATT automatically to tool position 1. Don't worry about helping with this option though as I'd prefer to spend the time on Option 3 which uses Carousel since this would be of more help and interest to the broader audience on this forum.

Option 3: Uses the Carousel function. If you could please help me get this going it would be greatly appreciated! :) You'll notice that I added both an index sensor for tool position 1 and a pulse sensor for individual tool positions (but it might require a software counter to maintain tool position after homing). The pulse sensor may not have been necessary though since a Stepper motor is used. However, it looked like Carousel might require it, unless motion control can be used to provide this feedback, so I added it to the design. Regardless, if this sensor is not needed then it can be used for a tool position light indicator.

Note: Internal parts of the ATT are shown as 3D CAD drawings because I have not yet finished fabricating them in my machine shop.

Thank you in advance,

Barry
Attachments:

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

More
14 Feb 2021 01:14 - 14 Feb 2021 01:15 #198769 by andypugh
I am guessing that this tool changer needs to run forwards to the pulse, then reverse onto a pawl?

The missing parts of the puzzle seem to be:

1: Use iocontrol.0.tool-change and iocontrol.0.tool-changed to enable the tool changer. ]
net tool-num iocontrol.0.tool-prep-pocket => carousel.0.pocket-number
net start-change iocontrol.0.tool-change  => carousel.0.enable
net change-done carousel.0.ready => iocontrol.0.tool-changed

2: Use a velocity-mode stepgen to move the carosel:
loadrt stepgen step_type=0,0,0,0 control_type=p,p,p,v
...
net motor-speed carousel.0.motor-vel => stepgen.3.velocity-cmd
setp carousel.0.fwd-dc 200
setp carouself.0.rev-dc -20
setp carousel.0.rev-pulse 3


Then M6 Tnn G43 should move to the requested tool and set the tool length,
Last edit: 14 Feb 2021 01:15 by andypugh.

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

More
14 Feb 2021 05:59 #198778 by Barry
Thank you. I can honestly say that I never would have figured out those missing pieces on my own. The good news is the ATT now rotates using Carousel but its rotating non-stop. I assume that I need to wire up the pulse and index switches which I will do tomorrow afternoon. It's midnight (CST) now so I need to get some sleep. However a few questions came up as follows:

1) I assume that I also needed to add the following code to bring in the pulse and index signals.

net index carousel.0.sense-0
net pulse carousel.0.sense-1
net index <= parport.0.pin-11-in
net pulse <= parport.0.pin-15-in

2) I assume Carousel will auto-home to tool position 1 when it is 1st enabled based on both the index and pulse reading True, and then will continue rotating to the selected tool pocket based on the pulse count, correct?

3) I assume M6 needs to be remapped in the .ini file. I tried doing this and got the following 2 error messages:
Near line 0
/usr/share/axis/images/axis-lathe.ngc: pycall(remap.change_prolog) failed
Near line 0
/usr/share/axis/images/ncam.ngc: pycall(remap.change_prolog) failed

Have nice day,

Barry

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

More
14 Feb 2021 09:46 - 14 Feb 2021 09:49 #198785 by andypugh

its rotating non-stop. I assume that I need to wire up the pulse and index switches


Yes, it is trying to home to a home pulse that never comes.

net index carousel.0.sense-0
      net pulse carousel.0.sense-1
      net index <= parport.0.pin-11-in
      net pulse <= parport.0.pin-15-in

Looks about right.


I assume Carousel will auto-home to tool position 1 when it is 1st enabled based on both the index and pulse reading True, and then will continue rotating to the selected tool pocket based on the pulse count, correct?


It is certainly meant to.

I assume M6 needs to be remapped in the .ini file.


Not necessarily. The examples I gave assumed no remap. You can remap so that Tnnnn does the full Tnnnn M6 G43 thing, which is usual for lathes, but I have been using the full set of three codes on my lathes for 10 years or so and haven't bothered remapping.
(This is partly as my first machine was a combo lathe-mill and I didn't want to confuse myself)
Last edit: 14 Feb 2021 09:49 by andypugh.

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

More
14 Feb 2021 20:50 #198840 by Barry
Success!!!! This is AWESOME!!!! Carousel works fantastic for controlling an Automatic Tool Turret!

Thank you so much for your help once again Andy. I really enjoyed working with you on this project and greatly appreciate the time that you spent not only in developing Carousel and putting together all of the documentation for it, but also in helping me get it working on my ATT. You are the best. Putting all of this together certainly brought me up a lot higher on the LinuxCNC learning curve with your help. This was a fun project. :)

To help others who may need the same help that I did with Carousel, the final working files are attached.

Have a great week! I'm off to my machine shop to do some CNC'g.

Thank you again,

Barry
Attachments:
The following user(s) said Thank You: tommylight

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

Moderators: piasdom
Time to create page: 0.110 seconds
Powered by Kunena Forum