521,895 active members*
1,780 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Mach Software (ArtSoft software) > Will swap axis work properly with an axis that has a slave?
Results 1 to 16 of 16
  1. #1
    Registered
    Join Date
    Nov 2017
    Posts
    503

    Will swap axis work properly with an axis that has a slave?

    Might be adding a small sub spindle mounted right next to my main spindle at 90 degrees so I can machine into the face of parts on 4th axis. Getting that spindle to operate at the correct time will be a whole different can of worms, but for now im wondering about swapping my x and z axis so I can still generate code in fusion cam for machining on the face of 4th axis parts with the horizontal sub spindle. My x axis has B slaved to it for dual motor, dual ballscrew. If I use the standard swap axis call for x and z, is slave B going to follow as it should? Or is this going to complicate things?

  2. #2
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    4266

    Re: Will swap axis work properly with an axis that has a slave?

    A lot of times when I do strange stuff that Fusion won't do directly, I post separate operations that generate the tool path that I want, then manually merge the G code. Sometimes this requires manually editing or writing the G code. Fusion will handle 5 axis operations, but may require modifying a post processor to get what you want. How's your Javascript programming skills?

    Depends on what controller you are using to run your machine. You should be able to slave the B axis to the X (or any other axis) if your controller will handle it.

    Sounds like you really need a full on horizontal machining center
    Jim Dawson
    Sandy, Oregon, USA

  3. #3
    Registered
    Join Date
    Nov 2017
    Posts
    503
    Quote Originally Posted by Jim Dawson View Post
    A lot of times when I do strange stuff that Fusion won't do directly, I post separate operations that generate the tool path that I want, then manually merge the G code. Sometimes this requires manually editing or writing the G code. Fusion will handle 5 axis operations, but may require modifying a post processor to get what you want. How's your Javascript programming skills?

    Depends on what controller you are using to run your machine. You should be able to slave the B axis to the X (or any other axis) if your controller will handle it.

    Sounds like you really need a full on horizontal machining center
    Getting fusion to generate some code that I could somehow paste in was my first thought, but there's no way to do it other than manually switching every x and z. There's just no option for it to output code with the tool plunging in x. I'm pretty sure 5 axis machines are usually configured in a way that z axis always follows the orientation of the spindle. Possibly could make it work somehow in the post, but definitely beyond my skills there. Hand writing will work fine for a lot of what I want to do, like boring a hole with an endmill as 4th turns, but there's some other more complex stuff that really requires cam generated code, so the only solution I saw was doing the switch at the machine. Right now I already have b slaved to x for for dual drive x and that works fine, the part that I think gets messy is when I call a swap axis to switch x and z. I'm pretty sure it's just gonna swap the z stepper with the master x stepper, and slaved B is still gonna try to move with x inputs. If I can get the swap axis to work so that X and it's slave B will switch with z, everything will work fine, but I have a feeling it won't be that simple.
    Btw, this whole idea of a small horizontal sub spindle on the main milling head is sort of a temporary cheaper alternative to the mill turn spindle we've been talking about. This will allow me to do a lot of the same stuff for a lot less money. I still really want to build the full on mill turn spindle, but that probably won't be in the budget for a while

    The slaved B axis might be causing some confusion. It's just being used as a linear slave for driving x. Nothing to do with an actual rotary b axis, b was just what I had available to use as a slave since A is actually being used as a true A rotary

  4. #4
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    4266

    Re: Will swap axis work properly with an axis that has a slave?

    This is giving me a headache I think you will have to assign the B axis as a slave to the Z to get what you want. You may be able to do this with a macro. I'm no expert in Mach3, in fact, I avoid it whenever possible.
    Jim Dawson
    Sandy, Oregon, USA

  5. #5
    Registered
    Join Date
    Nov 2017
    Posts
    503
    Quote Originally Posted by Jim Dawson View Post
    This is giving me a headache I think you will have to assign the B axis as a slave to the Z to get what you want. You may be able to do this with a macro. I'm no expert in Mach3, in fact, I avoid it whenever possible.
    Yes, I think you're probably right. Swap axis for x and z, as well as move slave b over to z. No idea if that can be done with macro. Oh wait! Ok, might have it. I have one more available axis to use, C. I can set up a C axis slave for z, which will be pinned out to nothing at all, some random unused pin. If i do 2 swap axis, one for x-z, one for b-c, it just might work. Having a hard time wrapping my head around the details at the moment, but something like this might work. The c axis slave never actually does anything, it's just giving a vehicle to allow the use of swap axis to switch the B slave pin out back and forth. Or actually i guess it does get used, but it takes the pin out of B when it does

    Another thing im curious about is if there's oem dro codes for step/dir in ports and pins that can be used for modifying these values however you want in a macro rather than being limited to only swap axis.

  6. #6
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Posts
    34947

    Re: Will swap axis work properly with an axis that has a slave?

    My x axis has B slaved to it for dual motor, dual ballscrew. If I use the standard swap axis call for x and z, is slave B going to follow as it should?
    If I had to guess, I would say that no, it won't work.

    And I just looked at the manual, and it doesn't look like you can slave/unslave through macros.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  7. #7
    Registered
    Join Date
    Nov 2017
    Posts
    503
    Quote Originally Posted by ger21 View Post
    If I had to guess, I would say that no, it won't work.

    And I just looked at the manual, and it doesn't look like you can slave/unslave through macros.
    Did you see the other idea I had? Was thinking maybe I can bring in another axis, C, slave it to Z. This c axis will be pinned out to nothing, unused pin. When doing the XZ swap, I will also do a BC swap. C will then take the pin out of B and become active along with z movements, which are now moving horizontally. At this point the b axis will take the old pin out of C (pinned out to nothing). So after the dual swap, x is moving vertical with a disabled slave b (pin out to nothing) and z is moving horizontal with slave C (now pinned out to horizontal slave motor) . Does that make sense? Or am I not thinking this through properly?

  8. #8
    Registered
    Join Date
    Nov 2017
    Posts
    503

    Re: Will swap axis work properly with an axis that has a slave?

    After some more thinking, it would really save a lot of headache if I could just parallel the 2 step/dir pins to the 2 x stepper drivers. That works fine right? Not running 2 steppers on one drive, wiring 2 drives on the same step/dir pins. Any problem with this? Makes the swap axis just as simple as any and also frees up my b axis which I might want to use someday.

  9. #9
    Registered
    Join Date
    Jun 2011
    Posts
    683

    Re: Will swap axis work properly with an axis that has a slave?

    Why can't you just do a search/replace on the g-code?

  10. #10
    Registered
    Join Date
    Nov 2017
    Posts
    503
    Quote Originally Posted by skrubol View Post
    Why can't you just do a search/replace on the g-code?
    I considered it but there's a few complications with that. For one, arcs will get all funky since plane selection isnt defined by x and z. Also i believe drilling cycles will no longer work. Gcode is really designed for the tool being on z axis. Could probably make it work with some effort. Disable arcs in fusion 360 and only allow line segments, replace drilling with just regular plunging moves. In the end probably more effort than just figuring out the axis swap

  11. #11
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    4266

    Re: Will swap axis work properly with an axis that has a slave?

    Can you not do the axis swap and then use G18 (XZ), G19 (YZ) for arcs? You can swap the axes around in Fusion and basically assign any axis as a rotary axis. Many times I post different operations separately and merge the G code to do things that I would not normally be able to do, especially using live tooling in the lathe. Fusion can generate 5 axis tool paths.

    This is kind of what we did here to make a couple of these parts, the CNC lathe was busy and we didn't want to do these on the manual lathe. I can't recall if we used turning or 3D milling for this operation.

    Jim Dawson
    Sandy, Oregon, USA

  12. #12
    Registered
    Join Date
    Nov 2017
    Posts
    503
    Quote Originally Posted by Jim Dawson View Post
    Can you not do the axis swap and then use G18 (XZ), G19 (YZ) for arcs? You can swap the axes around in Fusion and basically assign any axis as a rotary axis. Many times I post different operations separately and merge the G code to do things that I would not normally be able to do, especially using live tooling in the lathe. Fusion can generate 5 axis tool paths.

    This is kind of what we did here to make a couple of these parts, the CNC lathe was busy and we didn't want to do these on the manual lathe. I can't recall if we used turning or 3D milling for this operation.

    If I get the swap axis to work, everything should work perfectly fine. No issues with arcs or drilling cycles. The complication with arcs and drilling is if I was to not do the swap axis and instead use a workaround of posting code and then using a word program to swap all x's and z's. Swap axis is definitely the way to go, it's just complicated on my machine because of the 2 ballscrews driving x with 2 motors using a slave axis. Pretty sure I have the simplest solution though, rather than trying to make some complicated slave axis dual swap macro, I will just parallel my 2 x stepper drivers to a single step/dir pin so I no longer need the slave. At that point it becomes just a regular simple swap axis for running programs with my horizontal sub spindle. At least the swap axis part is simple. Switching control between spindles is gonna be a whole different puzzle. Don't even know where to start for that.

    Your video reminds me of an unrelated thought i had the other day. When posting code for turning, I believe we use Fanuc post for mach3 turning, aren't x moves in diameter mode? So the movements will be double what they should be when running it in a mill profile? Or am I getting mixed up somehow? I'm new to turning code, but when watching a tutorial, x values were entered as a diameter after taking a small cut to dial in the x zero for a tool. Or is diameter mode only used in that scenario of taking a cut and entering the measured diameter for x?

  13. #13
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    4266

    Re: Will swap axis work properly with an axis that has a slave?

    Fusion turn posts only output radius mode. There is a setting for that in the menu, but the only option is radius. I believe it would be an issue if you output the code in mill mode, you would remove 2x the material. Maybe there is an option in Mach3 to select radius or diameter? I don't use Mach3 so have no idea about that.
    Jim Dawson
    Sandy, Oregon, USA

  14. #14
    Registered
    Join Date
    Nov 2017
    Posts
    503
    Quote Originally Posted by Jim Dawson View Post
    Fusion turn posts only output radius mode. There is a setting for that in the menu, but the only option is radius. I believe it would be an issue if you output the code in mill mode, you would remove 2x the material. Maybe there is an option in Mach3 to select radius or diameter? I don't use Mach3 so have no idea about that.
    Perfect, it won't be an issue since I'll be running turn code in a mill profile, so radius mode is what I want. Noy sure exactly how mach3 turn profile wants it, but doesn't matter for me

  15. #15
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    4266

    Re: Will swap axis work properly with an axis that has a slave?

    Quote Originally Posted by QuinnSjoblom View Post
    At least the swap axis part is simple. Switching control between spindles is gonna be a whole different puzzle. Don't even know where to start for that.
    I use M133 (Run Forward), M134 (Run Reverse), M135 (Stop) for my live tooling. These are Haas live tool control M codes as I recall. I'm pretty sure Mach3 would support these codes with a macro. You just need to assign the aux spindle as an axis or maybe an aux spindle. Not totally sure how that works in Mach3, I have the live tooling as an axis on my lathe. So the line of G code would read: P2000 M133 (Run Forward at 2000 RPM)
    Jim Dawson
    Sandy, Oregon, USA

  16. #16
    Registered
    Join Date
    Nov 2017
    Posts
    503
    Quote Originally Posted by Jim Dawson View Post
    I use M133 (Run Forward), M134 (Run Reverse), M135 (Stop) for my live tooling. These are Haas live tool control M codes as I recall. I'm pretty sure Mach3 would support these codes with a macro. You just need to assign the aux spindle as an axis or maybe an aux spindle. Not totally sure how that works in Mach3, I have the live tooling as an axis on my lathe. So the line of G code would read: P2000 M133 (Run Forward at 2000 RPM)
    Very interesting. I'm not sure mach3 supports that. It seems to be pretty limited with solutions for running a secondary spindle. I've seen a few posts by guys that wanted to run secondary spindles and it seemed pretty complicated. I'm pretty sure there's no actual option for an aux spindle and if setting up as an actual axis, there's no way to command it to spin continuously as other code continues. With the examples i saw, the second spindle had to be controlled in place of the main spindle, still using regular sxxx m3,m4. Some have used a macro to control relays that disables one spindle and enables the other. I would definately say mach3 wasn't designed with multiples spindles in mind. From what I understand, mach4 opens up more possibilities and seems to have better support for multiple spindles. I need to do more research and if I decide it's worth it, I'll upgrade to mach4.

    I'm pretty sure there are ways to make it happen in mach3 without having to dig through every gcode file and manually add in the needed m codes in proper places. One approach is using the tool change macro. Have 2 sets of duplicate tools in cam library, 1-99 with duplicates of 101-199. Example would be tool 1 goes in main spindle, tool 101 is same tool in secondary spindle. Tool change macro can be written so if tool number is greater than 100, run macro for spindle control swap. In my case, the axis swap would follow this same logic. I have an understanding of how the logic needs to work to make things like this happen, but I don't know the language at all, soni have a lot to learn before I would be able to write macros like this

Similar Threads

  1. MKX-4 Mach3 don't work slave axis home
    By plUA in forum General CNC Plasma / Oxy Fuel Cutting Machines
    Replies: 7
    Last Post: 05-24-2018, 06:15 PM
  2. Master/Slave X axis side swap - does it matter?
    By Kosh in forum CNC Router Parts
    Replies: 4
    Last Post: 11-15-2015, 04:48 AM
  3. Replies: 0
    Last Post: 11-13-2015, 04:37 PM
  4. Trying to swap slave axis
    By landarts in forum CNC Router Parts
    Replies: 2
    Last Post: 04-13-2015, 05:36 AM
  5. a problem with slaved A-axis moving properly relative to Y-axis
    By zool in forum Mach Software (ArtSoft software)
    Replies: 34
    Last Post: 07-06-2011, 03:45 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •