i know that u need to use a main program for the count and a sub program for the machining but could any one give me a Ex. i am using a yama seiki with a fanuc series oi-tc
i know that u need to use a main program for the count and a sub program for the machining but could any one give me a Ex. i am using a yama seiki with a fanuc series oi-tc
Are you asking how you code the program to count the parts?
Stevo
i have figured it out using a main and sub program but if u know how to do it in one program that would be helpful
thanks
You still haven't told me what you are trying to do or what you figured out. Are you trying to setup something to count parts? Or are you coding the program to machine a part then index the bar and start over again?
You can also post your code so we can take a look at it and see about putting it into 1 program.
Stevo
the way i am doing it seems to work but would you know anything about a G84 for tapping and if so can you give a Ex for a M6x1 thanks
First you need to figure out your feed based on the speed you want to use. If your machine is in inch mode. Your thread is M6x1 so you need to take 1/25.4=.03937. multiply that by the speed you choose say 100. So your s&f are F3.937 S100.
G0G90X0Y0Z3.—position tool 3” above and sets “initial level”
M3S100---spindle on
M29---rigid tap mode
G98G84Z-.5R.1F3.937M8—G98 is "initial level" return(G99 is R-level return), Z tap depth
M30
Most fanucs default code is G98 so you may or may not need to use it depending on which your prefer.
I am still waiting and curious what your original issue/question actually was. What were you trying to do that now works?
Stevo
my original question was how do a get the machine to go to the top of the program and start again with out having to do anything. what i did to salve this to wright a little mane program with called up a sub and told the machine how many time to repeat the sub program. but was wondering if there is a way to do this with out having a sub and main program (all in one)
thank for the info on rigid tapping.
i am new to the cnc part of machining as the guy that used to run these machines left and i was elected to jump in and i great appreciate the help that you have given me today
Thanks
Kevin
You want everything in one program? I think the only solution is buy a Haas.
The Haas allows you to do a local subroutine call, M97 Pnnnn where the nnnn is a line number in your main program. Normally I put them at the bottom after the M30 so a program looks like this:
O00000
Comments, etc, set work zero, enter tool diameters, whatever.
M97 P1000 L10
G28
M30
----
N1000
This is the program that does the part
M99 sends it back to the M97 line until L is counted to zero then to the line below.
Much, much more convenient than having two separate programs.
An open mind is a virtue...so long as all the common sense has not leaked out.
that does not help as i don't have a haas TC and i don't like the haas machines as we have a hass tool room mill and from my experiences it a poor quality machine that is cheaply made will nosey swiss motor thanks any way
Kevin,
You’re more than welcome for the help.
I got ya now. 2 programs are fine for what you are trying to do. The 2 main ways to accomplish what you are doing is the way you are doing it or writing some macro code to jump to the beginning of the program that way it can be in 1 program. An example of something like this would be.
#1=5(number or parts)
#2=0(counter)
N1
…
…your machining code here.
#2=#2+1
IF[#2LT#1]GOTO1
M30
#2 will count by 1 everytime that you run a part(your machining code). Once #2 has reached the same value as #1 the program will no longer jump to the N1 address and it will simply read the M30 and end the program.
Stevo
M99 instead of M30 at the end of the program will run it again.
Could you try M99 L10 at the end and see if it runs 10 times instead of indefinatley?
A quick experiment:
O0001;
G4 X2.;
M99 L5;
Also if you have "memory restart" mode. (I am pretty sure every Yama Seiki lathe I have seen has this) I believe you can preset your "parts required" on the settings page and it will run that many cycles. A quick call to Yama Seiki should verify this.
Note: this is not the "memory restart" mode used to continue in a program when you change a tool etc. this is the mode that would be run with barfeeders to continually restart program.
On Fanuc, you have system variables for no. of parts required and no. of parts produced, in the current machining session. You can store a desired value for no. of parts required. The no. of parts produced automatically increments whenever M02/M30/M-code defined in a parameter is executed (You can define, say, M100 for this purpose). You can compare the two variables, for terminating the program execution (which is run in a loop).
Thanks to all for the vary useful info
Your welcome.
Stevo