Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: BR549 on October 12, 2012, 07:47:43 PM

Title: Any new WIZARD ideas to work on ???
Post by: BR549 on October 12, 2012, 07:47:43 PM
Getting board waiting on parts (;-)

(;-) TP
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on October 13, 2012, 11:02:51 PM
NONE ?

(;-) TP
Title: Re: Any new WIZARD ideas to work on ???
Post by: Chaoticone on October 14, 2012, 12:16:52 AM
I need a Cleaning Wizard.  :)

Brett
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on October 14, 2012, 01:54:54 AM
I don't do WINdos (;-)

(;-) TP
Title: Re: Any new WIZARD ideas to work on ???
Post by: Ya-Nvr-No on October 14, 2012, 06:47:51 AM
How about a wizard that will write my Macros ;->
Title: Re: Any new WIZARD ideas to work on ???
Post by: Dan13 on October 14, 2012, 07:33:27 AM
Some time ago I was playing with the idea of cutting squares and hex shapes on a lathe using a servo spindle and a synch move of all it with X and Z. I wrote a parametric Gcode but never got it perfect - a square was coming out with rounded corners and was twisted along the Z. Was not able to figure what was wrong with the code. Would you be interested contemplating this?

Dan
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on October 14, 2012, 10:44:22 AM
It is going to take a "VERY"fast XZ to do shapes on the lathe. I have seen it done and you just about can't see it happen(FAST).

Post what you have and we will see what comes of it.


A macro Wizard ????   Now that would be a new one (;-) Conversational Macros HUM. 

(;-) TP


Title: Re: Any new WIZARD ideas to work on ???
Post by: Dan13 on October 14, 2012, 11:41:40 AM
Hi Terry,

I didn't really care it being slow. Sometimes it's better leaving it for 15 minutes to do its job than switching for a second operation on the mill.

Here is what I had:

%
G0 G49 G40  G17 G80 G50 G90

(A axis is in revolution mode)
(Program in Diameter mode)

#1 = 6   (number of sides)
#2 = 10  (distance across flats)
#3 = 120 (feed: mm/min)
#4 = 0.1 (Z feed per revolution)
#9 = 10 (length along Z)
#17 = 10 (resolution - number of segments in half flat size)

#5 =  [360/#1] (root angle)
#6 =  [2*[0.5*#2]/cos[0.5*#5]] (distance across corners)
#7 =  [[0.5*#2]*tan[0.5*#5]]  (half side length)
#10 = [[0.5*#5]/360] (single segment revolution amount of A axis)
#11 = [#10/#17] (single rotation fraction of A)
#16 = #11
#12 = [[-1*[#4/[#1*2]]]/#17] (Z advance per segment)
#13 = #12

