Author Topic: From Manual to CNC - Sherlines  (Read 35493 times)

Offline Hugh Currin

  • Full Member
  • ****
  • Posts: 720
  • Box Elder, SD, USA
    • www.currin.us
Re: From Manual to CNC - Sherlines
« Reply #135 on: April 23, 2020, 01:12:57 AM »
Zee:

That video looks like a lathe part to me. Don't know if the dimensions are coming through, zero set appropriately, inch rather than mm, etc. But the first thing to do is get the scaling set right. Did you configure "steps per inch" in Mach? It sounds like you've not done that yet.

I think the G540 has 10 microsteps built in. i.e. it takes 10 pulses from the computer to move the motor one step. I suspect you have steppers that require 200 steps per revolution. Also, the Sherline lead screw has a pitch of 20 threads/inch (if your machines are inch rather than mm). Motors directly driving the lead screw. So:

10 * 200 * 20 = 40000 pulses/inch

You need to set this in Mach. Since I use LinuxCNC I don't know how to set it in Mach. There's a lot of information if you do a search for "Mach steps per inch". I think you're better off calculating this than measuring machine motion. Then measure machine motion to verify the calculations. Do this before worrying about backlash or other tuning.

But to check this scaling you need to have the motors on the machine. That may be your next step.

"giving this up". What! You've been at it less than what, two months. You've come this far you should keep going.

So far everything looks as expected but you can tell something is wrong. The part is nearly 2" long but the Z axis motor only rotates maybe once as it traverses.
Somewhere there should be a setting for configuring the gear ratio etc that says the motor has to turn so far to move a given distance.

I also recall something about handling backlash and various offsets that I need to look into.

I will admit, I'm still vacillating between giving this up (it's way more work/learning than I had counted on) and plowing on.
Hugh

Offline zeeprogrammer

  • Full Member
  • *****
  • Posts: 6811
  • West Chester, PA, USA
Re: From Manual to CNC - Sherlines
« Reply #136 on: April 24, 2020, 10:33:29 PM »
But to check this scaling you need to have the motors on the machine. That may be your next step.

Thanks Hugh. You read my mind.

Found an XML file to configure Mach3 for the Sherline Lathe. That improved things regarding the motors but the step and direction pins were reversed for some reason.
Although improved, I know it's not right and, as Hugh mentioned, it's time to tune the motors on the machine itself.

1st Pic: Shows the 'stock' lathe and the various pieces to convert to CNC.
2nd Pic: Shows the lathe disassembled.
3rd Pic: Show the lathe assembled with stepper motors mounted.

I had to drill two holes in the end of the lathe bed to mount the motor. The cross-slide had already been drilled/tapped for its motor by Sherline.
I noted that the X and Y axes on the mill were also already drilled/tapped but the Z is not.

To drill the two holes was problematic. I ended up mounting the bed across the carriage of my 'big' lathe. With a bit of shimming and clamping I was able to drill the two holes.
Sorry, no pic. (It was a very ugly setup anyway...but it did the job.)

Soon I'll wire up the motors and play with the Mach3 jog functions.

Having a little trouble with CamBam to sketch a profile for a bowling pin.
I need a spline but every time I try I can't get the control points right. If I enter say 3 points, I'll see a dozen or more in the collection list (where you enter the exact coordinates).
Nor have I been able to import a DXF drawing and work with that. I haven't figured out how to delete everything except the profile I want.
Is there a 'trim' function in CamBam where you can lop off bits of drawing?

Instead of the bowling pin I'll try the spigot first. That's after I tune the motors, cut air, cry in my pillow, and pray to the machining gods.

You may notice the handwheels on the motor. Oddly enough, one slipped right on but the other is a struggle. A little reaming should do the trick.
Not that they are strictly needed but I think may be useful.

