PDA

View Full Version : Writing Code



hwd_woodworking
02-12-2005, 03:13 PM
Hello,
We picked up our prtAlpha this past september. We love it and find the part wizard "ok". I draw all my cabinetry and other stuff in auto cad. Then import them into part wizard. This is good for most of our stuff but it doesn't help us with getting to know how to write code. This can be a problem for some things like trying to V Carve something with out insignia. Are there any books out there that would help me in learning how to write code for the shop bot, or would it be just more simple to by the insignia program. The fear is i will push insignia to its limits as well and still be left feeling like I can't get more out of my machine. I see these pictures of what people are doing with there shop bots and thinking they must have the real expensive software so they can carve out all these diferent things. I guess what I'm driving at is in our custom cabinet shop we could sell more to our customers if I knew how to program the machine to do what I want.

Any feed back would be great

Thanks nate

paco
02-12-2005, 04:05 PM
Hi Nathan!
As for to learn programming SB code; you already have pretty much all you need... "Advance programming" chapter in your user manual (available too from the support download page). From this, you can study the routines files that you already have in the SBParts folder; you can learn much from thoses... for further help; submit your specifics questions here on the forum!... and especialy to thoses that are particulary interested into programming.


As for witing a code for V carving; hummm... go for a software! When you feel limitations with a software, it might be because you need something more... or because you did'nt explore/tested all it's ressources... softwares are tool... to your imagination and creativity! You can try Insignia first from a demo. One nice thing to know that is'nt very obvious is that once you have Insignia, you can upgrade to PRO for the price difference; if you have an Insignia licence, going to PRO is an upgrade so you will be paying only the difference! Though you might want to confirm this with your reseller; this is what I've been told by mine and by a sale rep. from ArtCAM...

One more thing; you don't really need to do what everyone do to have fun and to make $$$...

Brady Watson
02-12-2005, 04:13 PM
Nate,
Realistically you are not going to be able to V-carve by simply learning how to program shopbot code. It is a very sophisticated process and aside from machine along vector and the 10 fonts you can V-carve in PW, the only other option you have is the Typesetter ~ which still won't v-carve designs, just text.

My advice would be to invest in Insignia. It does everything that ArtCAM will do in 2D including v-carving of any font, design etc, prismatic letters and a whole bunch of other goodies like bridging and advanced toolpaths.

I doubt that you are going to hit the same type of wall with Insignia ~ Unless of course you will be getting into 3D relief creation and toolpathing.

-Brady

hwd_woodworking
02-12-2005, 05:21 PM
I know waht you are saying about how to program v carving, but thats not really my intentions. for instance if I use a v bit and follow a vector that comes to a point I am left with the dreadfull round inside corner. It would be a simple comand in essence to take that bit and lead it out on a diagonal. End result giving you a V carved look. The problem is if you have alot of them... for instance I am designing a TV cabinet that has a 1/2" elliptical chain that I am carving with a 60 deg. bit. I am forced to relief carve all those inside corners. This is where the question about the code writing comes in. Would it be faster to relief carv all those corners (about 50) or would it be worth figuring out how to make the machine do it?