G0 X[#2+1] A0
G0 Z1
G1 X#2 Z.1 F#3

#14 = [-1*[#4/#1]] (Z advance per main subroutine execution)

#15 = FIX[#9/#14] (Number of subroutine executions required - 'L')

M98 P100 L#15

M30

O100
M98 P101 L#17
#16 = #11
M98 P102 L#17
M99

O101
G1 X[2*[0.5*#2]/cos[#16*360]] A#16 Z#13
#16 = [#16 + #11]
#13 = [#13 + #12]
M99

O102
G1 X[2*[0.5*#2]/cos[0.5*#5-#16*360]] A#16 Z#13
#16 = [#16 + #11]
#13 = [#13 + #12]
M99
%

See if you can read it. It has been sometime since I wrote it and it will take me sometime to understand what I meant myself ;)

Dan
Title: Re: Any new WIZARD ideas to work on ???
Post by: Chaoticone on October 14, 2012, 12:51:40 PM
I don't do WINdos (;-)

(;-) TP

 ;D
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on October 14, 2012, 02:41:56 PM
Dan are you attempting to turn ALL sides per rev or Do a single flat to completion then index(Sync) to the next flat.

Cleaned up a few things and got it running BUT with MACH3 you are never really sure about the toolpath display being correct(;-).

(;-) TP
Title: Re: Any new WIZARD ideas to work on ???
Post by: budman68 on October 14, 2012, 06:21:31 PM
Terry,

I have a wizard idea for you. I'd to make a button to toggle 4 axes and..........oh wait, that didn't work,  :D

Never-mind!  ;D

Just joshin woith ya-
Dave
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on October 14, 2012, 06:52:26 PM
YA Never know, what did NOT work yesterday COULD work tommorrow.

(;-) TP
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on October 14, 2012, 10:55:58 PM
Dan I can make the process work BUT I don't get your math(;-(

(;-) TP
Title: Re: Any new WIZARD ideas to work on ???
Post by: Dan13 on October 15, 2012, 04:18:30 AM
Terry,

The code cuts all sides per revolution - spindles rotates continuously in one direction only. I will have a look later and try to refresh my memory of the math I did.

I wouldn't trust the toolpath display either. I was experimenting with a delrin bar and it was cutting the shape, but the corners were getting rounded and it was getting twisted along Z.

Dan
Title: Re: Any new WIZARD ideas to work on ???
Post by: Dan13 on October 15, 2012, 09:51:59 AM
Hi Terry,

Took a look at the code. Since the X axis has to change speed as the A rotates (since tangential speed changes as you change distance from centre) I broke the X axis moves into fractions and used a sub to repeat it. Please see attached screenshot, I hope it will clarify what I meant. In the picture, a, is my X variable and it changes with the angle. I call in the code the ABsegment as single segment and this is then broken into smaller segments depending on the resolution.

I have also made a couple of changes to the code so it will match the sketch and be more readable. Here is the revised one:

%
G0 G49 G40  G17 G80 G50 G90

(A axis is in revolution mode)
(Program in Diameter mode)

#1 = 6   (number of sides)
#2 = 10  (distance across flats)
#3 = 120 (feed: mm/min)
#4 = 0.1 (Z feed per revolution)
#9 = 10 (length along Z)
#17 = 10 (resolution - number of segments in half flat size)

#5 =  [360/#1] (root angle)
#6 =  [2*[0.5*#2]/cos[0.5*#5]] (distance across corners)
; Not used #7 =  [[0.5*#2]*tan[0.5*#5]]  (half side length)
#10 = [0.5*#5] (single segment revolution angle of A axis)
#11 = [#10/#17] (single rotation fraction angle of A)
#16 = #11
#12 = [[-1*[#4/[#1*2]]]/#17] (Z advance per segment)
#13 = #12

G0 X[#2+1] A0
G0 Z1
G1 X#2 Z.1 F#3

#14 = [-1*[#4/#1]] (Z advance per main subroutine execution)

#15 = FIX[#9/#14] (Number of subroutine executions required - 'L')

M98 P100 L#15

M30

O100
M98 P101 L#17
#16 = #11
M98 P102 L#17
M99

O101
G1 X[2*[0.5*#2]/cos[#16]] A#16/360 Z#13 (A converted fromdegrees to revolutions)
#16 = [#16 + #11]
#13 = [#13 + #12]
M99

O102
G1 X[2*[0.5*#2]/cos[0.5*#5-#16]] A#16/360 Z#13  (A converted fromdegrees to revolutions)
#16 = [#16 + #11]
#13 = [#13 + #12]
M99
%   
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on October 15, 2012, 11:14:59 AM
OK you are thinking from the inside out I was thinking from the outside in.

I picture you turning the OD to fit the shape then cutting the flats like a thread moving the Xin and out as an arc to cut the flats. Starting from the outside then working your way in to the final position.

Example:
http://www.youtube.com/watch?v=uLoavsbtD2k

(;-) TP
Title: Re: Any new WIZARD ideas to work on ???
Post by: Dan13 on October 15, 2012, 02:16:51 PM
No. I think we are on the same page. My code works exactly like in this video. In the picture above, the square rotates counterclockwise so at first I start from point A and go outwards towards point B and as I go past point B, I start to move inwards. This is why I have to subs in the code - O101 for the first and O102 for the second.

What's interesting is that in the end of the video they show the white plastic parts and their square looks pretty similar to mine - with corners rounded and flats not being flat but rather a bit concave in the middle (see attached photo. Not the best quality, but you can see what I mean). Only difference is that mine was twisted in the Z in addition to this (again see the picture). Then what's interesting is that on the next photo they show perfect polygons in metal which don't look like have been made on this machine.

Dan
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on October 15, 2012, 02:28:48 PM
When I run your code it does NOT rotate the part .

I agree that the picture they show of the steel part did NOT come from that machine(;-) Doing it the way it showed in the example. MAYBE if they use a fine tip and MANY small moves.

NOW IF mach3 could do arcs in the A axis this would be simple.

(;-) TP
Title: Re: Any new WIZARD ideas to work on ???
Post by: Dan13 on October 15, 2012, 02:53:32 PM
Hmm... strange, you are right it doesn't rotate the part and actually does some odd moves here too. Could be that I had a different version of the code on the machine itself, may be I modified it there though I can't see something wrong with this one. Will check later if I have a different version there as it did work and produce the above.

Yes, seems like arcs would make it a lot easier. A bit hard to visualise, but it makes sense.

Dan
Title: Re: Any new WIZARD ideas to work on ???
Post by: cncalex on October 15, 2012, 03:58:34 PM
Hi Dan,
when I look at your workpiece it looks to me as your code does more or less what it should do, but your tool has not the right shape.
See pict.
just a thought

Alex
Title: Re: Any new WIZARD ideas to work on ???
Post by: Dan13 on October 15, 2012, 03:59:21 PM
OK. Found the working version. Appears I made some modifications to the code at the machine itself. This one moves the A axis:

G0 G40  G17 G80 G50 G90

(A axis is in revolution mode)
(Program in Diameter mode)

#1 = 4  (number of sides)
#2 = 13 (distance across flats)
#3 = 300 (feed: mm/min)
#4 = 0.2 (Z feed per revolution)
#9 = 2 (length along Z)
#17 = 50 (resolution - number of segments in half flat size)

#5 =  [360/#1] (root angle)
#6 =  [2*[0.5*#2]/cos[0.5*#5]] (distance across corners)
#7 =  [[0.5*#2]*tan[0.5*#5]]  (half side length)
#10 = [[0.5*#5]/360] (single segment revolution amount of A axis)
#11 = [#10/#17] (single rotation fraction of A)
#16 = 0
#12 = [[-1*[#4/[#1*2]]]/#17] (Z advance per segment)
#13 = #12

G0 X[#2+1] A0
G0 Z1
G1 X#2 Z.1 F#3

#14 = [-1*[#4/#1]] (Z advance per main subroutine execution)

#15 = FIX[#9/#14] (Number of subroutine executions required - 'L')

#18 = #11

M98 P100 L100;#15

G0 X[#6+3]
G0 Z1 A0
M30

O100

M98 P101 L#17
#16 = 0
#18 = [#18 + [0.5*#5/360]]

M98 P102 L#17
#16 = 0
M99

O101
G1 X[2*[0.5*#2]/cos[#16*360]] A#18 Z#13
#16 = [#16 + #11]
#13 = [#13 + #12]
#18 = [#18 + #11]
M99

O102
G1 X[2*[0.5*#2]/cos[0.5*#5-#16*360]] A#18 Z#13
#16 = [#16 + #11]
#13 = [#13 + #12]
#18 = [#18 + #11]
M99
%

Just tested it on a piece of delrin and the concept works - see attached picture. Flats seem perfectly straight with resolution variable set to 50 and corners are sharp. Only thing is it's still twisted along Z. And the code has some problems with the variables as it cut the octagon in the pic with the flats number set to 4. If I set it to 3 it cuts two flats and if 5 it appears to cut 10 flats. But at least it shows that the concept works. Just requires some more thought and refinement. See if you find what's the problem.

Dan
Title: Re: Any new WIZARD ideas to work on ???
Post by: Dan13 on October 15, 2012, 04:03:54 PM
Hi Alex,

You are right the tool has to have a larger clearance angle as the number of flats gets smaller.

Dan
Title: Re: Any new WIZARD ideas to work on ???
Post by: cncalex on October 15, 2012, 04:05:21 PM
 :)
Alex
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on October 15, 2012, 05:41:25 PM
IF you set up mill to see the code wrap A around Z. You can see the warp that it produces.

BUT I still don't see it rotating A all the way around from watching the DROs.

I will give this some more study to see if there is a different way.

I think INC may be a bit easier to deal with.

(;-) TP
Title: Re: Any new WIZARD ideas to work on ???
Post by: Dan13 on October 16, 2012, 02:16:54 AM
Hi Terry,

Ah... this was a good idea. I didn't think of changing the rotation axis to Z. Now I see the toolpath more nicely. And for some reason I am seeing it twisted in the Z instead of getting continuously lower. This is probably why the part gets twisted too.

I am using my A axis in revolution mode, as stated in the Gcode heading, not in degrees mode, so 1 in the A DRO means one revolution of the axis. This is why you think it's not rotating all the way around.

Dan
Title: Re: Any new WIZARD ideas to work on ???
Post by: Dan13 on October 16, 2012, 03:21:24 AM
Found the problem of the part being twisted - had the wrong setting for the A axis steps in Mach3 tuning. See a new one - now perfect. Only problem remaining now is the number of sides cut being wrong. This octagon is cut with the number of sides to 4. I can't find the error in the code, it looks correct to me.

Now regarding the ability to do arcs on a rotary axis, I have a workaround for this. I tried to asign the Y axis to the rotary - works fine only problem is I can't get my head around to figure how to program the arcs. Do you have any idea?

Dan
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on October 16, 2012, 03:27:24 PM
OK NOW the display makes since IF 1 unit is 1 rev.  YA had me there.(;-)

Y arcs program the same BUT you have to do the math to convert the values  back and for from linear to polar.   Calculate the diam of the part then convert the cut into linear disatnce for the Y to travel. It is a battle to keep it all straight in your head at least MINE(;-)

Some Machines can take the offset from the A center line and do the calcs on the fly for you so you would program the Rotaries the same as the linear. With mach3 you have to do the arcs as micro segments of straight lines to form the arc. 

Looks like you have the loops going x2 to get double the flats (;-).

I was thinking to do the flat segments as a series of threading cuts with e flats code intertwinded so small machines would talke multi cuts like a series of threading passes down to the finish size.

IF you change the #flats to 2 do you get 4 ?

(;-) TP



Title: Re: Any new WIZARD ideas to work on ???
Post by: Dan13 on October 17, 2012, 01:56:46 PM
Yes, I was meaning the math behind the arc programming. Just can't figure it.

Afraid I still don't understand what you mean with the threading like flats cutting.

Very busty now. Will check what happens if I enter 2 flats in a couple of days.

Dan
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on October 19, 2012, 12:10:45 AM
Dan here is what I meant for cutting the flats like a thread.  The Program is just a demo I cooked up to test the idea. THe math is NOT DONE for cutting the flats as an arc(working on that part). THere is just a simple cut where the flats arc CODE will be.

It creates the proper number of flats as requested.  AND yes SOME of the math is fixed for now more Variables to be added later.

It runs like a thread cutting the flats along the way AND then come back and cuts the flat deeper and so on until you get to the end value of the flat.

Just a thought, (;-) TP
Title: Re: Any new WIZARD ideas to work on ???
Post by: Dan13 on October 19, 2012, 02:28:29 AM
Ah.. I see now what you mean. Cutting the shape in multiple passes. This is more powerful than my approach. And you code looks much simpler too ;) Not that I figured the math though.

Dan
Title: Re: Any new WIZARD ideas to work on ???
Post by: Dan13 on October 19, 2012, 02:47:19 AM
By the way. Changed my code to work in degrees mode so that toolpath would display more meaningfully. See attached. It didn't occur to me previously, but this way the debugging is easier. Interestingly the toolpath produced by my code consists of almost straight lines, while yours of curved lines. So based on the fact that mine did produce flats somehow, I would assume that there is a problem with yours  ???.

Dan
Title: Re: Any new WIZARD ideas to work on ???
Post by: Ya-Nvr-No on October 19, 2012, 07:06:01 AM
Plus it stays in absolute mode G90, I've never been a fan of G91
That's cool code Dan
Title: Re: Any new WIZARD ideas to work on ???
Post by: Dan13 on October 19, 2012, 08:01:51 AM
Thanks Ya-Nvr-No.

Terry, thanks to your idea of utilizing the toolpath display I was able to debug the code and now have a perfect working version. It works very well. With my approach the minimal number of flats is 3. See attached final code. I have also cleaned it up a bit and added some more comments for readability. Works very well here and I am pleased.

Here is a short video showing it in action:

http://www.youtube.com/watch?v=DajrTlI8IWA&feature=youtu.be

Took less than a minute to cut this.

Dan
Title: Re: Any new WIZARD ideas to work on ???
Post by: Ya-Nvr-No on October 19, 2012, 08:23:01 AM
that's cool Dan but what a strange noise it produces.
Is that a PVC Plastic Rod?
Title: Re: Any new WIZARD ideas to work on ???
Post by: Dan13 on October 19, 2012, 08:31:19 AM
What noise do you mean? Two sounds are there - one of the X stepper and the other of the A axis which has very high acceleration and hence you here it as knocks. Material is delrin.

Dan
Title: Re: Any new WIZARD ideas to work on ???
Post by: Chaoticone on October 19, 2012, 09:46:16 AM
Looks Good, makes my ball screws hurt though.  ;D
 
Brett
Title: Re: Any new WIZARD ideas to work on ???
Post by: Dan13 on October 19, 2012, 09:52:43 AM
;D

Dan
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on October 19, 2012, 11:25:58 AM
You did good DAN, What I am working on has a couple of good points. You do not have to know what the flats distance is Just what the shaft diam is and the # of flats.

A simple set of  Question boxes for the inputs will work fine.

THE ugly part of it is the MATH to swing an arc into and out of a cirlce (;-) Still working on that part.

GUYS G91 can be your friend OR your enemy.

I have an old hit and miss engine here that sounds a LOT like that.


(;-) TP
Title: Re: Any new WIZARD ideas to work on ???
Post by: Dan13 on October 19, 2012, 11:48:14 AM
Thanks Terry. Reason I did it with the distance across flats is that usually that would be the known parameter as dictated by standard wrench sizes. I can see though where the shaft diameter would be rather convenient. Anyway not a problem to derive one from another. What I do like in your approach is, as I mentioned, the option to do this in multiple passes.

Yes, the math with arcs is going to be painful. Interesting how it will work out.

Dan
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on October 19, 2012, 12:33:21 PM
Dan I redid the front end of YOUR code to solve for the Flat lengths based on Diameter of shaft and #of flats.

D  =  Diameter of shaft
C = angle of flats (360/#flats)
R= (D/2)  Convert to Radius

Chord length = ((2*R) * Sin(C/2))

NOW you can input the major functions via front end macro to program the Polygon function.

Shaft Diameter
#flats
Flat length

It does the same thing as you did only makes it a touch easier for the OP to program on the fly.

Just a thought, (;-) TP
Title: Re: Any new WIZARD ideas to work on ???
Post by: Dan13 on October 19, 2012, 12:54:24 PM
Terry, I think I confused you again. I was not using the flat length (chord length), but rather the distance across the flats - what you actually measure with a caliper across flats. You can call it the inscribed circle diameter otherwise.

Dan
Title: Re: Any new WIZARD ideas to work on ???
Post by: Dan13 on October 19, 2012, 01:00:12 PM
Wonder if we can make this as the next stage:

http://www.youtube.com/watch?v=FpP7iTKuWpw

:o

Dan
Title: Re: Any new WIZARD ideas to work on ???
Post by: budman68 on October 19, 2012, 01:28:58 PM
Amazing work you fellas are doing here, thanks for sharing-

Dave
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on October 19, 2012, 02:01:41 PM
OK Makes sense. What you are describing would be the Root Radius of the flats?  Hard to measure diam across a 3 sided object (;-)

One easy way at this point to make it multpass would be to scale the routine oversize on the first pass then reduce the scale for each pass down to the root diam of the flat.

We do this with cam grinding to make it simple as the math there is horribly complicated.

(;-) TP
Title: Re: Any new WIZARD ideas to work on ???
Post by: Overloaded on October 19, 2012, 03:10:42 PM
This is VERY neat and interesting to follow. :)

I have questions though.
Would this have any practical application, other than just in certain plastics ?
With a neutral top rake tool, a 4 sided shape would transition from +45 to a -45 top rake angle. 8 sided, 22.5 degree. The more flats, the better.
You can almost see the effect of this in the Delrin oct. sample....(and BTW, the little metal hex sample looks surprisingly well. ;D
Russ
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on October 19, 2012, 03:43:35 PM
Practical Application ??  Probably not as you see the rake angles are extreme and the Power needed to  rotate the shaft slowly and cut is HIGH  and not readily available on a DIY type lathe. ALSO most lathes do NOT have an encoder to run it as a 4th or follow mode.

IT is just NEAT to think about.

(;-) TP

Title: Re: Any new WIZARD ideas to work on ???
Post by: Overloaded on October 19, 2012, 03:47:17 PM
Thanks T.

I agree !  A very cool exercise. :)

You and Dan do good work.

In envy,
Russ
 :)
Title: Re: Any new WIZARD ideas to work on ???
Post by: Dan13 on October 19, 2012, 03:49:43 PM
Terry, yes, that would be the root radius. Sorry for the confusion, but always had the hexagon in mind while doing this and assumed it was obvious. I will have to give it a bit more thought to make it multipass. Don't want it to cut air at any point.

Russ, I agree, squares may not be practical, but I believe hexagons and above should be doable in metals provided the rake angle is correct. We shall see this. Now I really think eccentrics should be next... what do you say, Terry?

Hmm... didn't notice the metal hex sneaked in - obviously they have some better ways to make hex shapes out there... ;D

Dan
Title: Re: Any new WIZARD ideas to work on ???
Post by: Ya-Nvr-No on October 19, 2012, 04:01:38 PM
So are Cams lobes next?
Title: Re: Any new WIZARD ideas to work on ???
Post by: Overloaded on October 19, 2012, 04:25:35 PM

  Now I really think eccentrics should be next... 

Hmm... didn't notice the metal hex sneaked in - obviously they have some better ways to make hex shapes out there... ;D

Dan
Hi Dan,
 Cams and eccentrics would do OK ou to a point where the offset becomes so great as to require the other axis, ie. the tool moving up and down to maintain tangency to the surface.
Graham posetd some cool references earlier, will try to find them.
Thanks again for a great topic,
Russ
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on October 19, 2012, 04:44:27 PM
Dan a thought about multipass is to make the Root radius a variable starting with it being the same as the MAJOR diameter then do each complete pass based on that depth then lower the Radius value  a step and repeat. That is basically how I had planned to do it. It ADDS a lot more LOOPS BUT it should not cut air either.

CAM lobe as in engine camshafts are a beast math wise. You have a nonconcentric lobe and a ROUND gringing wheel that wears as it goes.  The point of contact to calculate depth of cut is a huge variable based on lobe rotation vs wheel diam. Basically is is a forever changing variable that you have to account for.

The big boys do it differently as they do it as a Live axis that Follows the contour mathematicaly like a C axis on the lathe as a live axis GEARED to the rotation of the spindle. EMC2 can do this but not mach3 as of yet.

I have the math here BUT not the brains to make it work ON THE FLY in mach3,  YET.

Another tuffy is a crank grinder easier than a LOBEas the shape is consistant but the variable is that the cut axis dips below the Zero point of the axis and the mat has has to invert.  

I cheat and use a special POST in sheetcam to do the path then use the Scale trick to cut the lobes also each lobe path loop  alternates with another to help keep heat out of the lobe. AND it generates a HUGE Gcode file. AN eight cylinder cam will generate well over a MILLION lines of code in mach3.

Been there done that one already(;-)  , (;-) TP
Title: Re: Any new WIZARD ideas to work on ???
Post by: Chaoticone on October 19, 2012, 05:37:29 PM
Oh man, this is getting good.   ;D   Good job fellows!

Brett
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on October 20, 2012, 11:28:48 AM
OK no one needs any wizards so I will close that book and move on to another project(;-)

(;-) TP
Title: Re: Any new WIZARD ideas to work on ???
Post by: OzzieII on November 24, 2012, 12:22:31 PM
Hey hope you're still there.
I don't especially need any new wizards, but I'd sure like the present ones to work in a better way.
I get the impression that many wizards were written by folks owning expensive VMCs with absolutely no backlash.
In many cases the sequence of cuts has the cutting force pushing an axis in the same direction that it is being advanced by the software. This is just plain crappy machining practice.
An example is turning an internal taper. That wizard starts the cuts from what will be the large end of the taper, and proceeds to the minor diameter of the taper. The cutting force is pushing the tool toward X0, and the software is doing the same.
Milling a slot, should in my opinion, start in the middle and work out to both sides. If the size is a bit small you can adjust the tool diameter and do a start from here near the end of the script.
If you are interested in rewriting them, I'll spend some time searching out those I think might be improved.
Ozzie
Title: Re: Any new WIZARD ideas to work on ???
Post by: OzzieII on November 24, 2012, 12:53:12 PM
AND,
The is another idea that I've played with but haven't brought to completion.
I want to take flat engraving code, and cut it on a cylinder. There are converters out there, but as far as I know none of them can handle G02 or G03 moves. And some of German Bravo's engraving code is written using G02/G03.
So, my idea is to have a page in my screenset devoted to doing just that. When I go to that page a brain would do a swap axis; Y to A, (or is it B?). Then there would be a DRO labeled Diameter, which would actually be the basis of a scaling factor for the Y axis, now actually the rotary axis.
Then code executed from that page would engrave in the correct proportion on the set diameter workpiece.
Switching to any other page would un-swap the axis via the brain.
I had this half done and lost the work in an HD crash. I'd be happy for someone else to implement it.
What think?
Ozzie
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on November 27, 2012, 03:05:16 PM
Adding backlash comp in wizards is WELL beyond the scope of a wizard (;-)

You cannot cut an arc outside of the xyz planes MACH3 cannot do it. So everything has to be converted to line segments to cut arcs in the A axis.

Most modern controllers can do that on the fly. They convert the code from say Y to A on the fly. You just have to define the radius of the part in A axis.

Most cams can do that as well.

(;-) TP
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on November 27, 2012, 03:08:28 PM
Also the wizards copyright rights belong to the specific authors of the work.  Modifying them without permission would be really bad form.

Just a thought, (;-) TP
Title: Re: Any new WIZARD ideas to work on ??? Work of others
Post by: OzzieII on November 27, 2012, 04:59:40 PM
We already have cases of wizards doing work similar to other wizards, so I fail to see that as much of a barrier.
If you posted a wiz that turned an internal taper from the small end of the taper to the large, that would certainly be new; we don't have that now.
The same with external taper turning, the present wiz cuts right to left, pulling the tool from the work as it progresses to the larger diameter.
If no one else does it, I'll struggle through it eventually; just that it will be like daily root canal, whereas those more cerebral than I might actually enjoy doing it
Ozzie
Title: Re: Any new WIZARD ideas to work on ??? RE ARCS
Post by: OzzieII on November 27, 2012, 05:09:26 PM
Suppose I just swapped cables; rotary cables where Y cables were plugged in? Mach would not know, I'd keep it a secret.
What would happen then?
I've been told that Swapaxis is the same as changing the cables? Is that correct?
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on November 27, 2012, 05:14:16 PM
Here is your chance to be a WIZARD writer. I guess you have noticed there are FEW of them (Writers).

With any of the free ones you can look at the code and modify as needed. (;-)

(;-) TP
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on November 27, 2012, 05:21:28 PM
Just a note when cutting on a lathe you normally turn into the spindle not away from it. SO with your approach it would be backwards ??

Backlash is normally not a problem in turn as you normally only cut in one direction, into the spindle.

(;-) TP
Title: Re: Any new WIZARD ideas to work on ???
Post by: Holdren on December 12, 2012, 11:42:02 AM
How about drilling one hole which has two different angles through a plate?
Title: Re: Any new WIZARD ideas to work on ???
Post by: Bichler on January 22, 2013, 09:36:20 AM
Hallo I pleased you to help me!!
I have 3 cad programs and I want to write a wizard that does something like this:

1.   Open NC file ( mastercam, solid cam or jet cam )
2.   Read each line
3.   Compare it with an array of signs for example: @740, M03, M05,
4.   
         If @740 ->delete line       M03->delete line     
If G0 50 writes line G0 50 m3…………
5.   If nothing like: @740, M03, M05,                                                                                                   
Read line and write line into a new created file named by user defined.

Safe it and call it into Mach 3
I need it to convert a mill file to a plasma cut file

Hope you can help me
Thank you Bichler
Title: Re: Any new WIZARD ideas to work on ???
Post by: asw on January 23, 2013, 10:38:04 AM
Getting board waiting on parts (;-)

(;-) TP
Hi. I have made a smart little touch probe for defining tool height. It works nice with a resolution of 0.02 mm. How can i use it to set the tool position to Z=20? I think that when moving down (slowly) it can register the position and set Z axis DRO to 20.
Is it a good idea for a wizard or a plugin?
Title: Re: Any new WIZARD ideas to work on ???
Post by: JohnHaine on February 20, 2013, 04:45:41 PM
A nice turning wizard would control the tool to cut a multi-lobed cam-like cutter that could be turned into a form-relieved gear milling tool.  The tooth form would be made using a circular button (or two), and the X axis moved in and out as the work rotates to make the form-relieving.  Would be a CNC version of a methid that has been described by several model engineering authors.

asw, see Tweakie's posting at http://www.machsupport.com/forum/index.php/topic,23603.0.html!
Title: Re: Any new WIZARD ideas to work on ???
Post by: Mountainman on April 10, 2013, 10:39:26 AM
OK How about a wizard where you connect a encoder scale to your axis and it automatically calibrates step per in a couple of locations and takes the average of that.  Then does the same for backlash and finally when all is close to perfect in that respect makes a screw map.  That would be an incredible wizard.  Does that already exist? 
    JOhn
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on April 10, 2013, 11:10:26 AM
John you do not set up your machine by taken an average of steps. You calculate the steps from the parameters of the axis drive.

Steps per rev of motor
Microsteps
Gearing
Screw pitch

OR servo

Encoder count X4
Gearing
Screw pitch

Then IF servo you tune the servo PID to make it accurate then set the error range to a setting where you are comfortable with the amount of possible error. A Servo driven machine is ONLY as accurate as its tuning of the drives.

Then you set the Vel/ Accel that the motor can run and give no errors. Stepper only have a range of RPM(torque band) that they can run in without loss of steps IF you get out of the range (High RPM) you do not have enough torque to maintain position while cutting.

Just a thought, (;-) TP
Title: Re: Any new WIZARD ideas to work on ???
Post by: Mountainman on April 10, 2013, 04:26:41 PM
OK, for starters theoretically 512 PPRX 4 X2:1 ratio pulleys X .200 lead ballscrew= 20480 steps per inch.  In reality when I used teh mach 3 calibrate function this was off by about +/-20 steps.  maybe the pulleys aren't exactly 2:1 or teh belts are off or who knows what.  Now we have screw mapping.  Why is that?  I suspect because at different areas of teh screw you have different values?  so if you calibrate at one spot, it will not be good teh whole length of teh screw.  The best you can do is take an average value of the inaccuracies throughout the screw.  Think about this, you command a move, mach makes it and then asks you for the correct value you enter it and it gives you an exact steps per value.  That value is only good for that spot because you have to take in consideration of an imperfect screw ( nothing physical in life is perfect) that you don't know how much error it has.  Then we can screw map.  I'll get done roughng my parts and I will start to play with my PID loops again. 
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on April 10, 2013, 05:01:30 PM
Set the machine for the CORRECT calculated steps there is NO way around that part. The error you saw after that was probably servo error due to poor tuning.

Servos HAVE to be properly tuned  or else you suffer servo following error.  You may want to find a CNC repair service in your area and have him tune the servos. It has to be done ON the machine and you  should have a small load on the table when tuning. Once it is tuned correctly write down the PID numbers for reference.

I believe that screw mapping is the least of your problems at this point.


Just a thought, (;-) TP
Title: Re: Any new WIZARD ideas to work on ???
Post by: swetha22 on May 28, 2013, 12:56:11 AM
Hi,
Is there any way to develop wizard for relief turning?
Pl see the video
http://www.youtube.com/watch?v=pcOfChvoj40
thanks
Title: Re: Any new WIZARD ideas to work on ???
Post by: Dan13 on May 28, 2013, 01:04:52 AM
The X axis would need to be geared to the Spindle to try doing something like this at all.

Dan
Title: Re: Any new WIZARD ideas to work on ???
Post by: Mountainman on May 28, 2013, 06:52:06 AM
Set the machine for the CORRECT calculated steps there is NO way around that part. The error you saw after that was probably servo error due to poor tuning.

Servos HAVE to be properly tuned  or else you suffer servo following error.  You may want to find a CNC repair service in your area and have him tune the servos. It has to be done ON the machine and you  should have a small load on the table when tuning. Once it is tuned correctly write down the PID numbers for reference.

I believe that screw mapping is the least of your problems at this point.


Just a thought, (;-) TP

My maximum occurred error after tuning each axis for a whole days was 5 encoder counts.  Z is more like 15, but my parts come out to like about +/-.010 with about 80% of the parts being within .001".  Far from what a machine with NSK ball screws barely used ways and good spindle bearing is capable of.   
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on May 28, 2013, 12:10:08 PM
It is NOT about encoder counts as much as it about precise control of the servo. A loose tune and the servo will never move up to the precise position and a overshoot condition will drive the servo PAST the position then back it up. Are you tuning with a scope? perhaps with a ball Bar tester?

Mach3 is far more precise than most machines can deliver.

Just a thought, (;-) TP
Title: Re: Any new WIZARD ideas to work on ???
Post by: Mountainman on May 28, 2013, 02:35:03 PM
I don't have a scope attached, but I am using teh servo config software that came with eth dugongs.  Like I am saying, it can barely be over shooting if  my maximum occured error is 5 encoder counts.  Wish I could tune with a linear encoder.  I have yet to remount all my components in teh cabinet to separate 130 VDC signals from control signals.  I also have to ground my input /signal cables and have my servos reconditioned.  Then I will retune and see what I get. 
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on May 28, 2013, 02:54:46 PM
Tuning without a scope to SEE what you are doing can be a nightmare. Some can do it by ear(after doing many hundreds of them) most cannot.

Also the tuning is done ON the machine with a light load on the table. You cannot properly TUNE a servo sitting on the bench.

The ball bar test verfies the actual movements of the machine. IF this is a large machine it would be money well spend to get a CNC tech to TUNE them for you. AND you watch the process 1 time.

(;-) TP
Title: Re: Any new WIZARD ideas to work on ???
Post by: Mountainman on May 29, 2013, 07:01:50 AM
You familiar with teh servo config program for teh Dugong drivers?  It gives you a chart that shows how much overshoot, settling time and what your trailing error is for your move.  Its better than tuning by ear.  I can not seem to find a CNC tech anywhere in my area.  Orlando FL. 
Title: Re: Any new WIZARD ideas to work on ???
Post by: Ya-Nvr-No on May 29, 2013, 08:02:02 PM
Hell that's Terry  :D
Title: Re: Any new WIZARD ideas to work on ???
Post by: Mountainman on June 03, 2013, 07:23:09 AM
He told me he doesn't do that anymore.  He doesn't even have his equipment. 
Title: Re: Any new WIZARD ideas to work on ???
Post by: BR549 on June 03, 2013, 10:10:41 AM
Try searching for CNC machine repair , Orlando Florida. I found several in the area.

(;-) TP