Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: halfmill on November 03, 2017, 12:21:42 AM

Title: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 03, 2017, 12:21:42 AM
Hi,  This is a Mach3 question. I purchased a Rotary lathe for A-axis.  Set it up and got it to turn.  Now my situation is that I need the rotary axis to turn at on speed and then I need to have the y axis move the spindle forward so that it "trues" the wooden dowel.  I have the spindle speed in manual so I can adjust that independent of the other factors.  So can someone help me understand how to set up codes in MDi so that while the a-axis lathe is turning at one speed, while the y-axis moves forward (y- in my case) at another speed? Right now, the rotary turns but none of the other axis will move.  For instance if the A-axis rotary is turning and  then I go to the jog-screen, none of the keys that would normally get the x or y axis to move will work.  Pressing the shift-arrow keys for instance have no effect.  All help appreciated.
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 03, 2017, 04:16:41 AM
Post the xml file that you are using.
You will find the file in the directory where Mach is installed.
Someone will look at the profile  to see how you have Mach3 configured.

RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 03, 2017, 01:12:49 PM
ok, let me go look for the file and see how to post it back to you.  Thank you for responding... bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 03, 2017, 02:55:49 PM
ok lets see if this works ,  bobmill attached
Title: Re: A-axis rotary lathe question for Mach 3
Post by: joeaverage on November 03, 2017, 06:24:29 PM
Hi Halfmill,
if you wish your rotary axis just to turn at a constant speed then its not really an 'axis' but rather a spindle. An axis as far as CNC is concerned is a drive/motor
that can be driven in angular synchronicity with other axes. The most obvious example is threading, one axis turns whereas the other axis advances a precise
(pitch of the thread) distance per revolution.

An axis can be indexing....that is to say that you can drive to a particular and precise angle but not be able to synchronise motion with another axis. An example
of that sort of thing is a dividing head for making gears, you can advance 2.345 degrees say, and then have the mill cut the next tooth. This kind of axis is
called indexing-out of band.

The sort of motion you require is just a spindle, rotation but not synchronised to any other axes nor does it stop so indexing makes no sense either.

Could you not disconnect your regular spindle and use Step/Dir signals for a spindle but hook it to your 'A spindle' instead?

Craig
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 03, 2017, 09:52:18 PM
Let me look into what your suggesting and see what I learn.  I am new to all of this.  I need the rotary to do several functions... like cutting the curve on  classical guitar bridges.   I have been a hand builder of classical guitars for many years.  I decided to build and use a cnc for making parts more accurately.  So let me take your suggestions and work with them a bit... bob   thanks again...
Title: Re: A-axis rotary lathe question for Mach 3
Post by: joeaverage on November 03, 2017, 10:24:09 PM
Hi Bob,
sounds like a great hobby or is it a lively hood?

As a lad I lived in a small town and next door for about six months a year lived a middle aged couple who lived in Hong Kong for the remainder of the
year, they were very wealthy. Us kids always considered Mrs Buyers to be mad and treated her as such and no-one wanted to be caught alone by her husband.
No evidence mind, its just what us kids knew.

He died and she rather lost it. I was a few years older then and had been dragooned by my mother and other neighbours to help her with a few chores
and also company, it turns out she wasn't mad after all, but lonely, eccentric and old. Amongst the things I learned was that her husband was a true
craftsman in wood and would hand make violins form timber gleaned from old pianos and other sources. The noises that my brother, sister and I had heard
were not him strangling his wife but tuning and testing the violins he made.

All those years I had shunned him and yet had I known he might have been a friend and a marvellously skilled teacher.

Craig
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 04, 2017, 12:55:51 AM
great story of how wisdom is often hidden...
Title: Re: A-axis rotary lathe question for Mach 3
Post by: joeaverage on November 04, 2017, 02:06:34 AM
Hi,
the curve on the bridge of my guitar (steel acoustic) is curved but slightly. If I were making it I wouldn't bother with a rotary axis.
Mach can quite comfortably mill around a curve like that. Do you have a sketch or a pic of what you want to do?

Craig
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 04, 2017, 03:27:06 AM
I would love to talk about making a classical guitar bridge without a rotary.  I have attached 3 photos.  Two photos are of one of my handmade instruments, shows the bridge on one from top view. The last is of an image I got off google that illustrates something that drove me to 4th axis...notice where I drew the arrow... that part that rises up to hold the strings is 90 degrees from the top of the curve of the "wings" on each side.  But please explain what you know.  bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 04, 2017, 03:28:50 AM
whoops apparently you can only attach one jpeg... so here one and I will post the other...
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 04, 2017, 03:29:28 AM
and the last jpeg
Title: Re: A-axis rotary lathe question for Mach 3
Post by: joeaverage on November 04, 2017, 03:51:47 AM
Hi Bob,
extremely nice work, but where do you plugin the big fat amp?...LOL

My guess when I asked you about what you wanted a rotary axis for was that the subtle curve in the bridge and nut were what you had in mind.
Any decent CAM program can follow a gentle curve like that to well within the resolution/accuracy of your machine. We are used to manual milling
and cutting a curve by co-ordinating two axes by hand is beyond a human operator. Not so for a CNC machine. A rotating axis could potentially offer
accuracy in line with the Truth In Rotation of the axis, a few um with care. I would expect a decent hobby router to achieve some thing like 0.02mm
or 20um if the curve were generated by co-ordination of two axes.

I imagine 20um would be considered pretty fair when compared to hand worked.

Craig
Title: Re: A-axis rotary lathe question for Mach 3
Post by: joeaverage on November 04, 2017, 04:10:02 AM
Hi,
I believe a vertical router with a small diameter endmill probably with a modest radius if not a ball mill would make the bridge pictured easily. The resulting
curve would be close enough to circular that you couldn't measure the deviation from ideal. Of course you may decide to go with a parabolic or elliptical
shape, given how radical you are! LOL

Where fourth axis machining really pay dividends is things like truing cylindrical surfaces of engraving on a cylindrical surface.

You may have noticed that dude1 chimed in that Fusion 360 can't do continuous 4 axis but can index up to two for 3+1 and 3+2.

You can by the way attach up to four images in one post. When you attach one image click on <more attachments> to browse for another pic.

Craig

Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 04, 2017, 09:02:03 AM
What is a "Rotary lathe for A-axis"? ie; is it just a Rotary table and how driven?

RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: garyhlucas on November 04, 2017, 12:59:19 PM
Half,
Are you programming by hand or using a CAM program?  Do you use a 3D modeling program?  The big advance in CNC is really in 3D modeling and CAM programming. I have lots of hand programming experience but life is too short for that!  I use CamBam, both on my hobby machine at home and the big machine at work. I wouldn’t even think of making your bridge with a rotary axis, it’s just too much work that way. It is mostly a 2D job with a little surfacing of the curved part using a ball mill.
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 04, 2017, 01:17:57 PM
Thank you for your response.  Attached are 3 jpegs...

The "basic setup" is just to show how a mock up of what I am trying to do looks like... so you can see my general issue.  Now in a complete set up  I would have the wooden log with a 1 inch wide slot cut just deep enough along its length so that  the bridge blank would match up with a 3" diameter circle.  Then as the A-axis rotary turns it would cut the curve onto the wings of the bridge.  The "log" which is made of Spanish cedar is very light... slightly heavier than balsa, is 3 1/8" in diameter.  Now my first step is to turn the log itself and true out the log to be an exact 3" diameter.  So the log must turn at a speed that is slow enough that the end mill can keep up with it.  The mill end spindle runs up to 24,000 rpm and I simply turn it on manually for the time being while I am learning.  So I have to have the rotary turning at one speed and then the y-axis progressing down the length of the log at another speed.  All of this is just to get the log trued out.  Then I start facing the real issues of the bridge factors.  Now I am brand new at all of this and the learning curve is a bit daunting...but I will hang in there.