One of my better days for which I'm celebrating with a 'Stinking Hoppie'.
(Only the reason for celebrating changes...the Stinking Hoppie is a periodic occurrence even if the only reason to celebrate is "It's 5 o'clock!.)
Carl (aka Zee) Will sometimes respond to 'hey' but never 'hey you'.
"To work. To work."
Zee-Another Thread Trasher.

Offline kvom

  • Full Member
  • *****
  • Posts: 2649
Re: From Manual to CNC - Sherlines
« Reply #137 on: April 25, 2020, 01:52:49 PM »
Quote
Is there a 'trim' function in CamBam where you can lop off bits of drawing?

Select the bits you don't want and hit delete.

To trim intersecting lines select the lines, invoke "break on intersections" ctl-B, then delete the unwanted parts.

It's not necessary to delete unused parts as long as the parts you want  are correct.  Only items selected in a Mop are used.

Offline zeeprogrammer

  • Full Member
  • *****
  • Posts: 6811
  • West Chester, PA, USA
Re: From Manual to CNC - Sherlines
« Reply #138 on: April 25, 2020, 03:41:52 PM »
Thanks Kirk.

Carl (aka Zee) Will sometimes respond to 'hey' but never 'hey you'.
"To work. To work."
Zee-Another Thread Trasher.

Offline zeeprogrammer

  • Full Member
  • *****
  • Posts: 6811
  • West Chester, PA, USA
Re: From Manual to CNC - Sherlines
« Reply #139 on: April 25, 2020, 04:51:58 PM »
 :cartwheel:

Got the motors wired up.
Did a little jogging to check things out then ran my spigot demo program.

So I've got a system 'working'. Now to tune the motors, double-check various settings, and do some testing.

<a href="https://www.youtube.com/watch?v=uNJROUiHkvg" target="_blank">http://www.youtube.com/watch?v=uNJROUiHkvg</a>

[EDIT] The hand wheels will be removed. The Z axis one is barely on which is why it's wobbling.
Carl (aka Zee) Will sometimes respond to 'hey' but never 'hey you'.
"To work. To work."
Zee-Another Thread Trasher.

Offline Hugh Currin

  • Full Member
  • ****
  • Posts: 720
  • Box Elder, SD, USA
    • www.currin.us
Re: From Manual to CNC - Sherlines
« Reply #140 on: April 26, 2020, 06:29:21 PM »
Can you do splines? I use a CAD system (linux based VariCAD) to draw the part in 2D, import DXF files into CamBam, then generate G-code for LinuxCNC. I tried this last night with a spline. The CAD system was able to generate a spline. That spline imported into CamBam well and was imported as a spline. Toolpaths were generated with CamBam OK, but the G-code output, using any of the post processors in CamBam broke the spline into arcs and lines. In a brief look I didn't see any post processor scheme or variables to output G-code for a spline. May not be the best forum to ask but I know there are smart people out there.

I was encouraged to find that LinuxCNC now recognizes G-code for splines:
  G5    = Cubic Spline
  G5.1 = Quadratic Spline
  G5.2 = NURBS
So I think the problem is in getting G-code into CamBam and the post processor. Anyone out there able to cut splines?

Zee: I don't use CamBam for any drawing. I think a dedicated CAD system is better than CamBam. Thus I suggest you do drawings in a CAD then import into CamBam. I have had no trouble importing DXF into CamBam.

All the extraneous elements can be ignored in CamBam, just select the profile you want to cut. I have the best luck connection individual drawing elements into one polyline in CamBam before generating tool paths. To avoid confusion I generally delete unneeded drawing elements in my CAD before importing to CamBam.

Good progress.

Having a little trouble with CamBam to sketch a profile for a bowling pin.
I need a spline but every time I try I can't get the control points right. If I enter say 3 points, I'll see a dozen or more in the collection list (where you enter the exact coordinates).
Nor have I been able to import a DXF drawing and work with that. I haven't figured out how to delete everything except the profile I want.
Hugh

Offline zeeprogrammer

  • Full Member
  • *****
  • Posts: 6811
  • West Chester, PA, USA
Re: From Manual to CNC - Sherlines
« Reply #141 on: April 26, 2020, 06:45:40 PM »
Thanks Hugh. Yes, I can (I think can) do splines.

I used CubifyDesign to CAD up a bowling ball which included a spline.
I then created a DXF and opened that in CamBam.
In CamBam (with Kirk's help on breaking intersections) I removed everything except the profile I wanted.
Then I created a rouging tool path and a finishing tool path.
Attached is a snap shot from CamBam. It shows the roughing tool path.

There are at least two issues I'm trying to figure out.
1) At the bottom of the bowling pin, left side, there's a small curve at the left of the spline. I suspect the cutter will rub against the bottom of the pin.
2) At the very top, at both ends, are what appears to be tool paths. I haven't investigated fully. It's possible I have remnants of the drawing, the profile isn't located properly to the Z axis, or I did something else wrong. I'll be trying it again. It may have something to do with when I transformed (moved) the drawing to line up with the axes.

