What's new
What's new

Fanuc macro system variables about axis position

Yingxi

Plastic
Joined
Aug 14, 2016
Hello, everyone. Recently I have been working on Fanuc macro program which is applied to Fanuc 0i lathe machine. I got know of system variables (#5021-#5035, #5041-#5055, #5061-#5075, #5081-#5095)about axis position from the Fanuc custom macro book written by Peter Smid, but I could not understand the details so that I do not know how to use these variables correctly in programming. I do not know the reference point of these axis information in the lathe, the turret reference point or the tool tip? If I do not use G54 in the lathe, how can I understand #5041 and #5061 in workpiece offset coordinate system?
 
Hello, everyone. Recently I have been working on Fanuc macro program which is applied to Fanuc 0i lathe machine. I got know of system variables (#5021-#5035, #5041-#5055, #5061-#5075, #5081-#5095)about axis position from the Fanuc custom macro book written by Peter Smid, but I could not understand the details so that I do not know how to use these variables correctly in programming. I do not know the reference point of these axis information in the lathe, the turret reference point or the tool tip? If I do not use G54 in the lathe, how can I understand #5041 and #5061 in workpiece offset coordinate system?

I've tried to post a couple of charts as images. The forum re-sizes the images so small that they are unreadable (I shrank them down a bunch to fit).
If you can't read these, send me a PM with your e-mail and I'll send you the PDF that these came from.

Macro Coordinates.jpg
Macro Work Offsets.jpg
 
I've tried to post a couple of charts as images. The forum re-sizes the images so small that they are unreadable (I shrank them down a bunch to fit).
If you can't read these, send me a PM with your e-mail and I'll send you the PDF that these came from.

View attachment 209155
View attachment 209156

I read these charts before, but I cannot understand what these axis positions are related to. These are about the turret reference point or the tool tip?
 
If I do not use G54 in the lathe, how can I understand #5041 and #5061 in workpiece offset coordinate system?

The rule is, one code from each G-code group (except group 0) always remains active until replaced by some other code from the same group. When the execution of a program starts, the default code from each group becomes active, if a code is not stated explicitly. Since G54 is the default in group 14, it remains active even if not commanded explicitly.
It is not a good practice to rely on defaults, since it possible to change some of these through parameters. As a matter of practice, include all necessary codes in the beginning of the program; G54 included.
 
Tool tip.

Does it mean that #5021, #5041 and #5061 are all included tool offset, so that these value can represent axis position of tool tip? Because in mill machine tool, these axis position are about the reference point on the spindle center line, namely the point on the center line of mill tool, so I am confused about what these axis position reference to in the lathe machine tool.
 
Yes.
#5001 (WCS values) does not include tool compensation values.

WCS, G54-G59, establishes a baseline coordinate system. You may have it anywhere you consider appropriate. Tool offsets are added to it to place the tool tips at the correct coordinate positions. You need to command both G54 and T0101, for example, for tool number 1. Thereafter, #5021, #5041 and #5061 store the current position / skip-signal position of the tool tip in the appropriate coordinate system (MCS/WCS).
 
It is same on a milling machine also.
When you command both G54 and G43 H01, for example, for tool number 1, these variables would store the current position of the tool tip.
Since all tools are held by the same spindle in the same manner, xy positions are same for all tools. Only the lengths are different, for which length compensation code G43 is commanded.
 
Yes.
#5001 (WCS values) does not include tool compensation values.

WCS, G54-G59, establishes a baseline coordinate system. You may have it anywhere you consider appropriate. Tool offsets are added to it to place the tool tips at the correct coordinate positions. You need to command both G54 and T0101, for example, for tool number 1. Thereafter, #5021, #5041 and #5061 store the current position / skip-signal position of the tool tip in the appropriate coordinate system (MCS/WCS).

In lathe machine tool, can I just use tool offset to set workpiece coordinate system and let G54 workpiece offset as default zero? I think using tool offset (geometry offset and wear offset) can set up a lathe tool.
 
You can, but it is not a good practice. You would lose the flexibility.
For a workpiece of different length, tool offset procedure would need to be repeated for all tools, for Z0.
Alternatively, you may simply call G54-G59, appropriate for different workpieces. Tool offsets would remain same.
 
It is same on a milling machine also.
When you command both G54 and G43 H01, for example, for tool number 1, these variables would store the current position of the tool tip.
Since all tools are held by the same spindle in the same manner, xy positions are same for all tools. Only the lengths are different, for which length compensation code G43 is commanded.

In milling machine, does these stored variable values include tool radius offset? Speaking in another way, these stored current position is on the center line of the tool or on the cutting edge of the tool?
 
You can, but it is not a good practice. You would lose the flexibility.
For a workpiece of different length, tool offset procedure would need to be repeated for all tools, for Z0.
Alternatively, you may simply call G54-G59, appropriate for different workpieces. Tool offsets would remain same.

Ok, I understand what you said. If I change a workpiece with different length, I can use G54 in Z axis offset. So that I can use the tool offsets that are set up during last workpiece machining.

Sinha, thanks very much for your help!
 
Yes.
#5001 (WCS values) does not include tool compensation values.

WCS, G54-G59, establishes a baseline coordinate system. You may have it anywhere you consider appropriate. Tool offsets are added to it to place the tool tips at the correct coordinate positions. You need to command both G54 and T0101, for example, for tool number 1. Thereafter, #5021, #5041 and #5061 store the current position / skip-signal position of the tool tip in the appropriate coordinate system (MCS/WCS).

Sinha, as you said, #5022 is Z-axis coordinate of tool tip in the machine coordinate system. After thinking in details, I do not think it can be computed, if just G54 workpiece offsets and tool offsets are given. Because we just know the machine coordiante of tool turret reference point and the program point. (zero). Maybe I miss some points, do you know how the machine obtain these values?
 
The reference point of the machine (i.e., the home position) establishes the machine coordinate system (MCS). Since we do not ordinarily change the reference point, MCS remains fixed on a machine.

External coordinate system (ECS) is established by adding the external offsets to the datum of MCS. It is normally kept zero. So, effectively, MCS and ECS coincide.

Workpiece coordinate system (WCS) is established by adding work offsets to the datum of ECS (MCS, if external offsets are zero). Several WCSs can be defined.

In any program, we first choose the appropriate WCS. Tool offsets are added to it to establish the program zero point for each tool.

Refer to Fig. 1 of the pdf.

There is no need to think in terms of tool turret reference point. Fanuc manuals do not use this term (unless I have overlooked).
 
The reference point of the machine (i.e., the home position) establishes the machine coordinate system (MCS). Since we do not ordinarily change the reference point, MCS remains fixed on a machine.

External coordinate system (ECS) is established by adding the external offsets to the datum of MCS. It is normally kept zero. So, effectively, MCS and ECS coincide.

Workpiece coordinate system (WCS) is established by adding work offsets to the datum of ECS (MCS, if external offsets are zero). Several WCSs can be defined.

In any program, we first choose the appropriate WCS. Tool offsets are added to it to establish the program zero point for each tool.

Refer to Fig. 1 of the pdf.

There is no need to think in terms of tool turret reference point. Fanuc manuals do not use this term (unless I have overlooked).

Before the tool is set up for machining a workpiece , how do we define the position of the tool(or the turret)? In another way, what is the coordinate displayed on the CRT refer to, after the machine return zero. I think it's certain that before setting up the tools, the coordinates displayed on CRT is about a specific point of the tool turret relative to the reference point of the machine. Is that right?
 








 
Back
Top