Hello Guest it is March 28, 2024, 07:34:37 PM

Author Topic: A axis acting as a spindle then toggle back to a rotary.  (Read 14969 times)

0 Members and 1 Guest are viewing this topic.

A axis acting as a spindle then toggle back to a rotary.
« on: November 07, 2016, 03:18:29 PM »
I would like to be able to toggle my A-axis from a rotary to a spindle with Gcode. I am reading about a  swapaxis macro but I have no clue what it is and where to find it. could someone please help me out with this topic? I am wanting to cylindrical grind revolved parts and have the rotary spin around the X axis at a somewhat slow speed while milling in the X-direction. I would like to be able to switch it within the same program and have also be able to do some indexing for milling work.  I am using CAMWorks & Solidworks. I want to have a post developed that I can use the Syil X5 Combo like a lathe with live tooling for cutting round tools. They are asking for some sample code. any help would be great. Thanks!
Re: A axis acting as a spindle then toggle back to a rotary.
« Reply #1 on: November 07, 2016, 03:20:42 PM »
https://youtu.be/HvKovZJn52Y

This video is on youtube. They show it on Syil america website. http://syil.myshopify.com/products/x5-combo This is what I am trying to achieve. I'm not concerned with the caming action however the cylindrical grinding could be huge for me if I can get this to work.

« Last Edit: November 07, 2016, 03:22:59 PM by mflanders »
Re: A axis acting as a spindle then toggle back to a rotary.
« Reply #2 on: November 16, 2016, 12:09:27 PM »
It used to be - M3 - that this requires support from the motion control driver.
I would expect that this thus depends on what motion control device you have.

And does anyone know if swapaxis() works on M4 in general ?
Re: A axis acting as a spindle then toggle back to a rotary.
« Reply #3 on: November 16, 2016, 12:14:52 PM »
M3 & M4 are spindle controls. I'm trying to control the rotary as a spindle. This forum is suppose to help me figure out how to switch the rotary into a spindle and back to an indexable rotary within the same program. I would like it to run at a relatively low RPM and do peel grinding or cylindrical grinding like a lathe would do.

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: A axis acting as a spindle then toggle back to a rotary.
« Reply #4 on: November 16, 2016, 07:27:14 PM »
mflanders,

Quote
This forum is suppose to help me figure out how to

This link may help:
http://www.machsupport.com/forum/index.php/topic,11422.msg97374.html#msg97374

RICH
Re: A axis acting as a spindle then toggle back to a rotary.
« Reply #5 on: November 17, 2016, 07:35:16 AM »
So I am reading that I need to define the A-axis with the ports and pins and tune it. Likewise for spindle. Then it is telling me I can control it with and M3/M4 S500 code. How would the main spindle stay running at a given rpm while designating a new S-command for the rotary? I am wanting to turn this rotary on about 100rpm and still have my cutting spindle with an Endmill turning 2000rpm. 

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: A axis acting as a spindle then toggle back to a rotary.
« Reply #6 on: November 17, 2016, 03:34:29 PM »
mflanders,

The SwapAxis function  is defined in the Mach3 Version Macro Programmers Reference Manual.

Also A rotary is to X
       B       "         Y
       c        "        Z

Do a search on swap axis and also have a read of Simpson's threads on the subject.

YOU may need to do some screen modifications and create scripting to do what you want to do.

RICH
Re: A axis acting as a spindle then toggle back to a rotary.
« Reply #7 on: November 18, 2016, 01:11:52 PM »
If I was to add in the swap axis macro for switching the spindle into the A axis will the spindle remain running because it never saw an M05? Then after switched will it require an M03 S100 to start it up again?
I would like it to work as follows:  Let me know if you think this would work and allow these to work in conjunction with each other.
S2000 M03
SWAPAXIS (Saxis,Aaxis)
S120 M03
"run program"
M05
SWAPAXIS(Aaxis,Saxis)
M05


Re: A axis acting as a spindle then toggle back to a rotary.
« Reply #8 on: November 18, 2016, 01:16:34 PM »
of coarse it should be a :

ResetSwapAxis()
M05

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: A axis acting as a spindle then toggle back to a rotary.
« Reply #9 on: November 19, 2016, 11:07:30 PM »
SwapAxis (?,?) and ResetAxisSwap (?,?) are scripting functions used in a macro. The macro is called in the Gcode. The macro provides the proper scripting to do what you want to accomplish.The ?,? above are integers designating the different axes. Read the Macro Programmers Reference Manual.

A,B,C are rotary axes rotating about the x,Y,Z AXES. A,B,C can be rotary ( degrees ) or linear depending on how they are defined. You can't continously rotate the A,B,C axis in Mach.If the mill spindle is manualy controlled you can still define spindle in motor tuning. Note that XYZABC AND SPINDLE needs to be defined in Ports and Pins and tuned.

So you can swap, say A and Spindle, calling the correctly scripted macro at the proper place in the Gcode. Mach accomplishes this by swapping the pin outs of those axes.

There is more to this just swapping the axes and the proper scripting in a macro / macro's can take care of homing etc or whatever else needs to be done.Additionaly gcode can command the spindle speed.

I am not the sharpest tack / just a novice at programming and have never had a need to use swapping. So that said, unless someone chimes in on more specifics. There are some limitations ie; can only have one axis swap / same axis  active at a time, I think?
"YOU" will need to read the thread and associated threads you find by searching swap axis to see what is required.

The above is jest of it all as I remember.

RICH
« Last Edit: November 19, 2016, 11:13:24 PM by RICH »