What's new
What's new

G10 type programming help

beege

Stainless
Joined
May 18, 2007
Location
Massachusetts
I haven't touched a Yasnac in a very long time, but on the Fanuc and Haas, G52 doesn't "cancel" an offset. It makes a "child coordinate system" from the current active Work Offset (like G54). You can create as many G52's as you need and repeat patterns all over the place. A G52X0Y0 resets the child coordinate system to zero. Yasnac? Not sure.
 

Myrmidon

Cast Iron
Joined
May 5, 2010
Location
Wisconsin
G52 cancells fixture offsets, it does not modify anything. G53 is for ignoring any fixture offsets or coordinate settings, such as G92, on that line of code, it does not modify anything. The only way to get back to the original setting with G10 is to set it, hence the 4th to last line in my program, it really needs to be just below the safe line too for safety.

sinha and Myrmidon - Ok, so you say there is a better way to do this than using G10, how? As I said earlier incremental programs are a no go.


On every Fanuc or Mitsubishi I've run G52 was a local coordinate shift, use whatever the G command is for local coordinate shift on your control.

I completely missed where you said Yasnac sorry about that.

I don't know offhand what the code is for that control, but I've never run a CNC that did not have local coordinate shifting, so I'll assume it has it (and probably putting my foot in my mouth again in doing so)

If that does not work I would write the sub in away where it records the starting XY and works in absolute from there with variables most likely.
 

DavidScott

Diamond
Joined
Jul 11, 2012
Location
Washington
On my Yasnacs G52 cancells the fixture offsets. The only Fanuc experience I have is with 3 controls. I will have to look in the manual for local coordinate shift.
 

Vancbiker

Diamond
Joined
Jan 5, 2014
Location
Vancouver, WA. USA
You can set a coordinate shift in Yasnac by assignment of system variables.

#2500 = X shift
#2600 = Y shift
#2700 = Z shift

These were for the old MX1-MX3 controls. Not certain if they carried it forward into the J series. Also you would need the User Macro option for them to be usable.
 

beege

Stainless
Joined
May 18, 2007
Location
Massachusetts
On my Yasnacs G52 cancells the fixture offsets. The only Fanuc experience I have is with 3 controls. I will have to look in the manual for local coordinate shift.

According to a manual I found online, G52Q2 is a shift from the current coordinate system, and not a cancellation. G52 by itself (without Q2) cancels the current coordinate system. Hope you find the same to be true.
 

DavidScott

Diamond
Joined
Jul 11, 2012
Location
Washington
You can set a coordinate shift in Yasnac by assignment of system variables.

#2500 = X shift
#2600 = Y shift
#2700 = Z shift

These were for the old MX1-MX3 controls. Not certain if they carried it forward into the J series. Also you would need the User Macro option for them to be usable.
Can you set these system variables from the program or do you have to manually input them? I am pretty sure they would apply to both of my controls and they both have macros.
 

DavidScott

Diamond
Joined
Jul 11, 2012
Location
Washington
According to a manual I found online, G52Q2 is a shift from the current coordinate system, and not a cancellation. G52 by itself (without Q2) cancels the current coordinate system. Hope you find the same to be true.
Thank you, this looks like the best way to do this, so far. I didn't know about this command. This is also in my manual so I will be trying it out.
 

HuFlungDung

Diamond
Joined
Jan 19, 2005
Location
Canada
I don't understand why not edit the MCS? That's what it's there for?
It's not going to edit the "Machine" co-ordinates. It's not like the machine doesn't know where it's at as far as "end of travel" and such. You're just modifying the values that "we" see and use. I kan't imagine that any tool change macro is going to mess up if you have the Z offset. ???

And then when you call a G10 P0 X0 Y0 at any point in the program (or even in MDI) you go back to normall.
Just start all programs and whatnot with a G10 P0 X0 Y0 Z0 for a blanket "reset" to make sure that everybody is where it's sposed to be. No differn't than your other G90 G20 and whatnot prerequisites.


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

