584,860 active members*
5,293 visitors online*
Register for free
Login
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Apr 2006
    Posts
    1016

    dual Z axis setup questions

    I like to inquire with the user here on the zone, To develop, a how to blog setup...... as to how to set up dual Z axis using mach.

    Im looking for advice... ideas to develop dual z axis using water cooled spindles.

    It would helpfull if user can post sample code and photos of there setup, or video of there systems

    Can someone explain what need to be done in mach, to support 2 z axis.

  2. #2
    Join Date
    Sep 2012
    Posts
    1195
    What are you trying to accomplish with dual Z? Do you mean that they operate completely independently or that there are simply two Z axis to be used somewhat as a pseudo tool changer? If the latter, it's rather easy to set up in Mach. If the former, it's also easy to set up in Mach, but not so easy to program them to work in an asymmetrical synchronized manner.

  3. #3
    Join Date
    Apr 2006
    Posts
    1016
    For the most part, I want the 2 spindles to be used as a tool changer
    for drilling and machining ...or ie large and smaller ball nose cutter.
    I am sure other users would want to know how to configure both set ups if needed.

  4. #4
    Join Date
    Sep 2012
    Posts
    1195
    Here's a quick video of my Mach 3 controller router using 2 heads in the way you are looking for. I'll take some time tomorrow to describe how I set it up, and hopefully that will help you figure out what you need to do. The one hurdle most will have to overcome is just that every machine is a little different, so while the concept will always apply, each machine will need small variations on that concept in order to work. For now, you can look at the video and let me know if this is essentially what you want to do. I didn't leave the part where the actual change from head to head happens (I was trying to edit the video down), but you will see in the last stage where the larger tool is used that the small tool is still winding down while the other is starting to cut, so you'll just have to take my word for it that it just raises one and lowers the other to change tools (or go to my channel and watch the first video I uploaded, which shows the two heads being controlled by MDI):

    Shinx CNC Router with Mach 3 CSMIO IP A machining PCB - YouTube

  5. #5
    Join Date
    Jan 2009
    Posts
    72
    Hi,
    I also would like to see your description of how this works, looks interesting.
    Cheers

  6. #6
    Join Date
    Sep 2012
    Posts
    1195
    Here's a diagram of how the system works as it's installed on my Mach 3 machine:




    I'll write a description later about what's going on, but you can also feel free to ask questions about the drawing. Setting up Mach is very simple. You essentially just have to do a couple macros to activate the outputs when M31 and M32 are called in the program or by MDI. I also use M35 and M36 to deactivate the outputs (respectively). M5 also is modified so that it will cancel M31 and/or M32. You can use each spindle individually, or you can use them simultaneously. If M03 is not called, the spindles can raise/lower, but cannot turn on since M03 forwards the spindle start command signal to the M31 and M32 relays. For example, if you have code like this:

    M03 M31 S10000
    (do stuff here)
    M05

    Head one will lower and start spinning at 10,000 RPMs, run the program, then stop the spindle/raise the head. If you have this code:

    M03 M31 S10000
    M32
    (do stuff here)
    M5

    The above code will lower both heads and spin them both at 10,000 RPMs, run the program, then stop the spindle/raise both heads. If you have code like this:

    M03 S10000
    (at this point neither head is down and neither can start spinning because the FWD Command is not active yet without M31 or M32 relay active)
    M31 (spindle one lowers and starts)
    (do stuff)
    M35 (spindle one raises and stops spinning
    M32 (spindle two lowers and starts)
    (do stuff)
    M31 (spindle one lowers and starts, spindle two remains lowered and continues spinning)
    M35 (spindle one raises and stops, spindle two continues to operate)
    M36 or M5 (spindle two raises and stops, both spindles are up and not turning)

    As you can see from the above, you can make some very sophisticated calls to the heads without actually turning the M03 (spindle start) command off. In practice, using the heads as tool changers is still very fast even with the M05 (spindle stop) command. It's not very feasible to tool change or change heads with a post processor without using spindle stop, since CAM software just won't be capable of the level of sophistication that the above offers. If you did some hand coding, you could utilize these features, but otherwise they are somewhat useless.

    It can be noted that you could continue adding more relays and more solenoids to raise and lower as many heads as you like. I expect that eventually I'll have an eight or nine head machine simply because it's a lot less expensive to do it this way than it is to install a real tool changer. Plus, if one head dies, you can keep going with the other heads, which is not the case for a single tool changing head. You could set the machine up to use just one VFD for all the heads, but that would take additional relays and some contactors. It may not be a whole lot cheaper than just having multiple VFD.

  7. #7
    Join Date
    Sep 2012
    Posts
    1195
    I should also mention that the FWD COMMAND on my VFDs are activated by shorting the two leads, which is what happens when the M31 and M32 relays close. If you have a different type of signal required for your VFDs, you would just have to modify the diagram to accommodate the difference in product designs. There is pretty much always a way to accomplish the same task, you just have to work with what you've got.

    Similarly, if you have a motor raising or lowering the heads, you'd have to make changes for that as well. Pneumatic cylinders are obviously the less expensive way to raise and lower the heads, but requires shop air supply that you might not otherwise need. I can imagine 2 or 3 different electric motor configurations, so you'll just have to figure out that part as needed on your own machine.

  8. #8
    Join Date
    Sep 2012
    Posts
    1195
    Here's a DXF of the diagram in case it's difficult to read:

    https://files.secureserver.net/0sMsgs9Zy5Jhic

  9. #9
    Join Date
    Sep 2012
    Posts
    1195
    Just posted a video which shows the tool change between the dual heads a little better. Let me know if you have any specific questions on how to put this together. You'll notice that I have a 2 second dwell in the post processor generated code. I have my spindles set for a soft-start because I run the machine on a 30hp phase converter, so it takes a bit extra time to get up to cutting speed. The two second dwell is automatically added to the code at any tool change and I've not had any problems with the tool getting going before cutting that way.

    Shinx CNC router cutting Delrin - YouTube

  10. #10
    Join Date
    Mar 2003
    Posts
    35538
    Another way to use dual spindles is to assign a range of tool #'s for 1 spindle, and another range for the rest. In your M6 macro, use Mach3's SwapAxis() function to swap Z axis and offset XY (if required) based on tool number.

    This is the method I'll be using if I ever get my router finished.
    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)

  11. #11
    Join Date
    Jan 2014
    Posts
    1
    Hi, I know this is an old thread, but was wondering if you would be able to elaborate on this. I am attempting to set up dual Z axis on my CNC router. I dont not necessarily need the auto turn on capability, just the ability to use each one independently. I am using the A axis for my 2nd Z axis with router attached.
    Quote Originally Posted by ger21 View Post
    Another way to use dual spindles is to assign a range of tool #'s for 1 spindle, and another range for the rest. In your M6 macro, use Mach3's SwapAxis() function to swap Z axis and offset XY (if required) based on tool number.

    This is the method I'll be using if I ever get my router finished.

  12. #12
    Join Date
    Sep 2012
    Posts
    1195
    Gerry,
    So you'll be using a separate axis from the controller for each spindle and then using SwapAxis to select which on is actually active? I've been assigning the XY offsets via post processor which are determined by the tool number in the software, but now that I think about it is it possible that you could put the G code for the XY offset in whatever M code you use to change axis? I'm also curious as to why you would need a range of tools for each spindle? I can see why you'd use one per head, like T1=head 1 and T2=head 2, but I'm not following what the range is for, so just curious.

    One thing I wonder about the SwapAxis method is if that would prevent you from using both or multiple heads simultaneously? There may come a time when you'll think that's handy though. Is it possible to use scripting to slave and unslave one axis to another axis? Let's say that normally you are swapping axis Z and A to use them independently as a tool changer through M6 (I assume that if you call T1 it will be head 1 and T2 would be head 2 for instance), perhaps a call to T3 or some other range as you may be suggesting will include the slaving function (if it exists).

    Another possible way of setting up multi-heads which requires less controller functionality and no pneumatics is to us a standard reversing motor to drive the head up or down in a "dumb" manner, where it really doesn't know the position of the head. My previous machine, which rotated heads 180 degrees back and forth to change heads (and change tools in one while the other is cutting), just used a standard motor connected to a drive like a rotary table, but with no real way to index it. In order to determine when to stop rotating, it just ran into a stop which you would adjust by set screw. The motor would push the rotary system against the stop, at which point a proximity switch would detect that it is in position. Within a moment of running into the end of the motion and tripping the sensor, the controller would deactivate the output to the "dumb" motor and the head is now in position. This could also be done on a linear motion setup. The advantage would be that it doesn't require the use of an additional axis on the controller and the only limit to the number of heads would be the number of outputs you have available on your controller. All heads, including the linear motion system for positioning them up and down, would have to be mounted to a larger Z axis plate so all the heads raise and lower at the same time. You would also probably need to put a clutch style break on each individual spidle axis to prevent it from drifting once the motor is off, so cost may be about the same as the pneumatic system as on my machine and a bit more than using a standard axis. The benefit would be that you can run as many heads as you have standard outputs for without using up any of the axis outputs.

    If a person didn't need to use more than one head at a time, you could also do a rotary turret style changer with a head at each turret position (Thermwood used to do that quite a bit). This would be pretty easy to implement as well (though not inexpensive), and you could use a rotary axis to position the heads. You would need a more sophisticated controller though, as I don't think it could be done effectively without feedback to the controller and homing on index for the rotary head.


  13. #13
    Join Date
    Mar 2003
    Posts
    35538
    Gerry,
    So you'll be using a separate axis from the controller for each spindle and then using SwapAxis to select which on is actually active?
    Yes.


    I've been assigning the XY offsets via post processor which are determined by the tool number in the software, but now that I think about it is it possible that you could put the G code for the XY offset in whatever M code you use to change axis?
    Yes. I plan on using G52 to set the offsets.

    I'm also curious as to why you would need a range of tools for each spindle? I can see why you'd use one per head, like T1=head 1 and T2=head 2, but I'm not following what the range is for, so just curious.
    Because in some cases you may need more than 2 tools.

    What I would probably do is use one spindle For a "fixed" tool, and use the second spindle for tool changes.


    One thing I wonder about the SwapAxis method is if that would prevent you from using both or multiple heads simultaneously? There may come a time when you'll think that's handy though. Is it possible to use scripting to slave and unslave one axis to another axis? Let's say that normally you are swapping axis Z and A to use them independently as a tool changer through M6 (I assume that if you call T1 it will be head 1 and T2 would be head 2 for instance), perhaps a call to T3 or some other range as you may be suggesting will include the slaving function (if it exists).
    I believe that you can. One issue that I see, though, is how do you set both tools to the same length. I think you might be able to zero them both first, then move them to the same Z height before slaving??

    I think it would be easier to just write a separate macro to do this, and call it from a screen button. That would make the M6 macro much simpler.
    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)

  14. #14
    Join Date
    Sep 2012
    Posts
    1195
    Quote Originally Posted by ger21 View Post

    Yes. I plan on using G52 to set the offsets.
    I may switch to that as well just to make the post processor easier. I've been using work coordinates (G54 for head 1, G55 for head 2 and G56 for simultaneous cutting with both heads). I hadn't really thought of adding the G-code to the macro, but that seems like it would work quite well. The only advantage the work coordinates have is easy access to changing them when the distance between heads is adjusted for a specific job. It wouldn't take that much more work to get into the macro and change it there though, and then you could keep the work coordinates free for other things, so using G52 inside the macro seems like the more logical solution.

    Either way, it should be considered by anyone using dual heads that if the spacing can be changed, you need to be able to make the offset happen at the controller. That way, when you write a program that works today when the heads are 12 inches apart, the offset can be adjusted in the future and the same program will then run properly when the heads are spaced 10 inches apart. If you have dual heads that are not adjustable, you'd never need to change this setting, but I recommend trying to maintain the ability to adjust the spacing so that dual part processing can be done without limitation as to part spacing. If you have a standard 4 foot by 8 foot bed, the ability to space the heads between 8-12 inches on center and 24 inches on center would cover most possible scenarios.

  15. #15
    Join Date
    Mar 2003
    Posts
    35538
    If you have dual heads that are not adjustable, you'd never need to change this setting, but I recommend trying to maintain the ability to adjust the spacing so that dual part processing can be done without limitation as to part spacing.
    The downside of this is that I'd need to make the machine 18" wider, as my spindles will be 6" OC. I don't ever plan on using the two spindles together, so my goal was to keep them as close together as possible, to minimize the machine footprint.
    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)

Similar Threads

  1. 4th Axis Setup questions
    By Smokingman in forum Rhinocam
    Replies: 1
    Last Post: 08-17-2011, 02:14 AM
  2. Dual Steppers or Timing Belt for Dual X-axis?
    By GEBrown in forum Linear and Rotary Motion
    Replies: 3
    Last Post: 05-27-2010, 05:45 PM
  3. Dual Z axis and Dual Spindle
    By Adamj12b in forum Mach Software (ArtSoft software)
    Replies: 3
    Last Post: 08-28-2008, 09:15 PM

Posting Permissions

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