Now as you see, there are two slots of different widths and depths in the middle of the bridge.  The thinner of the two holds a piece of bone, (used to be Ivory, but we need our elephants now so its bone), and that slot leans slightly toward the back of the bridge to hold the bone at a slightly stronger position relative to string tension... so the rotary could then be moved to whatever portion of a degree etc., that would give the slot its proper back-tilt.

The transition from the wing of one side to the wall in the middle part of the bridge has to be ninety degrees so I do not have a good image of how that could be done with a ball end mill.

I am open to everyone's considerations and ideas on all this.  Right now I need to figure out how to get the lathe aspect to turn at a slow speed, and then have the mill end move down the length of the log so that it cuts the log and trues it out so there is no wobble that then translates to a wavy surface on the curve of the wings.

Sincerely guys,   bob
Title: Reply to Gary Lucus
Post by: halfmill on November 04, 2017, 01:26:20 PM
I am just starting.  I bought a cnc, a 4th axis lathe and mach 3.   I am slowing learning Fusion 360. And I am taking a cnc machining class at community college... so I can say I am swamped with learning all this...  so for now I am just trying to slowly move most of my hand skill over to the cnc processes without losing any tonal qualities in the instrument.  Machining is precise, but it can't "hear"  or experience the feel of a professional concert quality instrument. So I will have the cnc do all the rough in work and I will handle the art side. Thank you for your responses.  bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 04, 2017, 01:30:10 PM
Hi Bob,
extremely nice work, but where do you plugin the big fat amp?...LOL

My guess when I asked you about what you wanted a rotary axis for was that the subtle curve in the bridge and nut were what you had in mind.
Any decent CAM program can follow a gentle curve like that to well within the resolution/accuracy of your machine. We are used to manual milling
and cutting a curve by co-ordinating two axes by hand is beyond a human operator. Not so for a CNC machine. A rotating axis could potentially offer
accuracy in line with the Truth In Rotation of the axis, a few um with care. I would expect a decent hobby router to achieve some thing like 0.02mm
or 20um if the curve were generated by co-ordination of two axes.

I imagine 20um would be considered pretty fair when compared to hand worked.

Craig
yes learning all of this is the bugger in the butter...bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: garyhlucas on November 04, 2017, 03:40:45 PM
Half,
If you have fusion 360 you can make a 3D model of that part and fusion should easily handle machining it with just 3 axis.  The way I would approach this is to 2D mill the rectangular raised protrusion and slot, and the top of curved area for length, width, and a little extra on top.  Then use a 3D milling operation on the curved portion with a ball mill.  In CamBam from a 3D model I would create a single mregion by putting a slightly more than tool diameter rectangle around the whole part, and a rectangle equal to the raised portion.  Then CamBam would recognize to machine only the area within the outer rectangle and outside of the rectangle around the raised part. You might use a routine typlcally called waterline rough and waterline finish.  Rough will make multiple passes at a specified depth to remove most of the material leaving a defined roughing clearance.  A waterline finish would then cut the surface to finished size and you would specify a small stepover so the ripples are minimized.  There is usually other 3D methods that may do the job better.
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 04, 2017, 04:35:14 PM
Gary thank you for your response.  Let me go over what you have said... I am barely a week into fusion 360.  It will take me a while to get up to speed... but I will consider your suggestions... thanks ;D
Title: Re: A-axis rotary lathe question for Mach 3
Post by: dude1 on November 05, 2017, 01:05:31 AM
You can do that with fusion on 3 axis machines quite easily useing 3D adaptive to rough it out then use morphed spiral or run 2 parallel ops one for the raised bit along the Y axis by setting the direction you can do it with a endmill then do the rest of it with a ball nose along the X axis and setting the direction.
Next month they are planning to add 2 direction to Adaptive, also if you have a look on the fusion forum there are quite a few guitar dudes on there
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 05, 2017, 09:38:28 AM
halfmill,

Reviewed the xml file you posted but need to ask a few questions before commenting.

What version of Mach3 are you using?

Are you slaving an axis for gantry squaring and is it B?
       or asked differently........
Are two motors used on either the X and Y axes?

Are you are using steppers and that the 4th axis ( lathe head) is stepper driven ?

What drives are you using for the motors?

RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 05, 2017, 02:07:30 PM
Hi Rich,

The Mach3 version is  R3.043.066
running on windows xp

Y axis uses 2 ball screws and thus 2 stepper motors
B is slaved to Y axis for the 2nd motor

The 4th axis lathe head is stepper driver
Stepper driver is MicroStep Driver ST-M5045
The other four stepper motors
have similar stepper drivers

thank you for helping here... bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 06, 2017, 08:31:19 AM
GENERAL COMMENTS AND RELATIVE TO THE POSTED XML
------------------------------------------------------------------------------------------------------
- Mach3 version  R3.043.066 is known to be buggy and there are no changes listed as to   what was done from the previous versions. Use version  .062 here thus no experience   with .066 other than what some folks said about it and I took their advice and don't use it!

