What's new
What's new

Work offset stepping?

WJ Birmingham

Cast Iron
Joined
Jan 21, 2016
Location
Swansea, IL USA
Google and the forum search has failed me...or my googlefu/searchfu is weak. Either way, I could use some help.

We are using 4.5" stock with a 1.875" hole, 8" long. We do a OD/ID/Face, then partial part, 8 milled interpolated holes, then almost fully part, and finally an internal grooving tool with chamfer and part. The grooving tool catches the part. Everything works great.

Here's where we need the help. It's a Fanuc control.

Once we touch off on the initial part, we run the part, then MANUALLY adjust the work offset. We take the work offset, and add 0.342", then run the program again. We continue to do so until the stock is down to 3".

How can we change the work offset at the end of the program, so that we simply hit start and don't have to worry about a missed decimal place being manually input?

Thanks much for any help!!!

-Bill
 
I don't fully understand what you are doing but I would think you could use the Fanuc variables to control your work offsets assuming your 1st part is located in the same spot each time.


Screenshot_20220620-213738_Chrome.jpg


If that won't work, look into G50 work shift. I have never used it so I will let somebody else explain.
 
I know I'm gonna take crap for this, but...
I use G10 all the time for situations like this. I use a variable for the position. That way I can add or subtract as I need to. Something like this:

#100=0 (START POINT)
#101=1 (COUNTER FOR LOOP)
(Your numbers may vary...)

