PDA

View Full Version : Programming help...



harryball
12-11-2006, 01:31 PM
How can I call part files and control the depth of cut for each one to create passes? I'm reading the manual but proportion Z has no effect and if I eliminate the Z moves I loose my tabs.

The full story...
Before I make this far more complicated than it needs to be if I could get some experienced opinions. I've spent about 30 minutes getting the idea together and starting the Master part file.

Overview:
I have a project that will be cut repeatedly from blanks. The project contains an overlap that needs to be exactly 50% of the material thickness. The blanks will vary slightly and I would like to touch the surface of the blank each time I load a new blank to obtain the material thickness then run my custom cut file with 3 passes calling raw .sbp files for each profile. These are small parts so tabs need to be left in as well.

Progress:
I have manually plugged in a variable &Thickness = 0.75 I have not worried with the code to do that automatically yet. Nor do have I actually used this value yet.

I zero to the table and have created a single pass toolpath for each cutting path using Vcarve Pro. I have modified the post processor (and could some more) and I get a .sbp file that only contains XYZ moves. No turn ons/offs/jog homes etc...

I have a master file that will call each .sbp file to execute in order. It handles router on/off etc...

It runs perfectly for a single pass, produces the expected results and has the tabs in place.

Challenges:
The routine to smell the thickness I'm not thinking about right now, but I know I'll have to write it eventually. In the mean time I can measure it and plug it in, I really need to get the cutting file working first.

For full cut throughs I need to run this in 3 passes with the last pass being "as written" in the .sbp files, cutting to 0 on the table.

For the pocket passes I need to run the file to 50% of &Thickness for the last pass.


Here is a quick peek at the master part file...

'Created by Robert Ball copyright 2006
'Program creates 2 Strobel crosses from a single blank.

'ORIGN: 0,0,1
'BLANK: 24" along X by 8" along Y by approx 3/4" in Z blank size
'BIT: .250" end mill cutter 2 flute downspiral
'RPM: tested at 14,000 RPM

'Instructions:
'place jig for holddown and positioning
'Zero X,Y at 0,0 for the jig
'Zero Z on the table bed (jig bed) at 6,4
'place blank in place
'Touch material top to get measurment
'execute program

'BEGIN CODE
JH 'make sure in home position
'Zero'd Z to the blank BOTTOM, cutter head is in the home position, blank loaded? press OK
PAUSE

J2 6,4,1 'go to position to touch material top right over pocket area
'Place zeroing plate under bit on material top and press OK
PAUSE
'<<call routine to find material thickness &Thickness >>
&Thickness = 0.75 'manually insert for now
&ZCut_overlap = &Thickness * 0.50

SA
SO,1,1 'Turning spindle ON
PAUSE,2

harryball
12-11-2006, 10:10 PM
BTW, this job is sort of Brady's fault... offer a service ehh... dagburn customers and their ideas... be so much easier if they just pushed cash through the mail slot. :-)

I got everything working to my satisfaction. Some odd behavior trying to use FP with repeated passes so I coded it the long way.

The depth sense feature to create the lap works great. I load the blank, touch the top and let it run. The parts lap perfect to form a single thickness. I tried 3 different materials (.698" .707" .754") the lap came out dead on every time!

I created a "raw" shopbot post processor file for VCarve Pro. It writes out a .sbp file with no Z moves or jogs. To use the moves only files I jog over to an area that is inside the cutting area (these are pockets) then Z down to the desired depth and call the file.

It was amazing to watch it run. I zero Z one time, then drop in a blank, touch the top, let it cut, pick up the cutting, drop in a blank, touch the top and so on.

Robert

beacon14
12-12-2006, 01:28 AM
If you want me to write the thickness gauge routine you'll have to wait until I have the time, which may be never at this rate. However a simple way to run your files at progressively deeper passes is to reset the Z axis value from within the file.

JZ, 1
VA,,,1-&thickness*2/3
JZ,1 'cutter is now raised by 2/3 the thickness

Then run your files in order

JZ, 1
VA,,,1+&thickness/3
JZ,1 'cutter is now lowered by 1/3 the thickness, leaving it 1/3 the thickness higher.

Then run your files in order again. Repeat the last step to reset your Z value to the original setting for the final pass.

This could also be done with a loop. BEWARE that if the file is stopped for ANY reason that the Z value will be left at its temporarily reset value and will not be correct.

harryball
12-12-2006, 08:41 AM
David,

While I didn't try that exact command, I never could get a "-" to work anywhere when dealing with variables. &Pass1 = 1 - &Thickness returns an undefined variable error when trying to run. I can use a * / or + and it works, but not a -

I have the gauge routine already written and working great.

zeykr
12-12-2006, 09:58 AM
Robert, I've been planning to work on a thickness guage routine - would you share what you came up with?

harryball
12-12-2006, 10:51 AM
Test this first, use at your own risk. If improvements are made such as safety catches etc... please share them with the forum so we can all improve our code. I borrowed ideas from the zZero routine, it is very similar.

Set your Zzero to the table top. Insert your material and put the zero plate on top, then call this routine with "GOSUB FIND_THICKNESS" &Thickness is set to the thickness of the material.

This could be adjusted and placed in a custom slot for a quick call from the keyboard. I'm using it specifically in a master part file.

'------------subroutines

'Call as a subroutine, &Thickness will be the returned thickness found
FIND_THICKNESS:

Brady Watson
12-12-2006, 05:47 PM
If it messes up, it's sorta my fault


-B

harryball
12-12-2006, 07:15 PM
Thanks Brady... I'm glad it's your fault. This purpleheart is drving me nuts. VERY hard stuff that seems to have a mind of its own.

Also, the - that I couldn't get to work turns out to be a botched Print statement that Bill Young pointed out to me. That'll learn me to copy code and reuse it without reading the manual.

Robert

Brady Watson
12-12-2006, 07:25 PM
Robert,
Try climb milling the purple heart and see if that helps...if you are doing cut outs. Also try moving your start points to reduce/eliminate blow out.

-B