LinuxCNC 2.9 vs. 2.8 Using A-Axis for ATT
- Barry
- Offline
- Senior Member
- Posts: 54
- Thank you received: 4
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.
- andypugh
- Offline
- Moderator
- Posts: 23310
- Thank you received: 4858
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.
- Barry
- Offline
- Senior Member
- Posts: 54
- Thank you received: 4
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.
- andypugh
- Offline
- Moderator
- Posts: 23310
- Thank you received: 4858
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.
- Barry
- Offline
- Senior Member
- Posts: 54
- Thank you received: 4
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
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23310
- Thank you received: 4858
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,
Please Log in or Create an account to join the conversation.
- Barry
- Offline
- Senior Member
- Posts: 54
- Thank you received: 4
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.
- andypugh
- Offline
- Moderator
- Posts: 23310
- Thank you received: 4858
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)
Please Log in or Create an account to join the conversation.
- Barry
- Offline
- Senior Member
- Posts: 54
- Thank you received: 4
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
Please Log in or Create an account to join the conversation.