- With a kernal speed of 25000 HZ, possible ( I didn't say reliable ) pulses would be 25000   pulses / sec  and a  stepper requiring
  200 steps / revolution  you would get 125  rotations  /  sec which happens to be 7500 rpm. FWIW, in theory anyway!
 
- Since B is slaved to Y and both motors used to drive the Y axis, B should be configured      as linear and not angular.  See  Using
  Mach3 Manual ( page 4-11, 4.6.6 )

- Motor tuning for A doesn't look right......ie; 36000 for velocity using a stepper motor.
  From  traditional axis planes and orientations A rotates about X  and C rotates about  Z.
  So  assume that you will be using A as the 4th axis and it is stepper driven.

  Now let me say some things about using a stepper to drive a spindle , 4th axis or as you call it Rotary lathe.

  - Steppers are not a good choice to drive a rotary since as rpm increases the  torque  decreases and you will see that the rpm is not
     linear with an increase in speed.  Fine for indexing and with active mounted tooling while A rotates at a reasonable rate.
 
  - Mach3 does not provide for two spindle operation directly.

  - Stepper controlled 4th axis cannot run continously, it can index, do rotary but not act as     a true spindle. Actually Mach3 can't
     run any axis continuosly.
   
     A can be defined as either angular or linear, thus, gcode commands can make it rotate  a number of revolutions, or, as linear it
     will rotate but in terms of a linear move which relates to the work diameters circumference. Yes, one can command to make a
    " lot " of  rotations or a  long distance, BUT, as said it does not act like a true spindle.
   
  - You can only have one "spindle" configured and running in Mach3.
     As you stated you are manually controlling the spindle. So you can consider the
     your spindle as live tooling mounted on the Z axis. Will expand on the thought, later
     in another reply to this thread.

  - For awareness, there is a VB command called Swap Axis, but it only changes the pin #s assigned to an axis. So you can only swap
    similar motors ie; can't swap servo with a  stepper. You can swap axes around and  can be used to make an axis into a spindle
    via  macro's.
   The spindle is not configured so assume that you are manually controlling the router.
   If the router machines spindle is manualy controlled you can still define spindle in motor tuning. So you can swap, say A and
   Spindle, calling the correctly scripted macro at the proper place in the Gcode.

  -  C axis is inhibited ( settings alt 6 screen).  C is defined  angular. Also C is not enabled.     
  -  Jog keys defined for XYZ but not for ABC axis.  Should define keys for A . No reason to define B since
     it is used along with Y for the gantry ( Jog Y and the B gets the same number of pulses...? ).

  - switch pins defined for XYZ and partialy for A . B should also have a switch
    same as Y? One of the router table users should confirm......... I don't use switches!   ;)

   - No tools defined. You will  need to define tools  if you start using CAM programs which generate gcode. Also you will need to use
     a system to touch the tools when changed.
   
 FWIW,
   
 RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: garyhlucas on November 06, 2017, 01:26:18 PM
Rich,
The problem of Mach 3 being able to run an axis continuously is the whole problem for turn/mill machines. Currently my machine has DL06 plc in it that handles all the I/O like coolant, two different mill spindles and 3d printing extruder, lights, vacuum, heat for 3d printing etc.

I just got a DoMore BRX plc to replace the DL06. AWESOME little PLC!  It has analog inputs and autotune PID to control heaters and such. Analog outputs to control spindle speed for conventional drives that don’t use PWM, and can accept PWM from Mach 3 and translate it. It has high speed inputs for encoders, and high speed outputs to drive servos or steppers  and can do 2 axis coordinated motion on its own. It speaks modbus, USB, Ethernet, serial Rs232 and Rs485.

So I am going to drive my lathe spindle stepper driver through a double pole double throw relay getting pulses for postiong as 4th axis from Mach 3 or as spindle drive from BRX reading Mach 3 PWM spindle output.  It can also generate an index pulse for threading. The analog inputs will read the thermocouple sensors from the 3d extruder and the heated bed and PWM outputs to the heater solid state relays will control temperature. M code inputs from Mach 3  can turn heat on and off and change set points. I am hoping this will end all the crazy work arounds and give me capabilites for othe stuff like an auto tool changer too.
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 06, 2017, 01:29:04 PM
Rich, thank you for such a detailed set of considerations/recommendations...  I will study this and try to take the right steps.

In a few days I will ask for clarifications.  Basically, if I simply had a small separate wood lathe that would fit under the spindle mill end and where I could vary the speed, then I could do what I need to do for a lot of guitar applications... I will look for a controller to make the current 4th axis lathe independent of  mach 3... just so I can turn things when I need to.  Thanks again, let me go study all of this.

Can I go to Artsoft and download the particular version that you think I should be using?  bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: garyhlucas on November 06, 2017, 02:57:07 PM
Half,
Since I got my BRX plc I have no need for another device I bought. It is a step pulse driver with a potentiometer input. You can have it free. If you hook a double pole double throw relay to be activated by a M code from Mach 3 you could then hook step and direction inputs to the drive to the common terminals and the step and direction output from mach 3 to the normally closed contacts and the pulser step and direction to the normally open. It is a mill with 4th axis when the relay is off and a lathe when it is on.
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 06, 2017, 04:13:08 PM
Half,
Since I got my BRX plc I have no need for another device I bought. It is a step pulse driver with a potentiometer input. You can have it free. If you hook a double pole double throw relay to be activated by a M code from Mach 3 you could then hook step and direction inputs to the drive to the common terminals and the step and direction output from mach 3 to the normally closed contacts and the pulser step and direction to the normally open. It is a mill with 4th axis when the relay is off and a lathe when it is on.

Gary Hi,  Please translate Brx plc... what does this stand for.

I will show this to my friend who is far more knowledgeable than I and see if we can do what you are suggesting...thanks... bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 06, 2017, 04:16:34 PM
You are offering to send this to me, this device you already have?  bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: garyhlucas on November 06, 2017, 06:06:50 PM
Yep,
Send me a PM with your shipping address. It's tiny, like 2" square.  Don't remember what I paid for it but it wasn't much, doesn't matter.
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 06, 2017, 07:01:49 PM
sent to your email... thanks bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 07, 2017, 05:06:17 AM
Bob,
Seems like the gift from Gary will provide an option for you.

I echo what Graig and Gary replied about using CAD / Cam. Have not used Fusion 360
for the mill / router but have used it for the lathe. Have used Meshcam and Cambam to generate code for complex objects also. Like everything, there is a learning curve to using
CAD / CAM,  since you will need to create objects in 3D instead of 2D and understand
how to apply the software to generate code for a part. The software is all similar but some integrate the CAD / CAM much better, and also provide for engineering analysis. So it all depends on  the users needs. Make note that some folks are using industrial software and costs of the software alone are expensive. You would be shocked at the software monthly overhead  cost  ( more than what many folks earn ) paid for me when I was working.

As a hobbiest most will never be able to rationalize big bucks for software.
Remember when AutoCad was rather cheap to use? Do you think Fusion will be provided
free or reduced pricing forever!

You will spend a lot of time learning and if free software is no longer available then where are you? All I am saying is put the cost of things into perspective for intended use and spend for what you want to be able to do. Can have anything you want in the store but once you bring it to checkout ya got to pay for it!

For some simple stuff there is nothing wrong with a little hand coding to do a task and doing multiple tasks. Also there is experience gained in fooling around.

So much for my rant, it's just some thoughts FWIW,

RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 07, 2017, 05:14:29 AM
Gary,
May want to start a new thread about use of that PLC for a turn / mill combo.
I assume your are aware of Simpson's work on the matter.
Would make for an interesting topic.

RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 07, 2017, 06:14:49 AM
Bob,
 A "loooooooong" time ago I fooled around and used a removable stepper to drive the   spindle on the lathe using  live tooling on the carriage ( high speed manualy driven spindle instead of using a lathe tooling). Intent  was geared towards model making such that I could turn or  mill work without doing another setup on a different machine. So was able to index drill hole patterns on a  face or side of the work post machining  the face and side to size, mill  the  shafts full / partial / circular in or over a partial length or roational over the length, do spiral work, etc.

So the lathe spindle was used in both angular and linear mode with slaving or not slaving
another axis to the spindle. Commands were simple in many cases.
For a lathe / router setup like you show, the routers  Z spindle could be considered  live tooling, use another  axis equivilant to Z on the lathe, or what ever. Note that Mach3 provides for movement of an axis and only knows what you tell it. One just needs to think "out of the box" , code appropriately for some simple individual tasks. One could just create a new profile for when it used and forget about all the VB, Maco's, etc.

Fooling around with this just may satisfy a need,

One could call doing this "The Poor Man's High End CNC"! :) :D ;D

RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 07, 2017, 11:29:29 AM
Rich... to answer some of your questions to the last couple of your posts.

Bob,
Seems like the gift from Gary will provide an option for you.

I echo what Graig and Gary replied about using CAD / Cam. Have not used Fusion 360
for the mill / router but have used it for the lathe. Have used Meshcam and Cambam to generate code for complex objects also. Like everything, there is a learning curve to using
CAD / CAM,  since you will need to create objects in 3D instead of 2D and understand
how to apply the software to generate code for a part. The software is all similar but some integrate the CAD / CAM much better, and also provide for engineering analysis. So it all depends on  the users needs. Make note that some folks are using industrial software and costs of the software alone are expensive. You would be shocked at the software monthly overhead  cost  ( more than what many folks earn ) paid for me when I was working.

 I am aware that these are very expensive ways to go--the route of software.  Fusion360 is currently free for anyone enrolled in college... and I don't think they are going to change that... so I enrolled in community college and am taking a mill class.  I thought that would speed up my learning curve and it has helped to some degree. However their machines are Haas etc., and I am never going to be able to buy something of that scale, nor would it fit in my small 400 sq ft shop. The problem is that no one has ever heard of Mach3 and they are not as knowledgeable about stepper motors etc. as I thought they would be.  Of course those machines use servo and not steppers and so forth.  So I am stuck with trying to learn from any source I can.

Secondly,  I am older -- 70, and we all know death will come soon enough.  Still there is meaning in life if we continue to stay in "learn mode" and continue to move forward.  In my life my curiosity has only intensified and I am never bored... so I think the cnc route has its psychological uses as well.  Finally if I got smooth enough with making the guitar parts, and there are a limited number, I would have the programs finished in g-code for each part and the need for fusion 360 would not be absolutely essential after that.  Of course it never dovetails that neatly. The fact that I am working the lathe axis issue so early in the learning curve is that this is what was being offered in class and I did not want  to wait another semester before getting started in some formal training.  If I learn enough g-code then mach 3 should handle all or most of my needs.  Right now I am trying to get my mind around the 4th axis lathe concepts and how that fits into my mill situation for making the bridge and later the guitar neck blank... classical necks are very complex compared to say, a fender guitar neck.  Mach3 appears to be very very deep in its use and complexity. He or she who figured all of this out...well they must of had a vast mind..  