In the meantime I'm working on a couple of other issues.
1) While my work bench is long enough for the manual machines, the machines don't fit if the stepper motors are attached. I have to do some re-arranging.
2) I realized the place where I was going to mount the power supplies, drivers, etc., while safe enough from swarf flying, would be subject to oil flying off the chuck/part. I'm considering mounting the hardware on a board and putting the board under the bench. Not sure how to do that yet.

This won't be the first part I'll attempt to cut under CNC. I'll probably use that spigot I created earlier.
But the bowling pin is my measure of success to complete this thread.

Thanks again everyone.
Carl (aka Zee) Will sometimes respond to 'hey' but never 'hey you'.
"To work. To work."
Zee-Another Thread Trasher.

Offline Hugh Currin

  • Full Member
  • ****
  • Posts: 720
  • Box Elder, SD, USA
    • www.currin.us
Re: From Manual to CNC - Sherlines
« Reply #142 on: April 26, 2020, 08:23:39 PM »
Zee:

I was able to produce workable G-code which matched the spline well. However, CamBam broke the spline into a series of lines and arcs. Open the G-code file in a text editor. If there are only G0, G1, G2 & G3 commands yours is also a series of lines and arcs. Check and let me know.

Thanks.

Thanks Hugh. Yes, I can (I think can) do splines.
Hugh

Offline zeeprogrammer

  • Full Member
  • *****
  • Posts: 6811
  • West Chester, PA, USA
Re: From Manual to CNC - Sherlines
« Reply #143 on: April 26, 2020, 09:10:59 PM »
I was able to produce workable G-code which matched the spline well. However, CamBam broke the spline into a series of lines and arcs. Open the G-code file in a text editor. If there are only G0, G1, G2 & G3 commands yours is also a series of lines and arcs. Check and let me know.
Thanks Hugh. Yes, I can (I think can) do splines.

The g-code output only shows G0, G1, G2, and G3. So just lines and arcs.
My comment about doing splines was in CAD.

Some progress in CamBam. It did turn out there were a couple remnants of the drawing that needed to be deleted.
However, I'm still left with 2 (so far identified) issues...

1) I can't seem to place the profile at the exact location I need. Perhaps it's related to 'snap-to-grid'. (1st attachment).
2) More troublesome is when I looked at CamBam's point list, all the dimensions appear twice as large as the dimensions in the CAD drawing. [EDIT: Appears to be because I had scaled the drawing in CAD by 2X. If I don't do that then the dimensions appear (more) correct).

P.S. It was indeed the 'snap-to-grid'. But I'm still wondering how I can move (transform) the profile to an exact position rather than eye-balling it. (2nd attachment).
It's still off. I see two X positions, -.0302 and -.0305. I wouldn't think I'd see any negative position and I don't know why those two differ by 3thou.
I suspect some kind of rounding error in the calculations used to create the g-code.