Think Snow Eh!
Ox

Somewhere 'in the background', there has to be an immutable machine coordinate system against which all offsets are based. On a modern CNC, using G92 doesn't actually change the MCS, it is saved as a universal offset to the G53 (essentially renames the display coordinates but does not change the real MCS datum), but on old cncs (like Bandit), G92 actually created the MCS every time it was invoked. That's why you could get the tool or table position 'lost' if the G92 was executed at some random position. I'd literally have to home the machine to find the machine datum, before I could create the MCS with a G92.

Using G92 on a modern controller is a piece of cake by comparison, because the G53 is always available in the background to get you back on course if required. But the G53 MCS is so handy because it is immutable.
 

Vancbiker

Diamond
Joined
Jan 5, 2014
Location
Vancouver, WA. USA
I will have to look into this. I have never done macros so there will be a learning curve. Any chance of a sample program inputting and using the variables?

To shift all fixture offsets 1" X positive you would add this to your program at the point you want the shift invoked.

#2500=1.

Now G54-G59 will be shifted.

To change just one fixture offset you would write to its specific variable. For example to set G59 Y to -3.5" you would write..

#2606=-3.5

If you wanted to shift G59 Y by -3.5" you would write..

#2606=#2606-3.5
 

Needshave

Aluminum
Joined
Oct 20, 2009
Location
MA
G52 Q2 will shift from the current work coordinate on the J300 like stated in previous posts. You can drop the M98 sub programs and use G25 P Q for local sub programs. Something like this.

O1(ENGRAVE PT HOLDERS)
G0 G17 G40 G49 G53 G80 G90 X-10. Y0 Z0
G10Q2P6X3.332Y5.9522 ( Set the coordinates to a known position on the fixture G59)

T7 M6(ENGRAVER)
G52 Q2 X-3.175Y.6 (SHIFT WORK OFFSETS)
G0 G43 X-.0466 Y.423 Z.1 H7 S15000 M3
M8
N10
(TOOLPATH)
N20
G52 Q2 (X Y SHIFT AMOUNT)
G25 P10 Q20 (RUN CODE FROM N10 TO N20)
G52 Q2 (X Y SHIFT AMOUNT)
G25 P10 Q20(RUN CODE FROM N10 TO N20)
G52 X0 Y0 (GO BACK TO G59)
M9
M5
G0 G49 G53 X-10. Y0 Z0
M2
 

Ox

Diamond
Joined
Aug 27, 2002
Location
West Unity, Ohio
Is the G52 cancelled at M2/M30/RESET automatically?
Or does it need the G52 X0 Y0 line?

If so - I'm not seeing any difference between that and the G10 app. ???


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

Think Snow Eh!
Ox
 

Needshave

Aluminum
Joined
Oct 20, 2009
Location
MA
I cancel the G52 shift out of habit. It may be reset with M30,M2 or Reset. In my sample I left his G10 to set G59. It's not needed if you type the position into G59.
 

Ox

Diamond
Joined
Aug 27, 2002
Location
West Unity, Ohio
"It may be reset ... "

Meaning that "yes - it will" or that you're not sure, and cancel it yourself to be sure and out of habit?

Yasnac, or Fanuc too?


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

Think Snow Eh!
Ox
 

Ox

Diamond
Joined
Aug 27, 2002
Location
West Unity, Ohio
On my Fanuc's:

G10 P0 X0 Y0 at any point in the program should set you back to the original G54 (?) setting.
G92 won't doo that.

I think you have your wires crossed.


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

Think Snow Eh!
Ox


On my controls that would set X and Y to 0 for G54, not to whatever value it was set at originally.


Not trying to push an agenda here, just trying to clear up this statement from earlier...

The G10 P0 X0 Y0 Z0 sets your G53 base to 0. It does not touch the G54 as that would be P1.
Your G54 (59 in this case) never changed.
The G53 is acting in addition to the G59 value.

You could run through all your 54 through 59 offsets with 53 being zero, and then mod 53, and run back through all those offsets aggin as they will all be offset the same amount that you changed 53.


