What's new
What's new

Fanuc G-code vs Mazak EIA/ISO

Rolka

Plastic
Joined
Mar 22, 2018
Hello Everyone,


My current project is to reprogram threading on certain part from Mazatrol to EIA macro in order to improve reliability of the process.
I want to cut heavy multistart widened ACME thread the way that one pass is taken progressively deeper on each thread lead until all is finished (impossible in Mazatrol). Therefore I created a macro program that is supposed to do the job, with variables defining required cutting parameters. Macro program works fine on FANUC Oi-TC machine, but trying to run it on Mazak (Matrix Nexus) results in alarms.

Examples:

811 ILLEGAL O/N NUMBER (6522, 222,1)
line N222 looks like that: N222 (DATA VERIFICATION)
after getting rid of whole line - I am getting next error :

806 ILLEGAL ADDRESS (6522,117,8)
line N117 looks like that: N117#609=.0005 (AMOUNT FOR FINISH ALLOWANCE ---> R IN 1ST LINE OF G76 IN FANUC)
After removing this - controller alarms out on next line containing macro variable, and so on.

Questions:

1. Where on the web can I find info about differences between FANUC G-code and Mazak EIA/ISO flavour?
2. Are there differences in EIA/ISO syntax/capabilities between different Mazak controllers?
3. Mazak EIA programming manuals I have looked through do not specify whether Q value (shift angle of thread start) in G32 threading cycle should be with or without decimal point. I am assuming decimal point is not allowed because that`s how it works on FANUC, but I have to be sure (and I do not really know how to check it without actually cutting and possibly scrapping a part. Any ideas?).
 
First of all, you CAN do that in Mazatrol. Secondly, why would you want subsequent passes deeper instead of shallower? The idea is to maintain the same material volume for each pass. As a general rule:
If you cannot do it in Mazatrol, it is because you do not know how to do it in Mazatrol.
 
Hello Everyone,


My current project is to reprogram threading on certain part from Mazatrol to EIA macro in order to improve reliability of the process.
I want to cut heavy multistart widened ACME thread the way that one pass is taken progressively deeper on each thread lead until all is finished (impossible in Mazatrol). Therefore I created a macro program that is supposed to do the job, with variables defining required cutting parameters. Macro program works fine on FANUC Oi-TC machine, but trying to run it on Mazak (Matrix Nexus) results in alarms.

Examples:

811 ILLEGAL O/N NUMBER (6522, 222,1)
line N222 looks like that: N222 (DATA VERIFICATION)
after getting rid of whole line - I am getting next error :

806 ILLEGAL ADDRESS (6522,117,8)
line N117 looks like that: N117#609=.0005 (AMOUNT FOR FINISH ALLOWANCE ---> R IN 1ST LINE OF G76 IN FANUC)
After removing this - controller alarms out on next line containing macro variable, and so on.

Questions:

1. Where on the web can I find info about differences between FANUC G-code and Mazak EIA/ISO flavour?
2. Are there differences in EIA/ISO syntax/capabilities between different Mazak controllers?
3. Mazak EIA programming manuals I have looked through do not specify whether Q value (shift angle of thread start) in G32 threading cycle should be with or without decimal point. I am assuming decimal point is not allowed because that`s how it works on FANUC, but I have to be sure (and I do not really know how to check it without actually cutting and possibly scrapping a part. Any ideas?).

The difference may be in the variables themselves. While certain Fanuc variable addresses pertain to axis movement, current position, etc, the Mazatrol may have different addresses for similar functions. Do you have documentation?
 
Threading with Q with a decimal point is allowed if parameter F167 bit 0 = 1.

Also a little confused on why you want to go deeper on subsequent passes. Going shallower is very doable in mazatrol with the right cutting pattern.

G32 and G76 to my knowledge behave very similarly on a Mazak control to a Fanuc. Posting your program will help a lot.
 
Secondly, why would you want subsequent passes deeper instead of shallower? The idea is to maintain the same material volume for each pass.

Also a little confused on why you want to go deeper on subsequent passes.
Each subsequent pass will be progressively SMALLER, of course. My mistake.

