What's new
What's new

Simple way to run mutiple offsets/postions w/o copy/past using MCX

viper

Titanium
Joined
May 18, 2007
Location
nowhereville
I would really like to find a better way to verify a program in one offset and be able to post out for several offsets on the vices without copy/pasting ops in the posted file. We generally use Mastercam X. We want to use say T1 on all positions, then T2 on all positions and so on. Can MCX do this? Is there a better way?
 
We do this all the time with the MPSUBREP post. The price is right (free) over at Emastercam. Basically it does exactally what you are looking for...All the tools run their own subroutine & the "main" program does the first position move for each tool...so it runs all of T1 at the G54 location...then T1 at the G55 location, ect...
 
thats what we have been doing but I just hate putting myself in the mix because I make more errors that the software does. That is just me so I have to find ways to get around all my errors. I love to forget the little things...
 
I don't need another post. Just copy the op and change the offset. Takes all of about 5 seconds.

if you use multiple offsets running the same part on different vises you need to look at MPSUBREP. No copy & paste, nothing. Program the part once & in your first op tell the post how many times to repeat.

Copy & paste does work...but imagine you have 6 vises running a part & that part has 50 ops with 10 tools. by the time you get done coping & pasting, you have 300 ops. With a different post...you still just have 50.

The other advantage is much less program space. Each tool is its own sub...so instead of writing basically the same code 6 times, you are doing it once. Using the above example...you have 11 programs, 1 being the main & the other 10 are for each tool.
 
I'm with PBMW, except I write local subs. I find each tool change and give that line a number, then find the end of each tool and throw in an M99. It's super simple, very quick and the advantage is the program runs exactly how I want it to. Plus, if you have a part that has long cycle times like mine often do, you can use block deletes on all the M97 lines except for one so if you end up running only one vice at the end of the job, you don't have to waste all the time of cutting air on the vices that don't have parts in them.

%
O0000 ( PART/OP )
G0 G40 G49 G54 G80 G90

G54 M97 P1000
/G55 M97 P1000
/G56 M97 P1000

/G56 M97 P2000
/G55 M97 P2000
G54 M97 P2000

G0 Z1. M9
M6 T1
G0 G40 G49
G53 Y0. X-10.
M30
%

N1000 M6 T1
(STUFF)
M99

N2000 M6 T2
(STUFF)
M99
 
Yeah, guys, I am thinking that the subs are going to be the way I go. I have never used them sucessfully on our Haas during testing so I might bounce a sample program in here to see if we can get it working. I need to use this idea on the Lathe as well as mills I think. I just need to simplify life and using subs seems a good way to go. I at least kind of understand it. My only experience is using a local sub but I think using a remote program would be handy and could be used for other stuff too.

Basically use block delete to ignore the other offsets, test G54, remove BD and roll on. Seems easy but I bet I will fight it for a bit. One thing I could not figure out with M98 was how many times to repeat. the L count was weird and confusing. I was just testing with a drill hole but may be by repeating the whole program with a sub and different offset call is the way. I sure appreciate all your input. BIG help!
 
Try using the program I posted and put your simple drilled hole in place of the (STUFF) comment for one of the tools. That program is a direct copy/paste from a working program on my VF-2ss, so it should work fine for you. Don't trust it though. :)

I've never messed with external sub routines, but with internal (M97), the only time you'd loop it is if you were doing the same op several times on the same part (think bolt patterns, etc.), or if you were working several parts on a very accurate fixture. I don't think I'd try looping a sub onto different vices. That's why I simply use different work offsets and call each sub once in each offset, no loops.

That's what I love about this stuff though...books can teach you only so much, the rest is all dependant on how inventive you are.
 
Too bad Fanuck does not use the handy dandy M97.:confused:

I figured that if Haas did it then everyone must. Boy was I wrong.:rolleyes5:

M97 Rules.:cheers:
 
Here's the rundown Joe, some you know, some might be new...

All of it is done with different variations of M98. The full break down is like this...
M98 Pxxx Hxxx Lxxx (P = program, H = "N" number, L = repeats)

So, you can code like the following:

M98 P2000 (regular sub call)
Sub call to program number 2000.

M98 H1550 (internal sub call)
Sub call "jump" to N1550 in the main (or same program you're calling from)

M98 P2000 H1550(external sub call with a jump)
Sub call to program #2000, jump to line N1550

You can also jump with a M99:
M99P600 (return to N600)

With the above (M99), if you're in a sub program, it will go back to calling program to line N600. If you do this within its own program, it will look in reverse to find N600.

On a Fusion and newer control, I usually put internal subs after the main program M30 like this....

(code)
(code)
(code)
G0G91G28Z0M5
G30X0Y0
M30 (end of main program)
(*)
N1550(internal sub 1)
(code)
(code)
M99
(*)
N1600(internal sub 2)
(code)
(code)
M99
.
.
.
etc, etc.

On a M+ and older control, you need to put the internal subs before the M30 unless you write it into the program at the control. Some Plus controls have a hard time dealing with info after the M30. In which case, I'll have a jump (GOTO) statement to hit the M30 at the end of the run. This is just what I do. You can place the subs and commands anywhere in the program body. And, you can nest them within subs as well. Much like macro statements, you can nest sub commands 8 levels deep on Mazatrol controls. This includes if you're using G65, G66, G66.1 mixed together. It's 8 levels total from a single jump point.
 
Two of the three Toyodas are here but in storage. Unfortunately, we don't have a new building secured yet. We may be moving the entire facility rather than just expanding to another building. I'll have to let you know which way that goes.

With 3 new horizontals, 2 new Mazak e1550s and a facility move..... Man, it's going to be a busy summer....
 
Two of the three Toyodas are here but in storage. Unfortunately, we don't have a new building secured yet. We may be moving the entire facility rather than just expanding to another building. I'll have to let you know which way that goes.

With 3 new horizontals, 2 new Mazak e1550s and a facility move..... Man, it's going to be a busy summer....

Are you guys gonna stay in the area if you move the whole facility? Real estate is an awful lot cheaper about 2 hours up the road!
 
Real estate is an awful lot cheaper about 2 hours up the road!

I hear that... and I suppose you'll be glad to "borrow" some of our machines right? (LOL)... Actually, we're looking at about 10 minutes south (which is good for me!).

BTW.... something else I thought of that many people don't realize when using BLOCK DELETE or SKIP....

Many controls also have Multiple Block skipping. This allows you to be selective in what you're skipping. The coding (using a partial from Matt's post) is like this:

%
O0000 ( PART/OP )
G0 G40 G49 G54 G80 G90

G54 M97 P1000
/2G55 M97 P1000
/3G56 M97 P1000

/3G56 M97 P2000
/2G55 M97 P2000
G54 M97 P2000

G0 Z1. M9
M6 T1
G0 G40 G49
G53 Y0. X-10.
M30
%

Then, on the Block Skip menu, you just select which skip number to skip. Most controls have a value range of 1-9 (1 being a default). It doesn't have to be in any particular order either, its purely selective....
 








 
Back
Top