Now - if you generally keep a value in 53 other than 0 (and I doo at times) then this would not be a good idea.


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

Think Snow Eh!
Ox
 

DavidScott

Diamond
Joined
Jul 11, 2012
Location
Washington
For Yasnac G52 X0 Y0 will cancel any shifts to the current fixture offset, there must be a fixture offset called before G52Q2 or the control will alarm out. I forget exactly how Reset will reset it but it does. I will be working with this tomorrow. The advantage of G52Q2 over G10 is less code and simplicity, it looks like a better way to go to me, and you don't need to set the coordinate system to your part datum. When I made the changes to convert my program from G10 to G52 Q2 shifts I pretty much just deleted a lot of code without adding any, not that there was much code to begin with.

I am not aware of a way to change the machines base coordinate system but could be wrong. Code G53 and you know what you are dealing with without surprises.
 

Ox

Diamond
Joined
Aug 27, 2002
Location
West Unity, Ohio
Not diss-agreeing...

52 is new to me (I don't know that I have anything that it would work on - maybe the Cinci A950?)
Not sure if it would work on the Siemens, but that has 50 fix offsets, so life is good there....

I am interested in understanding it fully.
Just wanted to clarify the earlier statement as there was room for cornfusion in the posts.


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

Think Snow Eh!
Ox
 

Needshave

Aluminum
Joined
Oct 20, 2009
Location
MA
G52 Q2 will shift from the current work coordinate on the J300 like stated in previous posts. You can drop the M98 sub programs and use G25 P Q for local sub programs. Something like this.

O1(ENGRAVE PT HOLDERS)
G0 G17 G40 G49 G53 G80 G90 X-10. Y0 Z0
G10Q2P6X3.332Y5.9522 ( Set the coordinates to a known position on the fixture G59)

T7 M6(ENGRAVER)
G59 (SET WORK OFFSET TO G59)
G52 Q2 X-3.175Y.6 (SHIFT WORK OFFSETS)
G0 G43 X-.0466 Y.423 Z.1 H7 S15000 M3
M8
N10
(TOOLPATH)
N20
G52 Q2 (X Y SHIFT AMOUNT)
G25 P10 Q20 (RUN CODE FROM N10 TO N20)
G52 Q2 (X Y SHIFT AMOUNT)
G25 P10 Q20(RUN CODE FROM N10 TO N20)
G52 X0 Y0 (GO BACK TO G59)
M9
M5
G0 G49 G53 X-10. Y0 Z0
M2

Edit I forgot the G59 call before the first G52 Q2. The way I wrote my first post the machine would of used the last known work offset.
"It may be reset ... "

Meaning that "yes - it will" or that you're not sure, and cancel it yourself to be sure and out of habit?
I'm not sure. That may be parameter dependent. More than likely reset or a offset call will cancel it.
 

Myrmidon

Cast Iron
Joined
May 5, 2010
Location
Wisconsin
Not diss-agreeing...

52 is new to me (I don't know that I have anything that it would work on - maybe the Cinci A950?)
Not sure if it would work on the Siemens, but that has 50 fix offsets, so life is good there....

I am interested in understanding it fully.
Just wanted to clarify the earlier statement as there was room for cornfusion in the posts.


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

Think Snow Eh!
Ox

Been awhile but on Siemens it is a TRANS code.

G52 being cancelled by reset/m30 is usually (on Fanuc/Mitsubishi/Tosnuc) handled by a parameter setting either it will or will not.

On Heidenhein it's function: DATUM SHIFT.

I use it all the time on HBMS for keeping track of my 3 Colinear AXIS (ZWV, spindle, ram, and B slide in out) as well as anytime I want to cut down on math, or impose programs somewhere else (identical features).

It's also very helpful if I am 300 inches away from the datum and want to make sure a feature is referenced to itself geometrically. I'll shift my zero to where the features are so everything is good relative to itself and there isn't any positioning accuracy issues.
 








 
Top