What's new
What's new

HELP! PARAMETER tool geometry macro on fanuc 31I

SADRIM

Plastic
Joined
Nov 12, 2018
Hi,

In first i'm sorry for my bad english i'm french guy;

2nd

I m trying to control tool geo offset with a sub programm.
so i don't know how parameter can i used to do it(LOOK #110)
Machine: mori seiki nt4200 DCG FANUC 31iA
This is my program :

%9000
....;
N5;
#100=100;METRIC VALUE FOR LENGHT
#110= (PARAMETER UNKNOW FOR H1...PARAMETER OF TOOL COMPENSATION IN Z);

M98 P9001; )
M99;
G43H1;
;
....;
M30;


%9001
#111=[#110-#100];
#112= ABS[#111];
#113=2;
;
IF [#112 GT #113] GOTO N9;
IF [#112 LE #113] GOTO N10;
;
N9 #3006=1;(wrong tool lenght, control value)
M99 P5;
N10 M99;

THANKS
 
Hi,

In first i'm sorry for my bad english i'm french guy;

2nd

I m trying to control tool geo offset with a sub programm.
so i don't know how parameter can i used to do it(LOOK #110)
Machine: mori seiki nt4200 DCG FANUC 31iA
This is my program :

%9000
....;
N5;
#100=100;METRIC VALUE FOR LENGHT
#110= (PARAMETER UNKNOW FOR H1...PARAMETER OF TOOL COMPENSATION IN Z);

M98 P9001; )
M99;
G43H1;
;
....;
M30;


%9001
#111=[#110-#100];
#112= ABS[#111];
#113=2;
;
IF [#112 GT #113] GOTO N9;
IF [#112 LE #113] GOTO N10;
;
N9 #3006=1;(wrong tool lenght, control value)
M99 P5;
N10 M99;

THANKS

Hello SADRIM,
I'm not sure exactly what you want to do and your Posted Code doesn't give much of a clue. All of the Variables you've used in your example Code are Common, Volatile Variables and would require loading with a value in some way; your example doesn't show that happening.

If you want to get the current Tool Length Offset number, then the value can be read from System Variable #4111. If the current H address was 10, for example, then this information can be obtained as follows:

#1 = #4111

in this case #1 would receive the value 10. You can then use this value to manipulate Offset 10 by accessing the Tool Length Offset System Variable associated with this Offset number.

If you're simply interested in the current Tool Length Offset, it can be accessed directly by reading the value of System Variable #5083, in something like the following way.

#1 = #5083

If the current Tool Length Offset was 105.023, then #1 would receive that value.

System Variables #5081–#5088 are the Variables for Current Tool Length Offsets for axes 1 to 8. The lest significant number in the Variable number is the number of the axis; X being 1, Y - 2, Z - 3 and so on.

Regards,

Bill
 
Hello SADRIM,
I'm not sure exactly what you want to do and your Posted Code doesn't give much of a clue. All of the Variables you've used in your example Code are Common, Volatile Variables and would require loading with a value in some way; your example doesn't show that happening.

If you want to get the current Tool Length Offset number, then the value can be read from System Variable #4111. If the current H address was 10, for example, then this information can be obtained as follows:

#1 = #4111

in this case #1 would receive the value 10. You can then use this value to manipulate Offset 10 by accessing the Tool Length Offset System Variable associated with this Offset number.

If you're simply interested in the current Tool Length Offset, it can be accessed directly by reading the value of System Variable #5083, in something like the following way.

#1 = #5083

If the current Tool Length Offset was 105.023, then #1 would receive that value.

System Variables #5081–#5088 are the Variables for Current Tool Length Offsets for axes 1 to 8. The lest significant number in the Variable number is the number of the axis; X being 1, Y - 2, Z - 3 and so on.

Regards,

Bill

Hi,

Thks for reply

You need more explainations.
I want with that program to control the value in offset with a aproximative tool length to eradicate mistakes from manual imputing of worker and avoid big crash (such tool offset = 0.1 With drill bore OF 100MM length).

i m looking the #5081 and other value in all case are =0
i m looking tomorrow what s happening with #1=#5081. NO time today

30min to write this post with my poor English proficiency...i hope u understand my post and what i try to mean
 
Last edited:
Hi,

Thks for reply

You need more explainations.
I want with that program to control the value in offset with a aproximative tool length to eradicate mistakes from manual imputing of worker and avoid big crash (such tool offset = 0.1 With drill bore OF 100MM length).

i m looking the #5081 and other value in all case are =0
i m looking tomorrow what s happening with #1=#5081. NO time today

30min to write this post with my poor English proficiency...i hope u understand my post and what i try to mean

Hello SADRIM,
If your machine is a 3 or 4 axis machining centre, then its quite likely that only System Variable #5083 will have a value registered. System Variables #5081 to #5088 are System Variables for Tool Length Offsets. Accordingly, the System Variable that will hold a value is the one that is associated with the axis that a Tool Length Offset has been applied to via G43 H_ _. If you were using a 90deg angle Tool, then you would set Tool Length Offset in the axis the tool is angled to.

Unless a Tool Length Offset has been made active in one of the eight axes System Variables #5081 to #5088 are associated with, then their values will be Null (vacant).

Regards,

Bill
 
Are you trying to check the tool offset to make sure the offset is with in a range to make sure a machine does not crash from a operator putting in a wrong offset from a tool bit change?
 
Hello SADRIM,
If your machine is a 3 or 4 axis machining centre, then its quite likely that only System Variable #5083 will have a value registered. System Variables #5081 to #5088 are System Variables for Tool Length Offsets. Accordingly, the System Variable that will hold a value is the one that is associated with the axis that a Tool Length Offset has been applied to via G43 H_ _. If you were using a 90deg angle Tool, then you would set Tool Length Offset in the axis the tool is angled to.

Unless a Tool Length Offset has been made active in one of the eight axes System Variables #5081 to #5088 are associated with, then their values will be Null (vacant).

Regards,

Bill

Hello Bill

I understand better what you had explained to me.
I need to write
G43 H...
#100=#5083
To read value the z offset for the H.. in the current position of head.
true or false?
 
Are you trying to check the tool offset to make sure the offset is with in a range to make sure a machine does not crash from a operator putting in a wrong offset from a tool bit change?

hello,

I'm going to tell you a funny story:
the last week a operator wrote to compense a tool value in z axis in the wrong page :geometric tool offset z, 0.2 enter!! the value normaly equal 140!
i m sure u know what is happened.
 
Hello Bill

I understand better what you had explained to me.
I need to write
G43 H...
#100=#5083
To read value the z offset for the H.. in the current position of head.
true or false?
Hello SADRIM,
True. But then what? For what purpose are you seeking the Tool Length Offset?

I've just read your Post submitted whilst I was typing. To check if a Tool Offset is within range you would have to have a Look Up Table that is maintained with the correct Tool Length Offsets for all tools in the machine. I don't believe System Variables #5081 to #5083 will help you, as the Offset Must be active before it can be Read. Accordingly, the machine has already crashed if the Offset Value was profoundly wrong and has been made active with a Command Block such as:

G43 Z10.0 H01

Given that in most instances the Tool Offset number is (should) be the same as the Tool Number being called, it may be viable for you to get the number of the Tool (just after its been called) and use that number to look up the Tool Offset value that will be applied in the coming few block; this way you are looking at the Offset Value ahead of the possible crash.

It may be better, if you know the Offset Value ahead of time, to load it into the Offset Registry directly from the program using the G10 function, or a Macro Statement directly into the Offset System Variable. Or invest in a Tool Length setter for the machine.


Regards,

Bill
 
Hello SADRIM,
True. But then what? For what purpose are you seeking the Tool Length Offset?

I've just read your Post submitted whilst I was typing. To check if a Tool Offset is within range you would have to have a Look Up Table that is maintained with the correct Tool Length Offsets for all tools in the machine. I don't believe System Variables #5081 to #5083 will help you, as the Offset Must be active before it can be Read. Accordingly, the machine has already crashed if the Offset Value was profoundly wrong and has been made active with a Command Block such as:

G43 Z10.0 H01

Given that in most instances the Tool Offset number is (should) be the same as the Tool Number being called, it may be viable for you to get the number of the Tool (just after its been called) and use that number to look up the Tool Offset value that will be applied in the coming few block; this way you are looking at the Offset Value ahead of the possible crash.

It may be better, if you know the Offset Value ahead of time, to load it into the Offset Registry directly from the program using the G10 function, or a Macro Statement directly into the Offset System Variable. Or invest in a Tool Length setter for the machine.


Regards,

Bill

Hello Bill
I'm not sure I understood your message correctly

all the length of tools that we use are predefined and remain the same a + - 2mm If for example I must mount the tool T1000 IL will always be associated with the same H ... and will always have a fixed length it is never revised; for the same tool but with a different output length it will never bear the same name.
in this way I can in the program compare the length of the tool in the head with the predefined one;
 
Hello Bill
I'm not sure I understood your message correctly

all the length of tools that we use are predefined and remain the same a + - 2mm If for example I must mount the tool T1000 IL will always be associated with the same H ... and will always have a fixed length it is never revised; for the same tool but with a different output length it will never bear the same name.
in this way I can in the program compare the length of the tool in the head with the predefined one;

Hello SADRIM,
Are you saying that every single tool that is used in the machine has a Tool Length that is within +-2.0mm of every other tool used with the machine? Be whatever may, System Variable #5083 will only provide a value after the Tool Length Offset has been made active. As this normally occurs in an axis movement line, such as the following:

G43 Z10.0 H01

if an offset has been registered incorrectly, as in your example from Post #7 where 0.2 was registered instead of the correct value of 140, then the machine will have crashed (unless prevented by an observant operator) before you are able to retrieve a value from System Variable #5083 and make a comparison.

What I am saying is that you can:
1. read the System Variable for Tool Number
2. use the number of the Tool to read the Offset value from the System Variable associated with the Tool Length Offset that has the same number as the Tool
3. compare it with the correct length for the Tool.

Point 3 above is your biggest issue. If the tool lengths for all tools vary by a range of +-2.0mm, then you could use a nominal value in the comparison. However, a 2.0mm error in a tool length has the potential to ruin the workpiece and the tool. To make an accurate comparison, you would have to have a Look Up Table of correct tool lengths for the tools being used. Most machines have an abundance of Tool Length Offsets. Accordingly, you could use Offset in the range that are unlikely to be used for Tool Offsets as your Look Up Table. This method would determine if the Tool Offset is correct before any axis move.

Regards,

Bill
 
Hello SADRIM,
Are you saying that every single tool that is used in the machine has a Tool Length that is within +-2.0mm of every other tool used with the machine? Be whatever may, System Variable #5083 will only provide a value after the Tool Length Offset has been made active. As this normally occurs in an axis movement line, such as the following:

G43 Z10.0 H01

if an offset has been registered incorrectly, as in your example from Post #7 where 0.2 was registered instead of the correct value of 140, then the machine will have crashed (unless prevented by an observant operator) before you are able to retrieve a value from System Variable #5083 and make a comparison.

What I am saying is that you can:
1. read the System Variable for Tool Number
2. use the number of the Tool to read the Offset value from the System Variable associated with the Tool Length Offset that has the same number as the Tool
3. compare it with the correct length for the Tool.

Point 3 above is your biggest issue. If the tool lengths for all tools vary by a range of +-2.0mm, then you could use a nominal value in the comparison. However, a 2.0mm error in a tool length has the potential to ruin the workpiece and the tool. To make an accurate comparison, you would have to have a Look Up Table of correct tool lengths for the tools being used. Most machines have an abundance of Tool Length Offsets. Accordingly, you could use Offset in the range that are unlikely to be used for Tool Offsets as your Look Up Table. This method would determine if the Tool Offset is correct before any axis move.

Regards,

Bill

Hello Bill

Not every single tool just the same name tool. For example tht tool T1000 is all time the same for all machine today or in 5 years. If tool T1000 is a milling cutter 10mm Diameter WITH 30mm max depth cut u can't use the same name for any other tools! When this tool is create all characteristic are unchangeable.

""""What I am saying is that you can:
1. read the System Variable for Tool Number
2. use the number of the Tool to read the Offset value from the System Variable associated with the Tool Length Offset that has the same number as the Tool
3. compare it with the correct length for the Tool.""""

It s what i m trying to do
Check my first post and put #100=#5083
with your informations:
%9000
....;
N5;

G43H1

#100=100;METRIC VALUE FOR LENGHT
#110=#5083;

M98 P9001; )
M99;
;
;
....;
M30;


%9001
#111=[#110-#100];
#112= ABS[#111];
#113=2;
;
IF [#112 GT #113] GOTO 9;
IF [#112 LE #113] GOTO 10;
;
N9 #3006=1;(wrong tool lenght, control value)
M99 P5;
N10 M99;


Why this prog can't work?
 
%9000
....;
N5;

G43H1

#100=100;METRIC VALUE FOR LENGHT
#110=#5083;

M98 P9001; )
M99;
;
;
....;
M30;


%9001
#111=[#110-#100];
#112= ABS[#111];
#113=2;
;
IF [#112 GT #113] GOTO 9;
IF [#112 LE #113] GOTO 10;
;
N9 #3006=1;(wrong tool lenght, control value)
M99 P5;
N10 M99;


Why this prog can't work?


Hello SADRIM,
The following is a simplified version of your logic, but using a Custom G Code to Call Macro Program O9010.

O9000
----------------
----------------
----------------
----------------
N5
G43H1
G101 Z100.0 (CALL MACRO AND PASS DESIRED TOOL LENGTH)
----------------
----------------
----------------
----------------
M30

O9010
#1=ABS[#5083 - #26]
IF [#1 LT 2] GOTO 10
N9 #3006=1 (WRONG TOOL LENGTH – FIX)
M99 P5
N10 M99

You do realize that if either of the following statement:
#112 = ABS[#111]
or
#1=ABS[#5083 - #26]

equates to just 1.999, the tool length will be passed as correct. An error in a tool length of that magnitude in the majority of cases, will ruin the work.

If the following is the literal Message that you want displayed to the operator:

(wrong tool lenght, control value)

there are too many characters; including spaces, only 26 are allowed.

Obviously you know your machine, but the following Command Block:
G43H1
without a Z coordinate will not work on all machines; its parameter dependent. If the parameter is not set to apply the Offset on the next axis move command, the axis will immediately move by the Offset amount. If a positive value, the Z axis will go into Z+ over-travel. If a minus value, the Z axis will travel in a Z- direction and the tool may collide with something.

Regards,

Bill
 
Last edited:
Hello SADRIM,
The following is a simplified version of your logic, but using a Custom G Code to Call Macro Program O9010.

O9000
----------------
----------------
----------------
----------------
N5
G43H1
G101 Z100.0 (CALL MACRO AND PASS DESIRED TOOL LENGTH)
----------------
----------------
----------------
----------------
M30

O9010
#1=ABS[#5083 - #26]
IF [#1 LT 2] GOTO 10
N9 #3006=1 (WRONG TOOL LENGTH – FIX)
M99 P5
N10 M99

You do realize that if either of the your following statement:
#112 = ABS[#111]
or
#1=ABS[#5083 - #26]

equates to just 1.999, the tool length will be passed as correct. An error in a tool length of that magnitude in the majority of cases, will ruin the work.

If the following is the literal Message that you want displayed to the operator:

(wrong tool lenght, control value)

there are too many characters; including spaces, only 26 are allowed.

Obviously you know your machine, but the following Command Block:
G43H1
without a Z coordinate will not work on all machines; its parameter dependent. If the parameter is not set to apply the Offset on the next axis move command, the axis will immediately move by the Offset amount. If a positive value, the Z axis will go into Z+ over-travel. If a minus value, the Z axis will travel in a Z- direction and the tool may collide with something.

Regards,

Bill



Hello bill,

Thank you for your patience

G43H1 without Z value works,no problem
with the 2mm secure we are limiting just all big crash not all crash !
i m agree: crash it s crash but big crash can kill someone or big repair and lot of moneys.
in all program the accosting/piece value is 2MM OR more
this 2MM value not depend me...

No time to control #5083 with your soluce.

THE NEXT WEEK CERTAINLY


A last question what do you think about my english?

Very bad, bad,mediocre, middling not bad or else.?
 
Hello bill,

Thank you for your patience

G43H1 without Z value works,no problem
with the 2mm secure we are limiting just all big crash not all crash !
i m agree: crash it s crash but big crash can kill someone or big repair and lot of moneys.
in all program the accosting/piece value is 2MM OR more
this 2MM value not depend me...

No time to control #5083 with your soluce.

THE NEXT WEEK CERTAINLY


A last question what do you think about my english?

Very bad, bad,mediocre, middling not bad or else.?

AngelW is always super awesome/ amazing detailed knowledge. Super lucky he hangs out here !


@SADRIM your English is understandable but you could also write in French below the line... * So we have both... I don't think a mis-translation will necessarily damage your machine ?


____________________________________________________________________________________________________

* Vous pouvez écrire dans français ici.

Je ne pense pas une mauvaise traduction va endommager votre machine?

Si vous n'êtes pas sûr, alors… Googletranslate French ---> English then to double check; cut and paste... English ---> French (side by side two pages open while in Google translate) that way you can see if what you wrote actually makes sense! :-)

Bon courage !

There are a few French speaking Canadians on PM forum also (maybe ?).
 
Hello bill,

Thank you for your patience

G43H1 without Z value works,no problem
with the 2mm secure we are limiting just all big crash not all crash !
i m agree: crash it s crash but big crash can kill someone or big repair and lot of moneys.
in all program the accosting/piece value is 2MM OR more
this 2MM value not depend me...

No time to control #5083 with your soluce.

THE NEXT WEEK CERTAINLY


A last question what do you think about my english?

Very bad, bad,mediocre, middling not bad or else.?

Hello SADRIM,

Your English is profoundly better than my French.



Hello cameraman,
Quite Off Topic.

In the UK Queen’s Prize Rifle Shooting competition, held at Bisley, Surrey, they have three competitor per target at any one time; one firing a shot, another getting ready to fire a shot and the third, scoring for the person firing the shot. This system progresses in a rotational manner, whereby the person who just fired a shot becomes the scorer for the person who was getting ready to fire a shot and is now about to fire a shot, the person who was last scoring is now getting ready to fire a shot. This routine continues until all three competitors have fired 10 shot.

One year, when an International Competition has being held in conjunction with the Queen’s prize, there happened to be two members of the Canadian Team, who both spoke French, on the same target, with a Brit making up the trio. The competition is individual (no coaching), but there is nothing to stop conversation between the competitor should they wish to. After some time, the Englishman called the Range Officer and complained about the two Canadians conversing in French and wanted it stopped, as he didn’t know if they were coaching each other (predicting the drift due to wind etc.).

The Captain of the Canadian Team (a Canadian Police Officer) was summonsed and asked that he have his two team members stop conversing in French. He briefly consulted the two, then returned to the Range Officer and announce that he would be happy to have the two stop talking in French, just as soon as all the English speaking competitors stopped speaking in English.


Regards,

Bill
 
Hello SADRIM,

Your English is profoundly better than my French.



Hello cameraman,
Quite Off Topic.

In the UK Queen’s Prize Rifle Shooting competition, held at Bisley, Surrey, they have three competitor per target at any one time; one firing a shot, another getting ready to fire a shot and the third, scoring for the person firing the shot. This system progresses in a rotational manner, whereby the person who just fired a shot becomes the scorer for the person who was getting ready to fire a shot and is now about to fire a shot, the person who was last scoring is now getting ready to fire a shot. This routine continues until all three competitors have fired 10 shot.

One year, when an International Competition has being held in conjunction with the Queen’s prize, there happened to be two members of the Canadian Team, who both spoke French, on the same target, with a Brit making up the trio. The competition is individual (no coaching), but there is nothing to stop conversation between the competitor should they wish to. After some time, the Englishman called the Range Officer and complained about the two Canadians conversing in French and wanted it stopped, as he didn’t know if they were coaching each other (predicting the drift due to wind etc.).

The Captain of the Canadian Team (a Canadian Police Officer) was summonsed and asked that he have his two team members stop conversing in French. He briefly consulted the two, then returned to the Range Officer and announce that he would be happy to have the two stop talking in French, just as soon as all the English speaking competitors stopped speaking in English.


Regards,

Bill

That's a great story good laugh at that...

I was sent to one of those ridiculous boarding schools that make you pretend to be soldiers (more like prison really), so we would send a team to Bisley as well. It's kinda weird and unexpected as the targets are the size of table tennis tables and you are just really really far away from the target (in your "Dug out")... So wind is very big deal. Easy to forget that targets on a "Normal" range are scaled. In the armory at the time we had 303 enfields lol then Nato SLR's and (WWII GPMG's etc. (for a laugh)) , not sure what competition weapons are these days (especially as in the U.k. they took ALL our guns away from us).

@Bill awesome story and very telling / lot of truth to that...

__________________________________________________________________________________________________

Kinda off / on topic I have always wondered if in Japan they have a version of PM forum or whether some of the earlier stripped down interface constraints of the Fanuc control was designed to be international … ? Or do German machinists post in German forum somewhere ? IS there a European forum and is English the interlingua or do Belgian machinists just speak any one of four languages they might know... including Flemish and Walloon ?

I have had patents successfully prosecuted and translated into Japanese and granted and just blows me away to have a character based symbolic language interface and be translated both ways with phonemic language like English (one based on sounds) and yet all the technical and legal constructs somehow hang together for something that is normally a bit of a car crash even in one's own language. Kind of blows my mind... Just wondered if the Fanuc control essentially authored by Japanese engineers was designed to be as linguistically sparse and abstract as possible ? Just so it could be international ?

_____________________________________________________________
 
Hello SADRIM,

Your English is profoundly better than my French.

<very good story/ snip>

I got my first degree at the University of Wales college of Cardiff. i.e. Cardiff University.


I'm English speaking but the university was promoting the native language -ish of celtic based Welsh in south Glamorgan, so pretty much everything they could do was bi-lingual Welsh/English. All flyers and printed materials and so on side by side English and Welsh, even my degree certificate is side by side English | Welsh.


So I was wondering for non English speakers for mission critical stuff that you really can't 'eff up or where a misinterpretation results in injury or expensive outcomes whether a poster / responder posts a critical comment in both languages if possible. ---> A bit like your Bisley (shooting) three person rotation story that at least some "Third party" could catch a critical mis-translation or misinterpretation.


What I've found with Google translate if you don't know the "target" language you can translate English (short sentences and grammatical constructs) into the desired language (let's say Russian)… But to check if what you have had translated is garbage to the Russian speaker and reader you then open a second Google translate page that translates from the previously translated Russian back to English...


English ----(Google Translate)---> Target Language (Russian)

Russian translation (from English) ----(Google translate) ---> English


If what you translated makes it through that chain and back again there is a 98% certainty that the Russian reader will understand what you wrote / meant (not using idiomatic phrases).


If on the "inverse" transform from target language back into English it turns into "Broken English" / nearly non sensical then you have try a different combination of English 'Input" words and grammar that can make it through that chain.


Having the two google translate pages open side by side English ---> Russian and Russian ---> English makes cutting and pasting very much faster for checking syntax.

_________________________________________________________________________________________________



Just a thought there are "Peeps" all over the world in non English speaking countries that do kinda get up the proverbial "Creek" with their machines/ processes. Not having a language barrier is helpful, one of the good things about G-code (I guess) and why Japanese and Chinese programmers in general have to learn English and programming in English.
 
Are you trying to check the tool offset to make sure the offset is with in a range to make sure a machine does not crash from a operator putting in a wrong offset from a tool bit change?

YES, it s what i m trying to do. newbie with macro and parameter logique and the best and complet information resource
are in english.

I M SEE YOUR MESSAGE JUST NOW
 








 
Back
Top