Here`s the code:

-----------------------------------------------------------------------------------------


O6522
(*********)
(NOT PROVEN)
(****************************)

(INSERT - ******************** )(***********)
(DRAWING NO- ************)

(DECREASING DEPTH OF CUT - NOT A FANUC G76 ALGORITHM)
(FANUC ALGORITHM WOULD NOT BE SUITABLE FOR THIS JOB - DOC DECREASES TOO FAST)

(MACRO DECREASES DOC FROM DEPTH OF 1ST CUT UNTIL MIN DOC IS REACHED AT NEXT-TO-LAST PASS)
(,MAINTAINING MORE EVEN LOAD ON THE INSERT)
(,AND THEN CUTS AMOUNT SET FOR FINISH ALLOWANCE AS VERY LAST CUT)

(PROGRAM USES MACRO VARIABLES)
(INPUT REQUIRED VALUES IN LINES N110-N118 BELOW: )
N110#600=.0 (INITIAL THREAD HEIGHT ---> THREAD ALREADY CUT, IF ANY)
N111#601=.2085 (TARGET THREAD HEIGHT ---> HGT IN MAZATROL; P IN 2ND LINE OF G76 IN FANUC)
N115#606=.01 (DEPTH OF FIRST CUT ---> Q IN 2ND LINE OF G76 IN FANUC)
N116#607=.006 (MINIMUM DEPTH OF CUT ---> Q IN 1ST LINE OF G76 IN FANUC)
N117#609=.0005 (AMOUNT FOR FINISH ALLOWANCE ---> R IN 1ST LINE OF G76 IN FANUC)
N118#650=.180 (NOMINAL INSERT ROOT WIDTH. MAKE IT SMALLER TO CUT WIDER THREAD)

GOTO222 (DATA VERIFICATION)
N120

(CALCULATIONS)
#621= [#606+#607]/2(AVERAGE DOC)
#617= [#601-#600-#609](HGHT TO CUT MINUS FINISH ALLOWANCE)
#619= FUP [#617/#621](NUMBER OF CUTS = HGHT TO CUT/AVERAGE DOC ROUNDED UP )
#616= [#606-#607]/#619(DECREMENT OF EACH PASS)
#630= [#619*#616]+#607(CURRENT DOC)

G54
G28 U0.
G90 G40 G50 S900

G28 U0.
M42 (CHANGE TO APPROPRIATE GEAR ON MAZAK)
G0 T0707 (TOOL CALL OUTPUT TO MAIN PROGRAM AFTER TESTS ARE FINISHED)
G97 S210 M03
#618= [[7.671-2*#600-2*#617]+2*[#619*#621]-2*[#621-#607]]

(DECREASING PASSES)
WHILE [#619GE0. ]DO1
#620=0 ( C-AXIS THREAD START POSITION)
WHILE [#620LE241000 ]DO2

G0 Z [1.0-0.](CENTRAL CUT)
G0 X8.2
G0 X [#618] M8
G32 X [#618] Z-5.75 Q [#620] F1.785
G0 X8.2

G0 Z [1.0+[[-.366+#650]/2]](LHS CUT)
G0 X8.2
G0 X [#618] M8
G32 X [#618] Z-5.75 Q [#620] F1.785
G0 X8.2

G0 Z [1.0+[[.366-#650]/2]](RHS CUT)
G0 X8.2
G0 X [#618] M8
G32 X [#618] Z-5.75 Q [#620] F1.785
G0 X8.2
#620= [#620+120000]
END2

#619= [#619-1.]
#630= [#630-#616]
#618= [#618-2*#630]
END1

(---------------------)
(LAST PASS)
#618= [7.671-2*#601]
#620=0
WHILE [#620LE241000 ]DO1
G0 Z [1.0+[[-.366+#650]/2]](LHS CUT)
G0 X8.2
G0 X [#618] M8
G32 X [#618] Z-5.75 Q [#620] F1.785
G0 X8.2
G0 Z [1.0-0.](CENTRAL CUT)
G0 X8.2
G0 X [#618] M8
G32 X [#618] Z-5.75 Q [#620] F1.785
G0 X8.2

G0 Z [1.0+[[.366-#650]/2]](RHS CUT)
G0 X8.2
G0 X [#618] M8
G32 X [#618] Z-5.75 Q [#620] F1.785
G0 X8.2
#620= [#620+120000]
END1
(--------------------------)

M9
G28 U0.
G0 Z2.
M0

GOTO223
N222 (DATA VERIFICATION)

IF [#600LT0.0 ]THEN#3000=1 (INITIAL THREAD HEIGHT MUST NOT BE < 0)
IF [#600GE#601 ]THEN#3000=1 (INITIAL THREAD HEIGHT MUST BE LESS THAN TARGET THRD HGHT)
IF [#606LT#607 ]THEN#3000=1 (DEPTH OF FIRST CUT MUST BE NO LESS THAN MINIMUM DOC)
IF [#601LE.205 ]THEN#3000=1 (WRONG THREAD HEIGHT)
IF [#601GT.2105 ]THEN#3000=1 (WRONG THREAD HEIGHT)
IF [#606LT.003 ]THEN#3000=1 (WRONG DEPTH OF FIRST CUT)
IF [#606GT.015 ]THEN#3000=1 (WRONG DEPTH OF FIRST CUT)
IF [#609GT.002 ]THEN#3000=1 (WRONG AMOUNT FOR FINISH ALLOWANCE)
IF [#609LT.0 ]THEN#3000=1 (WRONG AMOUNT FOR FINISH ALLOWANCE)
IF [#650LT.175 ]THEN#3000=1 (WRONG INSERT ROOT WIDTH)
IF [#650GT.195 ]THEN#3000=1 (WRONG INSERT ROOT WIDTH)
GOTO120
N223

M30 (--> M99 AFTER TESTS ARE FINISHED)
%


----------------------------------------------------------------------------------------------------------
Program comments are self-explanatory I think.
After tested and proven - program will be turned into G65 macro call, with N110-N118 variables made local.
Then it will be used in 2 or 3 calls for 2 tools (rougher and finisher are involved).


I suppose there is a mazak eia/iso programming manual. Do you have that? I think I’d look there.
EIA programming manual does not offer much help in questions I have asked.

First of all, you CAN do that in Mazatrol.
Note that tool widens one start to required width (3 passes) then repeats it on 2 remaining starts, and repeats whole procedure with diminishing depth until set thread height is cut.
I still claim that it is impossible to achieve in Mazatrol. I am not Mazatrol guy though.
 
Secondly, why would you want subsequent passes deeper instead of shallower? The idea is to

maintain the same material volume for each pass.

Also a little confused on why you want to go deeper on subsequent passes.

Each subsequent pass will be progressively SMALLER, of course. My mistake.

Here`s the code:

-----------------------------------------------------------------------------------------


O6522
(*********)
(NOT PROVEN)
(****************************)

(INSERT - ******************** )(***********)
(DRAWING NO- ************)

(DECREASING DEPTH OF CUT - NOT A FANUC G76 ALGORITHM)
(FANUC ALGORITHM WOULD NOT BE SUITABLE FOR THIS JOB - DOC DECREASES TOO FAST)

(MACRO DECREASES DOC FROM DEPTH OF 1ST CUT UNTIL MIN DOC IS REACHED AT NEXT-TO-LAST PASS)
(,MAINTAINING MORE EVEN LOAD ON THE INSERT)
(,AND THEN CUTS AMOUNT SET FOR FINISH ALLOWANCE AS VERY LAST CUT)

(PROGRAM USES MACRO VARIABLES)
(INPUT REQUIRED VALUES IN LINES N110-N118 BELOW: )
N110#600=.0 (INITIAL THREAD HEIGHT ---> THREAD ALREADY CUT, IF ANY)
N111#601=.2085 (TARGET THREAD HEIGHT ---> HGT IN MAZATROL; P IN 2ND LINE OF G76 IN FANUC)
N115#606=.01 (DEPTH OF FIRST CUT ---> Q IN 2ND LINE OF G76 IN FANUC)
N116#607=.006 (MINIMUM DEPTH OF CUT ---> Q IN 1ST LINE OF G76 IN FANUC)
N117#609=.0005 (AMOUNT FOR FINISH ALLOWANCE ---> R IN 1ST LINE OF G76 IN FANUC)
N118#650=.180 (NOMINAL INSERT ROOT WIDTH. MAKE IT SMALLER TO CUT WIDER THREAD)

GOTO222 (DATA VERIFICATION)
N120

(CALCULATIONS)
#621= [#606+#607]/2(AVERAGE DOC)
#617= [#601-#600-#609](HGHT TO CUT MINUS FINISH ALLOWANCE)
#619= FUP [#617/#621](NUMBER OF CUTS = HGHT TO CUT/AVERAGE DOC ROUNDED UP )
#616= [#606-#607]/#619(DECREMENT OF EACH PASS)
#630= [#619*#616]+#607(CURRENT DOC)

