It doesn't matter if he is making EDM electrodes, or machined dog dooty, he still needs more than a single move to the next start point. Once the machine move to the next start point, the code coordinates will have to be modified by the offset of the fixture. Look at what is in bold above. That is NOT all that he needs to do.
Hi....my question on this topic is........for several identical parts using identical coding but in different positions......do you need to rewrite the complete code at each additional offset or is there a G code function that says "repeat lines N10 to N100" etc. at G55 G56 etc etc.
Do you need to have G55 G56 etc just to make a series of identical parts one after the other?
That is......G54 plus 20 lines of code will make the first part.....G55 will be the zero point for the second part.....how do I add the 20 lines of code to G55 without having to hand write all of them again?
Is this something that you have to create at the Notepad stage when you create the program and have to paste the lines of code in at the G55 position instead of re-writing them all over again and again for G55 G56 etc etc.?
What is a block or group of program lines called that you can insert as a block (relative to the respective G54 G55 G56 positions) into a program without having to write all the lines over and over again?
Ian.
There are multiple ways to do more then one part. I will normally "nest" my model in solidworks. I make an assembly with 2-3-4-5- as many as I want, in the orientation I want. So it does more or less what Mactach was saying. At least I believe thats what he was trying to explain.Use solid works to set the spacing and let cam treat it as one part.
To use multiple work off sets you simply make the code for one part. Then change the WCS in that code g55 or g56 etc. For this, every part needs to be zeroed in the control to corospond with the WCS being used.
I am not the best in macro's, but thats what the last option you asked about. Yes you can tell the control to do a job, then repeat that job X times in X locations. That would be the easiest and shortest method if you have a bunch to make. Even more so if you have a bunch to make later as well.
And is that not what would normally happen, I just gave him different choices 3 ways he could do it in fact, with 2 examples, ( What don't you get ) here is a photo of 400 parts that where machined by just using ( 1 ) offset, 24 parts at a time 2 different vices, all with X Y moves
Mactec54
400 parts, one offset and the code for each part has to be DIFFERENT. What you said is all he has to do is add a move in-between parts. I don't get what you don't understand. Saying all he has to do is add one line between parts is not all he has to do for your method with one offset. He has to change every line of code to make it work that way. Each coordinate has to be changed to reflect the fixture offset for each part.
The OP wants to use the EXACT same code for each part. To do that he only has two options.
1. Write the code for the part to use G91 incremental moves, then move to the start location for the next part and then he can run the IDENTICAL G91 part code from there.
2. Use the G54-G59 offsets. Which entails
G54
{Commands to make part} <<<<
G55
{Commands to make part} <<<<
G56
{Commands to make part} <<<< These codes with the arrows can all be identical. Identical as in they match exactly coordinate for coordinate.
...
His original code was written for G90, so 1 is out unless he re-writes the code to start with. that leaves using G54-G59 offsets. For that he will have to set zero for each work offset (G54-G59) on the machine, but the code for each part is exactly the same, character for character.
Nobody that know how to program uses a G91, with what you say he should do is very inefficient, that is why I showed different choices he could do, so this is what you would have, if you used 3 different offsets using the same program, using a different offset is very Inefficient way to do a job like this
%
O1
N1G17G40G80
T4M6
M8
G54
S3450M3
G90G0X-.25Y0.
G43Z.1H4
G1Z-.5F20.
Y-1.5F60.
G3X.25Y-2.I.5
G1X1.75
G3X2.25Y-1.5J.5
G1Y0.
G3X1.75Y.5I-.5
G1X.25
G3X-.25Y0.J-.5
G0Z.2
M9
M5
N1G17G40G80
T4M6
M8
G55
S3450M3
G90G0X-.25Y0.
G43Z.1H4
G1Z-.5F20.
Y-1.5F60.
G3X.25Y-2.I.5
G1X1.75
G3X2.25Y-1.5J.5
G1Y0.
G3X1.75Y.5I-.5
G1X.25
G3X-.25Y0.J-.5
G0Z.2
M9
M5
N1G17G40G80
T4M6
M8
G56
S3450M3
G90G0X-.25Y0.
G43Z.1H4
G1Z-.5F20.
Y-1.5F60.
G3X.25Y-2.I.5
G1X1.75
G3X2.25Y-1.5J.5
G1Y0.
G3X1.75Y.5I-.5
G1X.25
G3X-.25Y0.J-.5
G0Z.2
M9
M5
M30
%
Mactec54
Hi....yes, that is understandable......setting the new zero offset for each fixture or job on a batch of work pieces is straight forward.....but do you have to write the entire code sequence at each offset again and again?.....that is the tedious part.
I'm referring to hand written coding......making 20 or so lines of code for the first part and then having to re-write it multiple times is not my cup of tea..........what is the procedure for creating a block of code.......or a macro....that repeats at each offset.....that is my question.
Ian.
There is no magic, that is why I said it is very inefficient way to do programing, you can just cut and paste the first program as many times as you like, then edit it for the different offsets, and of cause you have to set those offset in the control
The most efficient way is using a sub program like this, and or also writing a macro
This program below does the same as the above post, this cuts 3 Parts or as many as you want
%
O1
M98P2L3
G92X.95
M30
O2
N1G17G40G80
T4M6
M8
G54
S3450M3
G90G0X-.25Y0.
G43Z.1H4
G1Z-.5F20.
Y-1.5F60.
G3X.25Y-2.I.5
G1X1.75
G3X2.25Y-1.5J.5
G1Y0.
G3X1.75Y.5I-.5
G1X.25
G3X-.25Y0.J-.5
G0Z.2
M9
M5
G53Y0.
G90
G92X-.85
M99
%
Mactec54
Hi Mac.....cutting and pasting shouldn't be a problem as it's a simple procedure, even if it is inefficient...... you only have to write the original code sequence once for the first part, as the XYZ values will remain the same, and then paste the duplicate for the next part(s) mounted in a separate vice etc. with G55 G56 as the new zero point etc
The pasted code sequence would have the same code values when I set the G54.....55....56 offsets for the next parts.........it will get complicated if I have a dozen parts in separate fixtures or vices and I can see that having a macro would be the way to go.
I think for the real World I live in, making repetition parts won't likely happen and for the main part I would be doing parts singly in a vice with just the G54.
Repetitive operations are not necessarily repetitive parts and can be repetitive milling operations on the same part, like helical boring holes in different positions etc. which requires quite a lot of coding just to get the cutter to the bottom of a hole or though a work piece.
I still don't understand how to create a macro and where/when it gets into a code sequence.
Ian.
Again, if you are using cam , you should have some function to nest that tool path across as many rows and or parts as you need. If you use cad, you should have a function to nest the model across as many rows and or parts. You can g54 and g55 it. You can macro it.You can mirror it in the machine control.
What you can not do is take a prog and add a line of code and magically get 2 parts
WHY???.....surely that is as simple as I can think.
BTW.....the code I write needs to have this function for group coding under one number etc........I don't use a CAM program to do the coding ....yet.
When I was data processing and updating the main frame at my previous work place we had a function called a phantom.........this enabled you to have a collection of data....whatever......and insert it as a single number wherever and as the need arose without having to re-write the entire contents each time.
For me G54....55....56 etc is a powerful function that allows you to reposition a zero point anywhere on the work or mill table etc and go on with the original coding group.....but if I have to write all of the code group each time at each offset position, that is a pain.
So, what is the function to create a macro or sub routine or whatever it's called and have a group of coding within it and how to insert it in a code sequence as a single number.
If that function does not exist...... and I'm sure it does in one form or another......perhaps it could make coding much easier .....and quicker......I think it's like telling Mach3 that when G55 is reached to go back to N10 and repeat all of the coding to N100.....approx. 50 lines of code, whatever.
Ian.
Because you can write a macro that will do 100 parts at a time. I have never need to write macro. But there are tons of valid reasons. Most convo controls are just built in macro. Thats how you can mill any size circle or square with only a few number changes.
So he can write the code for one part. Then write macro to repeat or loop that code as many times as he wants at the locations called in the macro. And you do not have to touch off each off set like you would on a g55 g56.
Same thing with a sub routine. If you find you do the exact same hole size in 10 completely diff parts, you could write a sub prog for that hole. Then just call that sub prog for all those parts
Again, this is just what I have read. I have never needed to write one. With intuitive cam and cad it makes a lot of this stuff just not needed.
Why read that book? Well because out of every well respected prog I have talked to, thats one of two books they recommend. I picked that because he also wrote the best prog book ever created imo.
Macro is not that simple. It is very powerful if you know how to use it. That guy knows how to use it. Avoid the vacuum and read the book.
You keep taking about Macro programing, most controls don't even support Macro programing, unless it has been brought when the machine was purchased
To have this in a control in most cases it is an add on, that machine manufacture's offer, so it is of no use to anyone to learn it unless they know for sure that they can use it
Sub Programs are supported in most controls as part of normal G-Code Programing
Mactec54
I only mentioned writing a Macro because the are some talented machinist's out there that have no trouble in writing a macro, if I had not mentioned it, then my post would not of been complete, I know that you have not clue about what a Macro is but have been talking about it more than I did
I don't care one bit that you talk about it, if you know what you are talking about, I only stated that lots of machines don't have it available because it's an extra cost, that most don't want to pay, I never went into any detail about Macro Programing or I would of written one for you, I know that most don't have access to or can't write a Macro, I gave everyone that have looked at this thread, a choice of what anyone could do with a standard control
Handle only needs to dissect the sub- program I posted and he will be away in no time
All that he needs to learn is below , Just needs to experiment with different X moves, and put his program in the middle
Start of Program
%
01
M98P2L3 ( 3 number of parts you are going to make, this can be any number )
G92X.95
M30
02 ( This is the sub call number this must relate the program number )
End of program
G90
G92X-.85
M99
%
Mactec54
AHAHAHAHA I have enough of a clue to say what I have said. Why would anyone care who talked more about what? This is not a pissing match.
If you had taken the time to explain what you were saying in the first place, there would never have been any confusion.
I never disagreed with anything you said. Except where you were wrong.
Time would be much better served if you put all that macro genius you use. The guy asked a question and all you can manage to do is come at me. Bravo. Well played.