As a hobbiest most will never be able to rationalize big bucks for software.
Remember when AutoCad was rather cheap to use? Do you think Fusion will be provided
free or reduced pricing forever!

You will spend a lot of time learning and if free software is no longer available then where are you? All I am saying is put the cost of things into perspective for intended use and spend for what you want to be able to do. Can have anything you want in the store but once you bring it to checkout ya got to pay for it!  

I have already paid off the cnc machine, have it up and running, have my guitar shop set up and so forth...so I think I can weather the rest of what I must go through in order to come out producing fine and finer quality instruments...

For some simple stuff there is nothing wrong with a little hand coding to do a task and doing multiple tasks. Also there is experience gained in fooling around.

So much for my rant, it's just some thoughts FWIW, Please continue to rant and bring on more suggestions and ideas... bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: dude1 on November 07, 2017, 02:20:00 PM
It would be good if you did a post on getting the plc up and going halfmill, I wont to be able to do the same thing since fusion does not have 4th axis continuous, If you need help with fusion yell out I am helping a dude the same age as you how to do the cam for the guitar parts
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 07, 2017, 04:59:19 PM
dude1, oh thank you for your offer... I will definitely take you up on your offer of  help.  Now people are throwing a lot of letters at me like in your case...PLC... where do I find a print out of all the contractions of words or letters so I can brush up on the vernacular.   bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 07, 2017, 05:25:42 PM
Bob,
Not sure what they are use for teaching. There is a Haas Programming Workbook in Members Doc's that you can download. One book I recommend is by Peter Smid
called CNC Programming Handbook. The first 100 pages of it will ground you for most any machine.  You can scan through the lathe info to get a flavor of using the lathe and will just say the lathe has more tool geometry to deal with.

One of the nice things about the Golden Years is that one has choice to do what they want to, whenever they want, at the pace they want,  AND, what they do dosen't have  to make sense to anyone except themselves. Still have a note that my trumpet teacher wrote during a lesson  "Nothing stays still, it either moves forward or regresses withers and dies,
that is fact of nature, get used to it!"

Keep moving forward..............................,

RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: dude1 on November 07, 2017, 05:41:24 PM
PLC = https://en.wikipedia.org/wiki/Programmable_logic_controller
Title: Re: A-axis rotary lathe question for Mach 3
Post by: garyhlucas on November 07, 2017, 07:58:02 PM
Gary,
May want to start a new thread about use of that PLC for a turn / mill combo.
I assume your are aware of Simpson's work on the matter.
Would make for an interesting topic.

RICH

Was not aware of Simpson's work, got a link?
Title: Re: A-axis rotary lathe question for Mach 3
Post by: dude1 on November 07, 2017, 09:23:34 PM
https://www.youtube.com/user/Simpsons36/videos
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 08, 2017, 01:40:14 AM
Yep,
Send me a PM with your shipping address. It's tiny, like 2" square.  Don't remember what I paid for it but it wasn't much, doesn't matter.
Gary I sent an email to you personally on 11/5/ or 6 /2017.  Did you receive it?   bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 08, 2017, 01:59:53 AM
Now asking for G-code help.

I want to write a g-code line in MDI where the Y-axis moves .125 inches while the  4th-axis lathe moves one revolution.  That should not be too difficult, but I have not been successful to date...and I would like to figure this out in the next 3 days... I've spent a week already unsuccessfully.  Here is a typical line of code and the results.

G1 y-.125 A360 F10.000  Lathe started making a clicking sound, Y did not move and the lathe rotated about 1/2" of distance on the 3" diameter log (material).  I did not ruin the log as I had Z at home position up and away from the material.

2nd Try
G1 y-1.000 A2880 F3000
The lathe turns about the speed I would like for wood, but if it actually had the z spindle turning, it would cut a nice spiral, with about 1/2" between each turn of the spiral, whereas I am trying to get the spindle to "true" the wood log.  So the mill end would have to remain at the same Y position for the time of one revolution before Y advances .125 inches ahead down the length of the Y axis...   Now at F3000 the lathe will make one revolution in 7 seconds... I just need to get the y movement slowed down.

OK Guys, please help me with the G-code... bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 08, 2017, 07:31:33 AM
Bob,
Would not it be better to have a clear understanding of various configurations and the affects of some settings before you code?

Anything really important about the next 3 days?

Note that in school your using Haas, yet Smid's book is Fanuc ( Mach 4 is Fanuc based ), Mach3 has a dialect of code which is  say similar but dose not have some of the commands of other controllers. Don't want you to get all screwed up in your head!

RICH

Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 08, 2017, 11:47:30 AM
part of my class project is to produce on cnc a guitar bridge... I had to get special permission to do this... I think that class runs up to xmas break... but right now the "log" has to be "trued" so that I can cut a flat across the length of the log that holds the guitar bridge material...and so I would not want to flunk the course if I don't even get the thing made.  So that is why the pressure...and of course the whole idea is to get codes written for all my guitar parts...  now I do know that is a big order in terms of learning curve.  Also, though, the g-code help I am asking for cannot be that complex... one or two lines.  Of course I will continue to learn and develop along with others on the forum...I like doing this.

So maybe you could help me with one turn or revolution of a-axis and at the end of that my mill end moves .125 inches in the -y direction.  Can mach 3 not do that... is it limited in some way??

thanks, bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 09, 2017, 11:13:36 AM
Bob,
I will help with the commands.
BUT
It will not be a "type this in the MDI line" kind of thing and you try it out.
Instead you will walk a "learning path", it will start with basics, and progress should be quick.

Just going to be my way of getting you somewhere quickly and having you KNOW what your doing.

So you want to have some fun........?

RICH




 
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 09, 2017, 12:24:43 PM
Rich--Yes of course... I never turn down an offer to learn like that.  bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 10, 2017, 08:07:47 AM
BOB,

I will assume that you  have not changed any of your Mach settings and your still using the xml file that you posted.  Copy the xml to the Mach3 directory and rename the copy it to 4thbobmill.xml. We will  be doing changes to your configuration and will use the "4thbobmill" profile.

- Per your xml you are using the A for the rotary axis. It is currently defined in Config >General Logic Configuration as linear. Tick the box for A to make it angular and then Save Settings.Now you will need to change your motor tuning. So caluculate the steps per ( the units are degrees for an angular rotary axis ).

Example Calc:
For my rotary using micro stepping and a 72 gear ratio:
200 steps / rev X 1 rev /360 degrees = .5555 steps / deg X 10 micro steps X 72 gear ratio=400 steps per unit
 
- Note the value you calculated but use a value of  50  less than you calculated as an imput for the steps per.
in motor tuning. Use 10 as value for the velocity and 2 as an acceleration value.

- Now define which keys you will use to jog the A axis.
Config>System Hot keys Setup, click the A /U++ box and hit the key you want to use. Do the same for the A/U--. Make sure the keys codes are different than the other axis keys.
 
- Save Axis Settings and also Save Settings under Config.

- Hit the Tab key, and in the flyout set Jog Mode to Cont Jog the rotary to see that it rotates. 
Go back to motor tuning for the A axis and keep changing the velocity value by doubling
the velocity value and jogging the rotary. Do this until the stepper skips.  So 10,20, 40,80,160, 320, etc.
Suppose it skips at 320 then set the velocity  to 160.

- Now start changing the acceleration value with the velocity set at 160 increasing the accel. Do similar as the you did for the velocity increase. So 2,4,6,8,10 etc. for values. Acceleration becomes important in 3d work.
See where the  axis skips. Go back one trial setting of accel, so if skipped at 10 go back to 8.

- You now have found the max velocity and accel settings for your rotary. Note that as the stepper rpm is increased the torque decreases and you need to have adequate torque for machining. Reliability is more important that speed.