G54
G28 U0.
G90 G40 G50 S900

G28 U0.
M42 (CHANGE TO APPROPRIATE GEAR ON MAZAK)
G0 T0707 (TOOL CALL OUTPUT TO MAIN PROGRAM AFTER TESTS ARE FINISHED)
G97 S210 M03
#618= [[7.671-2*#600-2*#617]+2*[#619*#621]-2*[#621-#607]]

(DECREASING PASSES)
WHILE [#619GE0. ]DO1
#620=0 ( C-AXIS THREAD START POSITION)
WHILE [#620LE241000 ]DO2

G0 Z [1.0-0.](CENTRAL CUT)
G0 X8.2
G0 X [#618] M8
G32 X [#618] Z-5.75 Q [#620] F1.785
G0 X8.2

G0 Z [1.0+[[-.366+#650]/2]](LHS CUT)
G0 X8.2
G0 X [#618] M8
G32 X [#618] Z-5.75 Q [#620] F1.785
G0 X8.2

G0 Z [1.0+[[.366-#650]/2]](RHS CUT)
G0 X8.2
G0 X [#618] M8
G32 X [#618] Z-5.75 Q [#620] F1.785
G0 X8.2
#620= [#620+120000]
END2

#619= [#619-1.]
#630= [#630-#616]
#618= [#618-2*#630]
END1

(---------------------)
(LAST PASS)
#618= [7.671-2*#601]
#620=0
WHILE [#620LE241000 ]DO1
G0 Z [1.0+[[-.366+#650]/2]](LHS CUT)
G0 X8.2
G0 X [#618] M8
G32 X [#618] Z-5.75 Q [#620] F1.785
G0 X8.2
G0 Z [1.0-0.](CENTRAL CUT)
G0 X8.2
G0 X [#618] M8
G32 X [#618] Z-5.75 Q [#620] F1.785
G0 X8.2

G0 Z [1.0+[[.366-#650]/2]](RHS CUT)
G0 X8.2
G0 X [#618] M8
G32 X [#618] Z-5.75 Q [#620] F1.785
G0 X8.2
#620= [#620+120000]
END1
(--------------------------)

M9
G28 U0.
G0 Z2.
M0

GOTO223
N222 (DATA VERIFICATION)

IF [#600LT0.0 ]THEN#3000=1 (INITIAL THREAD HEIGHT MUST NOT BE < 0)
IF [#600GE#601 ]THEN#3000=1 (INITIAL THREAD HEIGHT MUST BE LESS THAN TARGET THRD HGHT)
IF [#606LT#607 ]THEN#3000=1 (DEPTH OF FIRST CUT MUST BE NO LESS THAN MINIMUM DOC)
IF [#601LE.205 ]THEN#3000=1 (WRONG THREAD HEIGHT)
IF [#601GT.2105 ]THEN#3000=1 (WRONG THREAD HEIGHT)
IF [#606LT.003 ]THEN#3000=1 (WRONG DEPTH OF FIRST CUT)
IF [#606GT.015 ]THEN#3000=1 (WRONG DEPTH OF FIRST CUT)
IF [#609GT.002 ]THEN#3000=1 (WRONG AMOUNT FOR FINISH ALLOWANCE)
IF [#609LT.0 ]THEN#3000=1 (WRONG AMOUNT FOR FINISH ALLOWANCE)
IF [#650LT.175 ]THEN#3000=1 (WRONG INSERT ROOT WIDTH)
IF [#650GT.195 ]THEN#3000=1 (WRONG INSERT ROOT WIDTH)
GOTO120
N223

M30 (--> M99 AFTER TESTS ARE FINISHED)
%


----------------------------------------------------------------------------------------------------------
Program comments are self-explanatory I think.
After tested and proven - program will be turned into G65 macro call, with N110-N118 variables made local.
Then it will be used in 2 or 3 calls for 2 tools (rougher and finisher are involved).

First of all, you CAN do that in Mazatrol.
(....)
As a general rule:If you cannot do it in Mazatrol, it is because you do not know how to do it in Mazatrol.
Note that tool widens one start to required width (3 passes) then repeats it on 2 remaining starts, and repeats whole procedure with diminishing depth until set thread height is cut.
I still claim that it is impossible to achieve in Mazatrol. I am not Mazatrol guy though.


I suppose there is a mazak eia/iso programming manual. Do you have that? I think I’d look there.
EIA programming manual does not offer much help in questions I have asked.
 
Mazak EIA is essentially the same as Fanuc. My best guess would be that you do not have extended macros option turned on. Try using #100 or #500 instead of #600
 
Mazak EIA is essentially the same as Fanuc. My best guess would be that you do not have extended macros option turned on. Try using #100 or #500 instead of #600

That's a good point. Can you actually SEE #600-#999 on the macro-variable page?

Also - Can you confirm that the machine will accept IF/THEN statements? I personally have not had luck with these, and instead would have to structure my IF conditional statements another way...
 
I use IF THEN statements on T-Plus and Fusion controls. I don't know about Nexus though. I just looked at one of my Fusion controls and 600 variables are an option. On that control it is soft keys: Diagnos, version, option to see what options are active.
 
I use IF THEN statements on T-Plus and Fusion controls. I don't know about Nexus though. I just looked at one of my Fusion controls and 600 variables are an option. On that control it is soft keys: Diagnos, version, option to see what options are active.

You can use IF-GOTO on the older controls, "THEN" macro command was only added a year or 2 ago to the Smooth control.
 
You cannot use IF-THEN statements on Matrix nexus, that is only possible on a Smooth control.

Why would you need to? We have already covered the fact that Mazatrol does exactly what he wants without macros. He just does not understand the control. He does not need a macro. Why by a mazatrol lathe if you do want to learn how to use it? Kind of silly, if you ask me. I ran mazaks for 15 years and never once needed an EIA program to get the job done efficiently.
We are running a long shaft in a 3 axis mazak lathe with a sub spindle today. Multiple transfers, milling, tailstock AND threading. No EIA. Houston, I think you are the problem.
 
Why would you need to? We have already covered the fact that Mazatrol does exactly what he wants without macros. He just does not understand the control. He does not need a macro. Why by a mazatrol lathe if you do want to learn how to use it? Kind of silly, if you ask me. I ran mazaks for 15 years and never once needed an EIA program to get the job done efficiently.
We are running a long shaft in a 3 axis mazak lathe with a sub spindle today. Multiple transfers, milling, tailstock AND threading. No EIA. Houston, I think you are the problem.

I don't personally care how anybody does it if it achieves the end result they want. I was just clearing up some misconceptions on the EIA/Macro side.

I realize we also never actually said HOW it was doable in mazatrol. The standard threading pattern #0 will take gradually smaller passes until it gets closer to the finished diameter. For heavier threads like the OP is doing I prefer pattern #2 "constant area", which takes inversely propotional DOC so you have a consistent load. From a quick glance that appears to be what the OP is looking to do.
 
Yes. All he had to do was look at the threading page in the manual. It is self explanatory.
We have a lot of monkeys in our shop that do nothing but stare at their cell phones all day long. You never see them pick up a manual. So, whenever something needs to be done they have to call the programmer. Now this fella is showing the same symptoms. He has not read the manual, so he is wasting his shop's valuable time trying to assfuck his program instead of writing 30 seconds of mazatrol code, and then saying it is the machine's fault.
 
Why would you need to? We have already covered the fact that Mazatrol does exactly what he wants without macros.
Nobody "covered" such "fact".
It was only you who claimed that Mazatrol does the job.

Looks like you are unable to read the program I posted and visualize the problem.

So again:
- triple-start thread, ca. .210 deep
- insert width is .180 whereas thread root width is .366, so it has to be widened by taking 3 passes on each start
- feddrate is aggresive
- Mazatrol offers multistart threading, but it cuts each start to full depth. Then we offset SPT-Z and cut to full depth again. That overloads insert, especially at first unit. As a result - DEP-1 , DEP-2 are not optimal, as we try to prevent insert failure.
- sure we can divide the whole process into zillion of units and cut further on each unit, but it will always be far from optimal strategy.
- the answer? Custom macro program that lets cut each start and each pass to set depth, then set new depth ad repeat, until finished.


I ran mazaks for 15 years and never once needed an EIA program to get the job done efficiently.
The fact that you you have survived in the business for 15 years without using G-code does not mean that Mazatrol is so omnipotent. It only means that you do relatively trivial tasks. At certain level of complexity - conversational will fail to G-code and macro.


We are running a long shaft in a 3 axis mazak lathe with a sub spindle today. Multiple transfers, milling, tailstock AND threading.
AND threading ? REALLY? Yo must be a genius!
 








 
Back
Top