Much more yet to learn. I don't understand how the g-code position relate to the machine. It seems to me, wherever I place 0, the machine is going to move to the right.
That's fine if 0 is at the far left but that doesn't seem right to me. I was thinking that once I have faced the stock, I would be touching (and zeroing) on the face.
« Last Edit: April 26, 2020, 09:28:53 PM by zeeprogrammer »
Carl (aka Zee) Will sometimes respond to 'hey' but never 'hey you'.
"To work. To work."
Zee-Another Thread Trasher.

Offline kvom

  • Full Member
  • *****
  • Posts: 2649
Re: From Manual to CNC - Sherlines
« Reply #144 on: April 26, 2020, 10:10:10 PM »
For positioning I suggest you look at the edit/transform/align function.  It will move all of the selected item according to you choices in the box.  For a lathe profile you want X-Right Y-top.  This puts everything left of the Y axis and below the X axis.

I use the alignment tool on essentially every part. 

Offline zeeprogrammer

  • Full Member
  • *****
  • Posts: 6811
  • West Chester, PA, USA
Re: From Manual to CNC - Sherlines
« Reply #145 on: April 26, 2020, 10:21:42 PM »
For positioning I suggest you look at the edit/transform/align function.  It will move all of the selected item according to you choices in the box.  For a lathe profile you want X-Right Y-top.  This puts everything left of the Y axis and below the X axis.

I use the alignment tool on essentially every part.

Thanks Kirk. That seemed to do the trick (at least for getting the profile in the right position).

I understand the 'X to the right' and 'Y to the top'.
I don't understand your comment about 'everything left of the Y axis and below the X axis'. I see the profile to the RIGHT of the Y axis and below the X axis.
See attachment. Is that what you expect? (This just shows the roughing tool paths.)

BTW After inserting the profile, I select 'Machining->Lathe' and then in the parameter block, I select the Work Plane as XZ.
Carl (aka Zee) Will sometimes respond to 'hey' but never 'hey you'.
"To work. To work."
Zee-Another Thread Trasher.

Offline kvom

  • Full Member
  • *****
  • Posts: 2649
Re: From Manual to CNC - Sherlines
« Reply #146 on: April 26, 2020, 10:50:07 PM »
Align to the other side of Y axis.

Offline zeeprogrammer

  • Full Member
  • *****
  • Posts: 6811
  • West Chester, PA, USA
Re: From Manual to CNC - Sherlines
« Reply #147 on: April 26, 2020, 11:42:14 PM »
Align to the other side of Y axis.

I don't understand.

Attached is an example from CamBam documentation. Hopefully it's readable.
I don't see a difference between what they did and what I did.
Carl (aka Zee) Will sometimes respond to 'hey' but never 'hey you'.
"To work. To work."
Zee-Another Thread Trasher.

Offline kvom

  • Full Member
  • *****
  • Posts: 2649
Re: From Manual to CNC - Sherlines
« Reply #148 on: April 26, 2020, 11:56:13 PM »
Normal lathe practice is to set Z0 to the end of stock at the tailstock end.  So cutting is always in the -Z direction and Z g-code coords are all negative.  But if this works for you have at it.  All your setup does is displace all the Z coords.  But you'll find it easier to actually set Z0 by touching the free end of the stock.

Offline zeeprogrammer

  • Full Member
  • *****
  • Posts: 6811
  • West Chester, PA, USA
Re: From Manual to CNC - Sherlines
« Reply #149 on: April 27, 2020, 12:27:36 AM »
Normal lathe practice is to set Z0 to the end of stock at the tailstock end.  So cutting is always in the -Z direction and Z g-code coords are all negative.  But if this works for you have at it.  All your setup does is displace all the Z coords.  But you'll find it easier to actually set Z0 by touching the free end of the stock.

Thanks! Touching off the stock was what I was thinking I needed to do but the g-code didn't make sense. Started a post about it but I was too confused to make the text understandable.

Thanks again!
Carl (aka Zee) Will sometimes respond to 'hey' but never 'hey you'.
"To work. To work."
Zee-Another Thread Trasher.

 

SimplePortal 2.3.5 © 2008-2012, SimplePortal