Save Settings and exit MACH.

------------------------------------------------------------------------------------------------------------------

- Download the following manuals:
  Using Mach3 Mill
  Mach3 CNC Controller Software and Installation Configuration

- read / refer to in  the Using Mach3 Mill Manual info on:
  - read section 5.5, 6.2.3, 6.2.12,10.1.5 and 10.1.6
  - Gcode commands: G0,G1,G90,G91 then G93,G94,G95 ( You may want to compare Haas command                definition to the Mach3 defintions of the commands)
- read / refer to in Mach3 CNC Controller Software and Installation Configuration
  -  Section 5.5.2.3
  - Page 5-37  about Rotational: settings
  - Page 5-39  about Axis DRO Properties

--------------------------------------------------------------------------------------------------------------------------

To be continued,

RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: garyhlucas on November 10, 2017, 10:04:26 AM
Rich,
Good write up. Another thing to remember with a rotary axis. Unlike a linear axis the cutting force available varies with the radius of the work. Milling on a small diameter part may work fine, but you could experience stalling on a large diameter part making the same cut.
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 10, 2017, 10:48:34 AM
For Rich,

Ok I will get started on your first lesson today. again thank you.

For Gary Lucas.  Max diameter is three inches.  However I am running rather slow and shallow cuts, less than 1/8th of an inch and in soft wood--something like 15 inches a minute.  I have run on xy plane harder wood up to 100" per minute as a test.  4 flute end mill at 24,000 rpm... it did not have a problem with it.  Finally I tried holding the "round" from turning in the chuck and it had more than enough torque...so I don't think in my case with the material I am working with that I will have an issue.  thanks for the heads-up though.

bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 10, 2017, 11:23:45 AM
Bob,
Have fun after lesson1 do #2 below.
---------------------------------------------

- It would be nice to have some type of index reference on the chuck so you have a visual of the  A movement.
A number of easy ways to do that ie; marked tape or even mount a plastic circular protractor on the back of the chuck.

- We deliberately set the angular wrong before ( you know what the caculated value was ). So use the axis
calibration feature of Mach  ( read / refer to in Mach3 CNC Controller Software and Installation Configuration
 Section 5.5.2.30) to calibrate the A axis. The input value is in degrees and you need to tell Mach how far it actualy moved so it can calculate the step for you.

You may need to do it more than once but it is an easy way to calibrate both an angular and linear axis.
Note that   1 / steps per    is the theoretical resolution of the rotary. Say it is 400, then 1/400=.15 degrees.

 You now will have a calibrated A axis.

MODIFIED THIS REPLY: Don't do the striked text below.

- Go to the MDI screen, in the Input change current mode from  G90 to G91 by just typing G91.
  To rotate the A 360 degrees input G0 A360.  
   You should know how fast it will rotate at max and different feedrates.
   If you don't have something to measure the rpm then time it over a number of rotations ( measured is  better!).
   I bought a digital tack on ebay for around $12 and it  works great.
  To rotate A for 5 revolutions at a feed rate , type in MDI Input, G1 A1800 F1. Just keep doubling the feedrate  values, note the rpm, and graph the values.

- Looks like your rotary is just driven by timing belt so no gears etc and thus basklash should not be concern.

- Would suggest that you add an index so Mach can display the rpm of the rotary.

-  Click the Mach Coord's button, notice how the DRO changes. Understand the difference between
   using Machine and Work Coordinates.

- Now do some manual commands changing the rotational direction using the minus sign.

-  In both G90 and G91 modes, command  A axis moves with each of the Rotational choices
   that can be selected General Logic Configuration Screen.

----------------------------------------------------------------

Summary so far:
You learned how define, A as angular, tune the angular, calibrate the A axis, get / have  feedrate info for later
use, basic gcode commands, how other settings and modes can affect the turning motion.

Now remember you simply asked can you give a gcode to..........
Don't understand the "other stuff" even a simple command like G0 A 360 is like pressing some magic buttom and not know what will happen!
  
To be continued,

RICH



Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 10, 2017, 11:48:05 AM
Gary,

Good point on cutting force. Interesting that there  is research on whats required for machining metal but I have never found anything for exotic woods.

I don't do much woodwork anymore but do machine exotic woods for gun grips, knife handles and some other stuff. Use carbide tooling to machine the stuff. Nothing sucks more than hitting stone which is in ebony. Just need to experiment what feeds, speeds,depth of cuts, tooling work well for intended work.

There is still more to the tuning of the rotary which will be addressed as we progress.

HMM.... this thread will be like,   "round and round it goes where it stops nobody knows"!  :D

RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 10, 2017, 12:42:07 PM
Bob,

To allow for easier playing around with gcode commands suggest you turn off your switch inputs.

- Config>Ports and Pins>Input Signals  un-enable all except for your EStop.

You won't have to worry about having a work offset active and you can change Machine Coordinates to zero easily.
Allows you a simple value to work from.

IE; Jog the 4th axis, Ref All Home and the 4th axis  goes to zero value.
      You can also clear a work offset.
      
Sorry should have mentioned this in lesson#1.

RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: garyhlucas on November 10, 2017, 12:46:54 PM
Bob,
I have never seen a 4 flute wood cutter, and 1 flute cutters are quite popular! The reason is that soft materials can be cut at such high speeds that chip packing in the cutter flutes and the cut itself is a big problem.
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 10, 2017, 07:35:12 PM
Gary I don't have this problem with rosewood--that is chip problems.  I use a carbine 4 flue downcutting endmill made for machining metals, and it works fine on rosewoods from my experience.  I do work ebony as well for the fretboards, but that machines well enough too.

For Rich.  Is there a way in Mach 3, to print the screen clearly.  I usually use snipping tool, but xp does not have that feature.  I would like to print out all of my setup screens in Mach 3 before I start changing settings around as you have asked for my learning the better way of working...bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 10, 2017, 09:16:01 PM
Bob,
I have been using SnagIt forever for screen captures so nothing jogs the memory for an alternate and there are ones out there.
Your setups are contained in the xml file. That's why I asked you to copy the original / posted screen and rename it to something different like bobmill0 for original so you have a record. The xml file is saved very time you save settings and you will find them in the xmlbackup directory
under Mach3 folder.

RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 10, 2017, 10:45:10 PM
ok got it
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 11, 2017, 01:48:04 AM
For
Rich...

The first thing I need to know---is how to download ver.  .062 that you want me to load... where do I go to get that etc..    bob

found a free version of snagit, so that is taken care of... thanks
Title: Re: A-axis rotary lathe question for Mach 3
Post by: dude1 on November 11, 2017, 02:31:36 AM
ftp://ftp.machsupport.com/Mach3/
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 11, 2017, 04:10:15 PM
Rich or Dude1,

I tried the address    http://ftp://ftp.machsupport.com/Mach3/  on a windows xp computer, a windows 7 computer and my wife's windows 10 computer... this address showed either "page not available", or just listed several New Fangled Solutions sites.  The only version on the regular New Fangled Solutions website of Mach 3 downloads is version ending with .066    So is there another way to get version ending with .062 ??  bob

bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: dude1 on November 11, 2017, 04:32:07 PM
http://www.machsupport.com/software/downloads-updates/  then click on FTP downloads - FTP server Main menu - Mach3 - mach3 version 3.043.062 exe
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 11, 2017, 05:12:55 PM
Thanks Dude1  !!!
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 11, 2017, 05:55:56 PM
Rich--or Dude1

With the 062 version of mach 3... should I totally uninstall the previous 066 version and all that, or can I just load 062 and it would it work just to over-ride the 066 ???
Title: Re: A-axis rotary lathe question for Mach 3
Post by: dude1 on November 11, 2017, 06:12:59 PM
It over rights fine but backup your config file first
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 11, 2017, 06:18:07 PM
Bob,