weslambe
02-12-2005, 06:16 PM
Nathan, go to my website. www.doorbot.net (http://www.doorbot.net) You can carve corners with your shopbot without having to spend the big bucks on the other guys programs if all that you want to do is create doors for your cabinet shop.

Wes

gerald_d
02-12-2005, 11:49 PM
Nathan, I feel your pain. What we do is to draw those little "diagonal lead outs" in AutoCAD, in 3D, and then use a CAM program that understands a 3D move to write the code. We never hand code, and we plan every move with AutoCAD. The CAM program that we use in between is called "Vector".

hwd_woodworking
02-13-2005, 10:43 AM
Thanks Gerald,
Is there a web site or some place I could go to price this software out?

dingwall
02-13-2005, 12:13 PM
Nathan, although I'll sometimes go in and edit lines of code rather than re-draw something simple, it's not something I'd do for a visually critical detail.

In my experience, money saved upfront on software and hardware for that matter, will be lost in the long run if your time is a key ingredient to making a living.

gerald_d
02-13-2005, 01:31 PM
Nathan, I am hestitant to recommend Vector because most ShopBotters have discarded it. However, it can be found over here (http://www.vectorcam.com/).

hwd_woodworking
02-13-2005, 04:33 PM
Thanks Gerald,
I looked at that web site and it looks interesting. Is there a reason my most shopbotters have disgaurded it. One big reason to up grade to insignia would be that we could v carve any closed vector also we could peck drill and that would be huge for some of our machining processes. Some of our larger accounts wants us to drill hundreds of holes into 2.75" mdf. We find double edge bit screech to much and are forced to use a single edge bit...tool life is not to good.
Any ways thanks for the lead, and if you have some reservations I would be glad to hear them

gerald_d
02-14-2005, 12:52 AM
Nathan, Vector has been discussed to death on this Forum and I don't want open the can of worms again. The basic Vector does not calculate v-carve moves - i.e. finding centerlines of fonts or pulling up those diagonals you spoke of earlier. The Vector vendor has a package called V-CarvZ to add to Vector, but that package generates many surplus moves - extremely time consuming. My suggestion is that you consider Vector only if you plan/design all moves in 3D AutoCAD and are only looking for a smart converter to .sbp code. (Most of the ShopBotters dropped Vector because they thought it was a good CAD system as well, and ended up being very frustrated with the CAD side of Vector)

You started off asking about ArtCAM Insignia, and I don't want to send you off on another tangent now. As I read it, Insignia is very much similar to PartsWizard in that it is 2D only. You seem to be wanting to head into 3D territory, and I don't know how experienced you are with AutoCAD to start taking the 3D leap. Taking those little diagonals as an example, if you would be very comfortable to draw them in 3D in AutoCAD, then you only need a smart .sbp converter (maybe Vector) today. However, if you really don't have AutoCad 3D experience, then you might be better off with a more CNC oriented package to learn the 3D on - but Insignia doesn't look like the answer.

From what Brady said, Insignia will probably help you out with today's headaches. But it will put you onto the expensive ArtCAM Pro route when you do maybe hit the next set of limits tomorrow.

hwd_woodworking
02-14-2005, 07:27 AM
Thanks Gerald,
From my expierences drawing in autocad is (so far) the fastest abd best platform for all my 2D items I want to cut. We do all our shops for our customers on autocad etc... As far as the 3D I do 3d drawings for clients and myself if it's complicated and helps to have a visual. The problem with autocad 3d is it has its limits as well. For instance if you take an ellipse and try to extrude it at a taper it doesn't like it (version 2002) I have played in solidworks, a little in pro-e, and dabbled in Inventor. Those programs are great 3D modelers but so are there prices. I have contemplated flirting with autocad inventor a little more to bring in a parametric drawing element to our shop, but I hesitate because of the price and I'm not sure how well it will work with parts wizard.
I have found that part wizard does not enjoy ellipses that are close together. when we import them I'll get part of it or a mirror of it and then I'm forced to save as another file and continue from there.

As far as taking your advise. It sounds good. I don't have a problem getting around most of autocad's 3d quirks.

Another question about Vector. If I draw a lead out in 3D you say it will tool path that diagonal vector, will it be able to tool path that same vector if it followed a curve. For instance if I cut an inside profile with a 1/4 round and wanted to lead out the inside corners with a very small bit, or a pointed 1/4 round.

Thanks for all your help, it feels good being able to talk with someone who has encountered some of these same issues

Nate

srwtlc
02-14-2005, 10:02 AM
Nathan,

I'm not sure what shape your geometry is (elliptical chain), but I will often (with Vector) square out corners of simple v-carved accents such as rectangular borders or frames. In my cad program or Vector I make the design, then with the v-bit geometry in mind I use Vector to make an offset to the center and cut/paste down to the proper depth (for instance -0.1875). Then by using path direction selection I do a "line connect" in both directions. This give me a "up out of the corner and a back down into the corner to continue on to the next corner" toolpath. It will toolpath the curved path if you can draw it in either program. You just have to keep in mind that the ShopBot will not do arcs in the z axis unless you break those arcs into segments before generating code, which Vector can do (break interpolate).

I'm not touting Vector here, I am just one a few that have stuck with it and have learned how to make it work for me and not against me.


If you want me to take a look at what you're trying to do, drop me a line.

Scott

richards
02-14-2005, 01:15 PM
Nathan,

You wrote about the "... dreadfull round inside corner...".

Getting a V corner is fairly simple using the M3 command. Just make the final move at 45-degrees (assuming a 90-degree corner) starting at the desired cut depth and ending at the material surface depth.

-Mike

hwd_woodworking
02-15-2005, 07:37 AM
Mike
I am interested in doing just that for now. The bit I am using is a 60 degree v carve. Could you give me an example of how that M3 command would write out assuming I had 1/2" thick material? I'll try an upload an auto cad drawing of what I'm doing.

This would be very simple if a had a software like what scott and gerald were saying because I could simply pick my 3d vectors. I just hate spending money on a software that really isn't up to par if that is what everyone is hinting at.
Thanks for the comments

Nate

richards
02-15-2005, 10:28 AM
Nathan,

Unfortunately, I'm in Boise, Idaho, which is several hundred miles from my shop for a few days. As soon as I get back to Salt Lake, I'll post a few lines of code that shows the procedure.

Here's a very brief example:

JZ,1.0 ' safe Z height
J2,0,0 ' start position
M3,0,0,-0.25 ' plunge the cutter
M3,1,0,-0.25 ' move 1-inch along X-axis
M3,1.25,0,0.0 ' raise cutter while moving .25 inch along x-axis
JZ,1.0 ' safe Z height

(Sorry about the lack of formatting the code. I haven't studied the Forum's guidelines for text formatting.)

The third M3 command lifts the cutter as the bit travels. Of cource, this example moves in a straight line. Cutting at an angle requires some simple right-angle triangle geometry.

-Mike

mrdovey
02-15-2005, 07:05 PM
Nathan...

Essentially what you want to do is [1] cut the dreadful round inside corned, [2] move the tool back into the corner (at whatever depth the corner was cut), and [3] move the tip of the cutter to the point where the corner is supposed to be at the surface of the material.

I'll leave the trig to you (just got called to supper :-)

...Morris

hwd_woodworking
02-15-2005, 10:55 PM
Thanks guys,
I wrote out e few lines and tried them out on my preview and seems to work. So tommorrow I'll give it a go. Some guy gave me a qoute of relief carving those little rounds for $320. And with a little help from you guys and the copy and paste features I was able to write out those lines in 15 min. (had to do the old trial and error bit)
Thanks again I'll let you know how it went

Nate

gerald_d
02-16-2005, 12:23 AM
Hi Nathan, you asked earlier "Another question about Vector. If I draw a lead out in 3D you say it will tool path that diagonal vector, will it be able to tool path that same vector if it followed a curve? For instance if I cut an inside profile with a 1/4 round and wanted to lead out the inside corners with a very small bit, or a pointed 1/4 round." Scott already told you that your ShopBot doesn't like vertical curves, but that Vector would segment that curve into tiny straight cuts for you. However, the bad news is that you don't get the neat corner that you were hoping for. A "quarter round" cutter with a small tip doesn't make the curves flow smoothly when you pull it out on the curve that you are talking about. V-cutters and flat "bevels" work, but rounded "bevels" don't.

hwd_woodworking
02-16-2005, 06:44 AM
Hi Gerald,
That spawns two questions I guess.

Is it possible to do those types of inside corners?
and

Does the shopbot regaurd all types of verticle curves as "tiny straight lines", including a very shallow curve? Like one that you could put say under a logo that would depict say a pencil swirl of some sort. Something that you could V carve with the right software in a closed vector that would start out very thin curl around and gradually get fatter then return to thin. Are those also thought of as tiny straight lines. and is this only true with shopbots or all cnc machines?

richards
02-25-2005, 01:16 PM
Nathan,

I promised you some code to demonstrate cutting inside corners. Unfortunately, I'm still unable to run a real test; however, this sample piece of code appears to work correctly in simulation mode.

The code cuts a rectangle 12-inches square centered within a 14-inch square and then cleans up the corners. It assumes the use of a 90-degree V-bit:

' sample file to cut corners
' 90-degree V-bit
'
JZ,0.5
J2,0.0,0.0
'
' ramp into the cut
J2,7.0,1.0
M3,1.0,1.0,-0.25
'
' cut rectangle
M2,13.0,1.0
M2,13.0,13.0
M2,1.0,13.0
M2,1.0,1.0
'
' cut corner 1
M3,0.75,0.75,0.0
JZ,0.25
'
' cut corner 2
J2,13.0,1.0
JZ,0.0
MZ,-0.25
M3,13.25,0.75,0.0
JZ,0.25
'
' cut corner 3
J2,13.0,13.0
JZ,0.0
MZ,-0.25
M3,13.25,13.25,0.0
JZ,0.25
'
' cut corner 4
J2,1.0,13.0
JZ,0.0
MZ,-0.25
M3,0.75,13.25,0.0
JZ,0.25
'
'
J2,0.0,0.0
JZ,0.5
'
' End of file

Using other V-bit cutters requires use of the TANgent function on the calculator and some simple math. For instance, using a 60-degree V-bit (30 TAN = .577 and .577 x .25 (depth of cut) = 0.144) would require the program to be modified as follows (only corner 4 is shown):

' cut corner 4 with 60-degree V-bit
J2,1.0,13.0
JZ,0.0
MZ,-0.25
M3,0.856,13.144,0.0
JZ,0.25
'

Using a 120-degree V-bit (60 TAN = 1.73 and 1.73 x .25 (depth of cut) = 0.4325) would require the program to be modified as follows (only corner 4 is shown):

' cut corner 4 with 120-degree V-bit
J2,1.0,13.0
JZ,0.0
MZ,-0.25
M3,0.567,13.4325,0.0
JZ,0.25
'

If my math is correct, (and that's a big 'if' since I graduated High School years before Trig was considered necessary for farm boys in Utah), the resulting parts should have clean, V-cut corners.

-Mike

richards
02-25-2005, 04:04 PM
I just cut a sample to show V-cut corners using the perameters in the sample posted above.

(Please excuse the quality of the photo - I had to use an unfamiliar photo editor to reduce the quality enough to allow posting.)

richards
02-25-2005, 04:10 PM
I just cut a sample to show V-cut corners using the perameters in the sample posted above.

(Please excuse the quality of the photo - I had to use an unfamiliar photo editor to reduce the quality enough to allow posting.)


4238

dirk
02-25-2005, 07:40 PM
Mike:
I'm trying to duplicate the tangent function your using in Excel spreadsheet. If I type the tangent funcion: =tan(30) I get a result of
-6.405331197. Your result was .577 What am I doing wrong?

hwd_woodworking
02-25-2005, 07:52 PM
Mike,
Thanks I am goint to play around with your formulas. I was able to get my inside corners but I cheated...To find my start and stop points I drew a circle at the begining and the end of the ramp and then I tool pated them for a drilling operation. from there I wrote the code to machine from one point to the next.

I know not very effiecent but at least I got it to do what I wanted. I am going to try your formulas and apply them to my programs to see if I can make sense of it all.

I was playing around with autocad and plotting out points to see if I could write a code as if I used a quarter round bit as apposed to a v-carve. Of coarse you would have to use a 1/16" bit to carve out the corners but if it's possible to do this you could make some pretty neat things.

Would you farm boys have a trig formula for that???

Thanks for the response
nate

dirk
02-25-2005, 07:53 PM
Figured it out, this function needed radians and I had to convert Degrees to radians.

richards
02-25-2005, 08:11 PM
Hi Dirk,

I got the same result as you did when I tried GNUMERIC (an Open Source spreadsheet); however, when I typed "=TAN(RADIANS(30))", everything worked properly.

It seems that some spreadsheet trig functions default to RADIANS while the little $10 calculator that I use defaults to DEGREES.

-Mike

richards
02-25-2005, 08:50 PM
Dirk - You found the result while I was checking the help file for GNUMERIC, which shows that I'm a fairly slow reader.

Nathan - Sorry, I have no secret formulas for quarter-round bits; but, I often use AutoCAD Lite to do the math for me. In the code example above, I let AutoCAD compute the co-ordinates for me. I drew the basic rectangle, offset the rectangle to compensate for the depth of cut (.25 * tan(45)) and then used the dimensioning tool to display the x,y co-ordinates.

It takes longer to describe than it took to do it.

One other note: I've found that decreasing the M3,X,Y values by about 0.020 gives better results - at least with the cutters that I use. The calculated values tend to overshoot just a little bit.

-Mike

weslambe
02-28-2005, 07:22 AM
Nathan,

Making corners isn't the hard part, it's putting it all together with the rest of the program that you are trying to run.

I find it quite telling that most of the help that you are getting is from current owners of my software!

Mike Richards and Dirk Hazeleger are both owners of DoorBot software therefore their answers are only a mouse click away.

Wes
DoorBot

jthelen
02-28-2005, 10:04 AM
Nathan, Just to throw another option out there I use Rams"Gold" edition. http://www.rams3d.com/ Rams has a feature called skeleton for V carving. With text you give it a depth deeper then your maximum depth it will follow the lines adjusting the depth to match the width of the lines. (see example in their galleries) For corners like the one in Mikes picture I set a hard depth say .25 and Rams will generate the geometry. It also has a "square corner" feature. With this checked Rams will square off the corners. (inside and out.)
I would get at least the enterprise version. But for the extra $100 I got the gold in case I need to do a continuous 4th axis someday. (see comparison chart)

Hope this helps,
Jim

richards
02-28-2005, 10:20 AM
Wes -

Your DoorBot software is good - but everything is not a door. I bought your software to make doormaking easier and faster and to eliminate the tediousness of manually computing the angles of every cut; however, the technic to 'square' up a v-cut was demonstrated in 1964 while I was a 10th grade student in a geometry class. (The teacher used a drill bit and lines on the black-board to show how math could be used in industry. I doubt that CNC machines existed at the time, but the technic is timeless.)

- Mike

weslambe
02-28-2005, 10:42 AM
Mike,

I just wanted to point out the usefulness of my software, that's all.

Many people are using my software to create shutters, wainscotting and even picture frames so it is true that everything is not a cabinet door!

Wes

scott_smith
04-26-2005, 06:41 PM
F.Y.I.

I was using the tangent function in an sbp file and found that the ver. 3.X program used radians while the ver. 2.X used degrees.
(I use V3 in the office for preview and V2 on the SB to cut.)

Example:
&DEG is the v-cuter angle
&ZZ is the depth of cut

ver. 2.X formula:
TAN (&DEG/2)*&ZZ

Ver. 3.X formula:
TAN (3.1415/180)((&DEG/2))*&ZZ

scott_smith
04-27-2005, 12:36 PM
Sorry all, Bill Young sent me an e-mail to straighten me out. Thanks Bill.

Both versions do use radians!

My problem was that in V3 I could use:
TAN ((3.1415/180)(&DEG/2))*&ZZ

But in V2 I needed to change the formula to:
TAN ((3.1415/180)*(&DEG/2))*&ZZ

Note to self:
Test and retest your findings before you post!

robtown
05-08-2006, 07:14 PM
Many thanks to you all. The info in this thread allowed me to run a sample for a prospective shopbot buyer. I'm pretty sure we'll have a new campadre in the near future based directly on the results... the user forum strikes again... hehe

To expand on the subject in this thread:
If we one were using a curved profile as opposed to a v-cutter, in theory if we had the radius of the curved profile cutter we should be able square out corners in a similar fashion using an arc equal to the cutter's radius... no?