WHILE [#101 LT 14.] DO1
G10 P0 Z#100 (SETS Z TO START POINT)

(RUN PROGRAM, O.D., I.D., FACE, MILL HOLES)

#100=#100+0.342 (Your number)
#101=#101+1 (INCREMENT LOOP)
END1

(THERE'S NO PLACE LIKE)
G28 U0 W0
M30
%


I used your value of 0.342 divided by 5.00 (8-3) inches for the 14 in the WHILE loop. It will loop until #101 = 14 then exit the loop and go home.

You CAN write to the Fanuc variables bigjon mentioned above and write to the variable you need to change, like this:

#5222=#100 (#5222 is G54 Z on my machine)

Use at your own risk. Be careful.
 
I know I'm gonna take crap for this, but...
I use G10 all the time for situations like this.

Curious- what do people have against G10? Aside from direct manipulation of the # variables being easier, is there something wrong with G10?
 
I don't know, but I've seen dudes get pretty emotional about it. I'm kind of stuck with it in this shop. It was 'the way it's done' when I started here, so I just got used to using it. Since I'm the only programmer now I've been slowly migrating everything to G54 but there's still a lot of the old G10 stuff around.
 
You could use a G52 work offset shift in your program. There would be multiple ways to go about implementing it. But IMO it's easier and less complicated than adjusting the work offset with G10 variables. I would probably incorporate some macro expression in the G52 line so it shifts the right amount dependent on how many parts you have ran.
 
I was reading earlier today, that there are different stored variables, ranging from volatile ram to permanent... 4 classes of variables if I recall correctly.

If I can find the WorkOffSet variable... I could do something like this

#100 (generic variable)
#3000 (Work Offset, just using a number pulled from my arse).

#100 = #3000 (Pull work offset and set it to variable #100)
#100 = #100+0.342 (simple math to increment to new offset)
#3000 = #100 (Set Work Offset)

If it works that way, and I can find the work offset, I could put that simple 3 lines of code at the end of the Gcode. It would save a lot of hassle.
 
I was reading earlier today, that there are different stored variables, ranging from volatile ram to permanent... 4 classes of variables if I recall correctly.

If I can find the WorkOffSet variable... I could do something like this

#100 (generic variable)
#3000 (Work Offset, just using a number pulled from my arse).

#100 = #3000 (Pull work offset and set it to variable #100)
#100 = #100+0.342 (simple math to increment to new offset)
#3000 = #100 (Set Work Offset)

If it works that way, and I can find the work offset, I could put that simple 3 lines of code at the end of the Gcode. It would save a lot of hassle.
So how do your propose to set the Workshift Offset back to the initial values when the stock is down to 3"?

If you're using G54, System Variables #5221 to #5223 will be used for axes X to Z respectively. However, you would be better off using the System Variables for G52, #5201 to #5203, so that when you need to reset to the initial Workshift Offset, #5201 to #5203 can simply be set to Zero; there will be no need to explicitly record the initial setting of the Workshift Offset in a Macro Variable.

Regards,

Bill
 
So how do your propose to set the Workshift Offset back to the initial values when the stock is down to 3"?

If you're using G54, System Variables #5221 to #5223 will be used for axes X to Z respectively. However, you would be better off using the System Variables for G52, #5201 to #5203, so that when you need to reset to the initial Workshift Offset, #5201 to #5203 can simply be set to Zero; there will be no need to explicitly record the initial setting of the Workshift Offset in a Macro Variable.

Regards,

Bill

Hello Bill
Is G52 cumulative? Could you just call G52 Zx repeatedly and have it increment the WCS x amount each time or would you have to add to it when you called it the 2,3, etc time?
~aj
 
Hello Bill
Is G52 cumulative? Could you just call G52 Zx repeatedly and have it increment the WCS x amount each time or would you have to add to it when you called it the 2,3, etc time?
~aj
Hello aj
No, an absolute shift amount has to be specified with G52 (Child Offset in Fanuc speak) and then Zero values for the axes involved, to revert back to the parent Workshift Offset.

Regards,

Bill
 
I'm a G10'er as well!
Hardinge showed me how to use it when I got my first Fanuc from them, and anything else seems to be a liability to me.

G10 P0 X0 Z-3.

Subroutine

G10 P0 X0 Z-2.75

Subroutine

G10 P0 X0 Z-2.5


All of my Fanuc lathe programs start with this.
I can go from job to job to job, and I never dink with G54 ever.
I don't have to figger it out when I set the next job up, as it's in the header every time....

I'm guessing that most guys start in the mills, and work their way into the lathes, and are already comfortable with the G54 and whatnot, but G10 is by far the better plan!

I quit recommending it as it seemed no-one ever listens anyhow, so I just let most folks that are asking stroll on past rather than waste my breath.




edit:

Actually, you can enter it as

G10 P0 X0 W.25

as well, with the first one being Z-3. or whatnot.




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

Think Snow Eh!
Ox
 
G10 is a great asset!

In his vid he shows you how to load once into each offset, but if you have more parts than you have offsets, you can reuse any of those offsets as many times as you want.

You can load it right away as he did, and then run your part, and then reload it to the value of the next position, and continue. This way you could essentially run all day with only using G54 (or whatnot).

I know that Psychomill said that he used this method as he ran out of available offsets.


As far as a lathe, absolutely!
All of my G10 equipped lathes (That's all of my Fanuc lathes) have this in the header of every program.
G10 P0 X0 Z-3. will move your Z zero point out 3" from wherever your baseline is.

If your are chopping off worshers this is the safest way to accomplish that.

G10 P0 X0 Z-3.
subroutine
G10 P0 X0 Z-2.3 (or you could use W.5 in stead of the Z value)
subroutine
Rinse/repeat

You would not need to list the X value if you don't want to, but I have adjusted that on a job once years ago as well, but I don't have a good "fer instance" to list right now.


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

Think Snow Eh!
Ox
 
My bad, I didn't realize this was an old thread.
I'm sure that I covered most of that above.

Oh well, my guess is that the sun will still rise, and likely in the east, tomorrow morning anyhow...


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

Think Snow Eh!
Ox
 
Curious- what do people have against G10? Aside from direct manipulation of the # variables being easier, is there something wrong with G10?
1. One has to remember the syntax of G10
2. Reverting back to the original value is not straightforward.
 
You could use a G10 G91 to incrementally back the work coordinate in the negative direction "one part at a a time," then, on the final part use a G10 G90 to put the work coords back to the original value.

When using G10 make sure to cancel with G11.
 
You could use a G10 G91 to incrementally back the work coordinate in the negative direction "one part at a a time," then, on the final part use a G10 G90 to put the work coords back to the original value.

When using G10 make sure to cancel with G11.
You're confusing the use of G10. G11 only applies with the G10 function associated with Programmable Parameter, not when used with Tool or Work Offset entry or modification.

There is absolutely nothing wrong with using G10 to modify Work Shift Offset Coordinates, but I find using G52 simpler to use. The parent Work Shift Offset is not modified, therefore, there is no requirement to reset it to its original setting when finished (no need to record the original value). The syntax for the use of G52 is simpler, in that it's simply G52 coupled with the amount of shift required specified with X, Y, Z etc. Resetting is also simple, only requiring G52 executed with Zero values with the axes address for the axes Offset that is to be reset.

Following is a simple example of shifting the Work-piece Z Zero by -100.0mm, 5 times, then resetting when complete.

#1 = 0 (Initialize the Counter)
WHILE [#1 LT 5] DO1
G52 Z -[#1 * 100.0] (Moves the Work Offset an increment of 100.0 in Z)
------------
------------
------------
------------
#1 = #1 + 1 (Index the Counter by 1)
END1
G52 Z0.0 (Reverts back to the original Work-shift)

Regards,

Bill
 
You're confusing the use of G10. G11 only applies with the G10 function associated with Programmable Parameter, not when used with Tool or Work Offset entry or modification.

There is absolutely nothing wrong with using G10 to modify Work Shift Offset Coordinates, but I find using G52 simpler to use. The parent Work Shift Offset is not modified, therefore, there is no requirement to reset it to its original setting when finished (no need to record the original value). The syntax for the use of G52 is simpler, in that it's simply G52 coupled with the amount of shift required specified with X, Y, Z etc. Resetting is also simple, only requiring G52 executed with Zero values with the axes address for the axes Offset that is to be reset.

Following is a simple example of shifting the Work-piece Z Zero by -100.0mm, 5 times, then resetting when complete.

#1 = 0 (Initialize the Counter)
WHILE [#1 LT 5] DO1
G52 Z -[#1 * 100.0] (Moves the Work Offset an increment of 100.0 in Z)
------------
------------
------------
------------
#1 = #1 + 1 (Index the Counter by 1)
END1
G52 Z0.0 (Reverts back to the original Work-shift)

Regards,

Bill
I've used G52 as well and it seemed to do the job. But G10 worked better (IMO) on multiple fixtures. I could raise the Z to clear, read the G10 commands (My System 11 wanted a G11 for some reason) then hop over and work the other parts.
 








 
Back
Top