First save your xml file and your license to a safe place.

I suggest that you just uninstall mach3 v066 and then install 062. Don't think you will ever use 066 again.
After new installation is complete place your saved XML file and license in the Mach3 directory.

Per Dude it does overwrite but guess I am old fashion and want to make sure it is gone.

Your choice on what to do...........


RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 11, 2017, 06:24:49 PM
Let me add that if you had a lot of "stuff" in an old version and wanted to also keep it for later use.
THEN
Remame the Mach3 to ZMach3. That puts the old one down the directory list and avoids a possibility that the first file found in the drive will be used. 

Any version installed after will be put into the Mach3 directory.

RICH

RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 11, 2017, 06:50:13 PM
Relative to xml files as we progress:
Original xml file posted was reply #3:  bobmill
Lesson one I asked you to copy and rename the original and use:  4thbobmill

I want at different stages of this thread for you to use different xml's.
That way not only you, but I /we can also have a look, at what you did if necessary.

I guess the following may be a progression:
- mill w/ 4th defined as angular
- mill w/ 4th defined as linear
- 4th used as a lathe only
- 4th used as a lathe with live tooling or some goofy variation

Not sure of the above but it can  get rather confusing .............
Will let you know when to use a new xml.

BTW,
Just found some of my old notes ...... been almost 7 to 10 years since I was fooling around. Good grief forgot more than I once knew.

No....... haven't put the keys in the refrig yet!  ;D

RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 11, 2017, 07:07:36 PM
I always keep my keys and wallet in the refridge... no one ever looks there... and I always go there... new synapse grooving...
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 12, 2017, 08:08:38 PM
Bob,

Still addressing the 4th axis defined as being angular.
For motor tuning you calculated the steps per value, and then used the calibration feature.

Now lets go back to motor tuning again. Be aware of what the grahics is showing in the motor tuning window.
The graph shows how the stepper will ramp up in time ( accelerate), run at at some velocity, then ramp down. Change the velocity or acceleration and be aware of what the graphics is telling you. With a 25k Kernal speed the graph will only change so far ie; you can only get so manny pulses to drive the motor.

At some velocity, acceleration, or combination of both the motor will skip.
Practicaly speaking you can't go from a standstill and accel instantantly. For a stepper as the motor rpm increases the torque decreases, so,  you need to limit the max velocity so there is adequate torque for machining. Speed can come once reliability is assured. Depending on what you are machining will determine how "you" limit the velocity.

You should know what your max velocity and accel is.
At a combination of max velocity and accel you can check the rpm. The rpm at any lower velocity value can be found  quickly by just succesively dividing  the max velocity  found ( ie; find rpm using a stop watch for one revolution ( 360 degrees)  at max velocity).  Max rpm/2 is rpm of the lower velocity if it was cut in half. Note that the total time to rotate 360 degrees is influenced by the acceleration. Looking at the graphics can show time required for the ramps.

You can do a lot of hand calcs, but, there is an easier way:

STEPS PER UNIT CALCULATOR - members docs
http://www.machsupport.com/forum/index.php/topic,16315.msg110286.html#msg110286

This spread sheet will calculate the required steps per unit for linear and rotary stepper motors.
Imperial and metric calculation are provided for. Pulses per second  are also calculated based on miscellaneous inputs.
 
StepperCalc_ALENZ_rev1.xls

Play with the calculator for different values.

------------------------------------------------------------------------------------------------------------------------------
Before we do some gcode commands for the rotary you need to be aware of the current state of the machine.
Different gcodes are shown in the upper right corner of the screen and they will change depending on an
an entered gcode command.

SO
 
Print the Gcode Reference which can be found in Using Mach3 Mill  Manual  - Page 10-12 Figure10.4
There are few others commands not listed but the list will serve you well.

Then compare the codes listed on the screen to the list. After a while you'll know what to look for.

----------------------------------------------------------------------------------------------------------------------------------

To be continued,

RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 12, 2017, 08:24:44 PM
Rich!!---right now I  have a full blown obstacle with the interference issue that has surfaced...see my new post on my Frankenstein moment...As soon as I've got that cleared up, then I will get back to your lessons...bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 13, 2017, 06:11:46 PM
Rich hi... solved the vfd issue by installing a new shielded cable... problem solved.... so I will work on your lessons now.   bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 13, 2017, 07:53:29 PM
Bob,
Glad you got it fixed and on the first try.

#4
The 4th axis or rotary defined in degrees is used for indexing.
If verticaly mounted you could move way from the center of the rotary to some location drill a hole , index some angle and drill another hole. When mounted horizontaly you are still indexing.

The rotation of movement + or minus , cw/ccw, is defined by mathematical standards and the Right Hand Rule is good way to remember it. Direction of spindle rotation is the same as the mill, namely, one views from the spindle towards to the chuck in the direction of the axis.

Say you wanted to drill the holes in the quitar bridge, relative to the top of the bridge without removing  it  from the holder. Index 90 degrees and while in that position  run the code for drilling the holes.

Do the following commands using the MDI in the order shown. BUT
On a piece of paper write down what you think the motion will be and what  the dro
will show for position. And if you want to take this a step further do the same for  Machine Coordinates and  also Work Coordinates along with G90 and G91.

G54
G94
G90
G0 A0
G0 A10
G0 A-10
G0 A0
G91
G0 A0
G0 A10
G0 A-10
G0 A0
G0 A360
G0 A720
G90
G0 A1.5
G0 A0
G91
G0 A1.5
G0 A-1.5

The way the rotary rotates to get to a position and what is also shown in the DRO
can be affected by "Rotational"  settings. Config>General Logic Configuration has three Rotational settings you can use.

Rot 360 rollover – if checked the A axis DRO will display from 0 to 360 degrees and then start over at 0. If not checked the A axis DRO will be additive such that 2 revolutions will display as 720 degrees. The rollover only works for G91.

Ang Short Rot on G0 – The axis will move in the shortest possible move to a new position. So if at 0 degrees, and you jogged  to 359 deg then it would just rotate  -1 degree.

Rotational Soft Limits – if checked will apply software limit switches to the rotary axis.

You don't have any of these settings selected and suggest you try some commands
with the Rot 360 rollover and Avg Short Rot on G0 selected.

To be continued,

RICH

Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 19, 2017, 09:29:04 PM
Bob,

#5

CNC Cookbook Site has a lot of info about CNC. Bob Warfield has number of articles
about the 4th axis. I think you will find them informative.

4th Axis Basics: What They Can Do
https://www.cnccookbook.com/cnc-4th-axis-introduction/

4th Axis for the IH CNC Mill
Spread sheet calculator for the 4th axis
http://s3.cnccookbook.com/CCMillCNC4thAxis.htm

CNC 4th Axis Basics: Workholding
https://www.cnccookbook.com/cnc-4th-axis-basics-workholding/

CNC 4th Axis Basics: Routers and Woodworking
https://www.cnccookbook.com/cnc-4th-axis-basics-routers-and-woodworking/

Mill Turning 4th Axis on Hobby CNC Machines
Videos of Steve Simpsons workon the 4th axis
https://www.cnccookbook.com/mill-turning-4th-axis-on-hobby-cnc-machines/

---------------------------------------------------------

You mentioned that the  school uses a Haas mill. Here is a link to a workbook
located in Members Docs so you can compare Mach3 commands to Haas commands.
 
GCODE PROGRAMMING REFERENCE
http://www.machsupport.com/forum/index.php/topic,24580.0.html
HAAS Mill PROGRAMMING WORKBOOK.pdf

----------------------------------------------------------

An excellent comprehensive guide to programming is CNC Programming Handbook

by Peter Smid. I highly recommend it often to folks.

------------------------------------------------------------

To be continued,

RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 19, 2017, 10:13:10 PM
Bob,

#6

More general preparation before the fun realy starts!

It is important to understand the difference between 2D and 3D work.
The following link to Shopbot site  provides insight on  the topic.
http://www.shopbottools.com/mProducts/3-d_work_v2.htm

--------------------------------------------------------------------------------------------------------
All the lessons posted are rather focused on general awareness about the 4th axis.
So felt I should make an important comment about my lesson postings in this thread.

I am very focused on the basics relative to Mach3 and simple gcode commands which
directly relate to using a 4th axis. CAD / Cam, other gcodes, setup, etc will be ignored
as much as possible.  Just not possible to cover all in a thread, or said differently, not going to
write a book. So just understand the thread  is not in any way "all inclusive".

That said,

-----------------------------------------------------------------------------------------------------------

Mod's were done to your profile to avoid having to deal with setup issues.
A... PITA.... with the generic mill screen in that it's hard / not possible to reset Machine,
Work, and Work offset  values to zero. ( not the case with the lathe screen  though)

So attached the attached Macro will do it.
The macro  will zero out both machine and work coordinates for the X,Y,Z,A  axes and get rid
any G54 Work offsets for the same axes.

Just download the macro, rename it to M1000, and then copy it to the Mach3 directory.
To use you just type M1000 into the MDI line.

To be continued,

RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 19, 2017, 11:02:34 PM
I got the Smid book, so I will look at that.
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 19, 2017, 11:20:50 PM
Great on having the book.

Just note that most of the Gcode "dialect" is Fanuc based, which Mach4 is based on.
Some commands are not supported by Mach3, but, the simple ones are the same.

For the depth that the book and many others cover, few get into 4th axis or rotary work.
You also will not find anything on the G93 mode.

RICH

Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 20, 2017, 08:54:36 AM
Bob,
#7
                                                                                                                               -
So you did some basic G0 ( rapid moves) for the A defined as angular to see the how coding affected rotational movement. The following requires review  before doing  rotary moves at a some feedrate.

Co-ordinated Linear Motion  
------------------------------------------
 - each axis moves at constant speed and all axes move from their starting positions       to their end positions at the same time, also defined as control the axes so that, at         all times, each axis has completed the same fraction of its required motion as the        other axes.
 - IE; any two axes ( x,y or z ) produces motion in a straight line
 - the motion can be done at prevailing or rapid feedrate and may default to the slower     axis feedrate

Controlled Point
----------------------------
Definition is 7-2 and 10-1 in the mill manual.

The controlled point is the actual cutting point of the tool.  So often we envison the axis motion resulting from a given line of gcode and  forget that motion is all about moving a specific "point". The software controller controls just that point relative to the  defined motion.The material removed on the work can be very different than just an imaginery small point machining a piece.

ROTATIONAL RADIUS / CORRECTION DIAMETER
-------------------------------------------------------------------------
The following is from the mill manual and one should be aware of the Mach settings.
Click the Settings ( Alt6) tab to see them located in the upper right corner of the screen.

6.2.2.5 Diameter/Radius correction (page  6-3)
---------------------------------------------------------------------
Rotary axes can have the approximate size of the workpiece defined using the Rotational Diameter control family. This size is used when making blended feedrate calculations for co-ordinated motion including rotational axes. The LED indicates that a non-zero value is defined.

6.2.12 Rotational Diameter control  (page 6-11)
--------------------------------------------------------------------
As described in the Feedrate control family, it is possible to define the approximate size of a rotated workpiece so the rotational axis speed can be correctly included in the blended feedrate. The relevant diameters are entered in the DROs of this family.

The Axis control Family has warning LED(s) to indicated the setting of non-zero values next to the axis DRO in the screen.

Values are not required if rotary movement is not to be coordinated with linear axes. In this case a suitable F word for degrees per minute or degrees per rev should be programmed.

MY COMMENTS
- Available in the mill screen only.
- Above settings apply to Feedrate description #3.

Feed Rate Modes
---------------------------
There are 3 feedrate modes and they are  described  in Section 10.7.27 on page 10-28 of the mill manual. Below are sanitized descriptions.

G93    - inverse time feed rate     - F = 1/Fnumber in  minutes ( if the F number is 2.0,                                                              the move should be completed in half a  Minute)
                                                        - very infrequently used
                                                        - if active, an F word must appear on every line which                                                           has a G1,G2, or G3 motion
                                                       -  an F word on a line that does not have G1, G2, or                                                                G3 is ignored.
                                                       -  does not affect G0 (rapid traverse) motions.
                                                       - It is an error if: inverse time feed rate mode is active                                                          and a line  with G1, G2, or G3 (explicitly or implicitly)
                                                         does not have an F word                          

G94   - units per minute feed rate   -  F= inches / minute, mm / minute, or degrees /                                                                      minute,  determined by length  units are being
                                                               used and which axis  or axes are moving

G95    - units per rev feed rate         -  F= number of inches / mm per degrees per                                                                         spindle revolution, determined by what length
                                                                units are being used and which axis or axes are
                                                                moving.
MY COMMENTS                                                                    
- Note that for the lathe, mode  is usualy G94 and changes to G95 for  threading.  
  
FEEDRATES 1. & 2.
---------------------------------
There are 4 descriptions about how Mach interprets  feedrate described in Section 10.1.6 of the mill manual when in the >>>>>> G94 <<<<<<<<  feedrate mode. Below are sanitized descriptions.

    
1. A or B or C (only one axis)                  - no X,Y,Z movement          F=degrees/min

MY COMMENTS
- Rotation of one axis at max velocity (as defined in motor tuning for the axis) you            simply code: G0  A 360.
  There is no feed rate "F" since by definition of G0 it is a "rapid" move. Additionaly
  the degree value would be positive or negative to define the rotational direction. The
   A value is the number of degrees to rotate.
  
 - To rotate the axis at different feedrates one would need to add the feedrate  and            also use G1.

    G1 A360 F3600
    The F value in degrees per min relates directly to the velocity setting in motor
    tuning. If velocity setting is 3600 and it represents a table rpm of 10 rpm, then  a
    feedrate of 1800 would move the table at 5 rpm.  

  - One should test at different feedrates, record the actual rpm, and make a graph for
    later use.

  - Re read  the  Feed Rate Modes for defintion of G94 and read 10.7.1 and 10.7.2
    in the  manual.

  - Compare the descriptions  of 1. and  2. ( below )

  - An axis becomes irrelavant to this command if it's used as slaved axis for a gantry /
   router type  machine.
  
  - The attached file  pertains to my rotary index. You may want to do similar for your
     lathe.  


2. X, Y, Z  + A, B, C     -  WITHOUT simultaneous rotation -    F =length / minute  ( along
                                                                                                      the linear  path)  

G1 X1 Y1 F100

MY COMMENTS
- actual length of the above linear move depends on current location and what mode
  is active. ie; G90 or G91, the modes and feedrate remain in affect until changed by
  gcode

- Machine Coordinates always show absolute location from zero reference

- feedrate may default to max velocity of the slower axis if coded F number is higher
  for the other axes

NOTE: The next lesson #8 and maybe #9 will address the other two feedrate modes.

             Lesson 7 coding exercise is an attachment to this reply.

To be continued,
RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 21, 2017, 03:00:55 PM
Rich--I am at the phase of uninstalling ver. 066 and putting in ver .062 per your or others recommendations.  I don't remember having to put in a access code etc..  Is there a way to find my code on the current version, so that when I install ver .062  I wont have an access problem??  bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 21, 2017, 05:41:26 PM
By code I assume you are meaning your license file that was sent to you.

Save your xml file ( contains configuration you used ). I also would recommend that you save and keep you license file some place safe. Install ver 062 and if asked also install LazyCam. Copy the xml file and license file to the Mach3 directory. No harm in running the drive test after the installation, as that will that will install the driver. ( been a while and just don't remember exactly)

When you open Mach3 you can check under about that it is registered to you. You can also scan the settings and motor tuning that they are correct.

RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 21, 2017, 06:34:10 PM
Ok, thanks...
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 23, 2017, 08:57:46 PM
Rich,  I think I need to address the following as you suggested:

"- Looks like your rotary is just driven by timing belt so no gears etc and thus basklash should not be concern.

- Would suggest that you add an index so Mach can display the rpm of the rotary. "

Beginner question--what kind of "index" should I buy,  or is it something I should buy... is it a mechanical piece or instrument... since I get stuff off of ebay, what should I avoid... bob


Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 23, 2017, 11:32:01 PM
Bob,
Will provide some info on the index.

Later,
RICH

 
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 23, 2017, 11:34:56 PM
Do you use or have Microsoft Excel?

RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 24, 2017, 12:36:40 AM
Rich yes, I have Excel
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 24, 2017, 12:37:14 AM
 oh and thanks for responding on thanksgiving...wasn't expecting that...bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 24, 2017, 08:21:19 AM
You will find spindel index info in Using Mach3 Turn Manual ( 4.8 page 4-12).
Should also be something in the Mill Manual.

A  CD painted black with ONLY  one ( 1) slot in the disc along with an Optek OPB917B  ( slotted optical switch ), which
needs  a 5v source and 220 Ohm resisotor, will provide everything you need to get a signal to make Mach
so it can read the true RPM.

CNC4pc sells a index pulse board.

The are other optical switches one can use.

I use a Hall Effect  sensor  which generates a pulse each time a magnet ( very small, only one (1) required ) is sensed
by the switch. Easy to mount, especialy in tight places, but is more expensive than the optical switch.

Link to how it works:
https://en.wikipedia.org/wiki/Hall_effect_sensor

You will need to configure the Index in Port & pins.

RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 25, 2017, 08:21:23 AM
Lesson 8 attached.

To be continued,

RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 25, 2017, 11:58:02 AM
I ordered the index pulse card and optical switch.  I will go to the electronics store today for the resistor and hall effect sensors.

Can you give me a short drawing of how the cd and all of this would look in how its attached to the lathe??

I downloaded lesson 8.  Thank you.   bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 25, 2017, 02:41:41 PM
You will find a pic of a index plate mounted on a shaft along with a slotted type optical switch in the
Using Mach3 Turn Manual on page 4.8. Download the manual as sooner or later you will be reading it.
note that there should only be one (1) slot in the disc. The slot width can be larger than what  4.8
describes.

-------------------------------------------------
Pic of a Hall sensor installed in this link:

CNC CONVERSION - 6" ATLAS LATHE
http://www.machsupport.com/forum/index.php/topic,12484.msg82818.html#msg82818
HCIR#28_1.jpg

Shows  a Hall sensor instead of a slotted disc. Components amount to a rare earth magnet which is was super glued to a gear inside the spindle housing.
The sensor ( SMC D-F7NC ) was mounted onto a steel strip and attached to the casing. The sensor actually has two sensors in it and only one was used. The sensor also has an indicating light to show when it is triggering making for easy alignment and visual confirmation other than using the diagnostics. The sensor components and mounting are shown in HCIR#28_1.jpg .

RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 25, 2017, 04:02:41 PM
Rich Hi,  downloaded and printed out mach turn, found what you wanted me to see... will study a bit. All other parts have been ordered...thanks bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 25, 2017, 09:54:58 PM
Rich... in reading Mach Turn pg 4-8, it says..."The limit switches are connected to external logic."  In this case please explain "external logic."   bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 26, 2017, 04:56:04 AM
I don't use switches on any of my machines. For the lessons they are disabled.
BTW, since your working with wood I would suggest you cover the pulley's and index.

RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 26, 2017, 12:40:11 PM
 Rich... are your saying you have no limit switches on your machine for protection...how, how do you keep your machine safe? bob

Once I figure out how to set up the index and pulleys, then I will cover as you suggest .  thanks bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: joeaverage on November 26, 2017, 02:30:09 PM
Hi,
seat belts in a car don't keep you safe...avoiding the accident in the first place is safe.

Sure seatbelts/airbags etc make surviving an accident much more likely but try to avoid the accident.

Craig
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 26, 2017, 05:36:26 PM
 
Quote
are your saying you have no limit switches on your machine for protection

That is correct. I never viewed them as protection as Graig replied.
I do use soft limits on the lathe. Most of my work is one of kind.

For all the lessons, all one needs to do is touch off to the work "rather closely" and make sure the work is positioned so one can run the program without crashing the machine.  In fact just use a straw or something flexible and rather straight and not even have the cutter / toothpick turning.

All the lessons are focused on a few basic gcodes. The "killer" is all the associated commands that influence
the writing of the program. One in particular is understanding feedrate  which is being explained  one at a time
and in depth for understanding as it relates to the 4th axis.  

You can do without an index for a while. Yes it will show the rpm, but, you should still do the spread sheet stuff.
I am using a stepper driven indexing table for all the lessons which does not have an index for rpm readout.
There is learning to be had from spread sheet use.........................I don't know how much we will get into actual lathe use.
It's different animal, and if you don't know how different animals behave, why put them both in the same cage!

RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 26, 2017, 07:18:22 PM
Points well taken... but I was rear ended as a young man while sitting stopped--at a stop light.  I was injured, the settlement paid for the down payment on my home... ********* does come on its own...   I would not recommend this for people in general... bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 28, 2017, 03:16:40 PM
Rich

In Mach 3  we can use the up-down-left-right buttons etc for xyz movements... but is there a button that will move A-axis??? bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 28, 2017, 05:24:09 PM
Bob,
Go into config and assign keybaord keys for the A+- just as you did for the  XYZ +-.
Tab key opens the jog flyout.

RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 29, 2017, 01:38:59 AM
When I went to the hotkeys setup. I clicked A++.  Why call it A++? instead of A+?  Then after selecting A++ I hit the left bracket key. ([).  Then for A-- I hit the right bracket key.  Then I tabbed and got the jog flyout.  If I selected the step jog and hit either of the bracket keys nothing happens!  If I choose the Cont. then the A-axis moves but it appear irrational... if I hit the opposite bracket key it does not return to zero and so forth... it just moves all over the place...so what gives? bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 29, 2017, 01:45:33 AM
ps to Rich.  I turned off my soft limits and promptly crashed and snapped a mill end (1/8th ") because I don't understand the g-code and how mach 3 treats it near well enough yet...so I think I should stick with soft limits and hard switches for the time being while and I practice and learn...this is my responsibility completely, not blaming anyone...I just need brakes on my car for the time being.
Title: Re: A-axis rotary lathe question for Mach 3
Post by: halfmill on November 29, 2017, 01:58:47 AM
My friend asked if Mach 3 could 1. Do Polar Coordinates?  And 2, could Mach 3 also cut a line that moves off center by an angular amount.  So if an right angle from the end that has the smallest angle cuts a slot that is the hypotenuse of that triangle... then can mach 3 if you state the number of degrees of the smallest angle, then will it compute the run of the hypotenuse slot, based on that degree?  I hope this is state clearly enough?
bob
Title: Re: A-axis rotary lathe question for Mach 3
Post by: RICH on November 29, 2017, 05:10:49 AM
Bob,
No problem  on using the soft limits and switches.
You need brakes on the car as surely they will be used when you press on the gas peddle but don't know how to steer the car............... ;)

Quote
Do Polar Coordinates?
Yes, the command description is  in the manual for G15 and G16.
    
RICH
Title: Re: A-axis rotary lathe question for Mach 3
Post by: rcaffin on December 02, 2017, 05:02:34 PM
Yes, Mach3 can do polar coordinates using G16, but while in that mode it can ONLY handle G0 and G1.
Unfortunately the manual promptly shows code using G83, which violates the restriction and DOES NOT WORK - at least with V.062. This is due to how Mach3 handles default values and polar mode. It's a bug in a way, but a very esoteric bug.

I did not understand your question #2 - sorry.

Cheers
Roger