G130 Doosan Lynx 300M – Set the G30 Position
Category : New Stuff
G130 on a Doosan Lynx 300M – Setting the G30 Position

On a Doosan Lynx 300M, G130 can be used to set the machine’s G30 second reference position.
The interesting part is that G130 is not doing the work itself.
Read on if you are scared of fucking with parameters.
On this machine:
G130
calls:
O9019
This is done using Fanuc parameter 6059.
If parameter 6059 contains:
130
then G130 calls macro O9019.

What Does O9019 Do?
The macro reads the position you added to G130 and writes it into Fanuc parameter 1241.
Parameter 1241 stores the second reference position, normally associated with:
G30 P2
So instead of manually entering the position into parameter 1241, you can enter it on the G130 line:
G130 X200. Z200.
Simple.
This is called a G Code Alias read about it here
How It Works
G130 X200. Z200.
↓
Parameter 6059
↓
O9019
↓
Your X200. Z200. position
↓
Parameter 1241
↓
G30 second reference position
Setting the Position
- Reference the machine.
- Jog the turret to the required position.
- Check that the position is safe.
- Record the existing parameter 1241 values just as a safety precaution.
- You could even take a screen shot.
- Add you new position to G130 for example G130 X200. Z200.
- Check parameter 1241.
- Test the G30 move at a low rapid override.
- (G30 U0 W0)
Why Use G130?
It is quicker than manually typing coordinates into parameter 1241 and reduces the chance of entering the wrong value.
It also gives the setter a very simple command:
G130 X200. Z200. (set my G30 position here)
It’s Permanent
Yes it stays in forever unless you change it. Therefore you don’t have to keep writing G130 in a program if you always use the same position.
If you are scared of fucking with parameters then this is your answer. Change the G30 position and no one dies.
Important
G130 is a custom G-code alias on this machine. Do not assume it performs the same function on every Fanuc-controlled machine it will not.
This is a Doosan specific command. Now you know how you could add it to any machine, see end of article for full code.
Also, back up your parameters and macros before changing anything.
FAQ
What is Fanuc parameter 1241?
It stores the second reference position used by G30 P2.
What is O9019?
A 9000-series macro program assigned to G130 on this machine.
What does parameter 6059 do?
It assigns a custom G code to macro O9019.
Is G130 a standard Fanuc G code?
Not in this application. It is being used as a custom alias.
Can G30 be used as a turret index position?
Yes, provided the position and movement are safe for the machine and tooling.
Learn more about Macro programming Here
Call David: 07834 858 407
Here is the macro for the real geeks.
O9019(G130 SET 2ND REF)
(SET PARA.6059 = 130)
(THIS SET PROG O9019 TO G130)
IF[#3010EQ-1.0]GOTO900 (ESCAPES PROGRAM IF NOT IN AUTO)
IF[#24EQ#0]GOTO888 (NO X VALUE ALARM)
IF[#26EQ#0]GOTO889 (NO Z VALUE ALARM)
IF[#4006EQ21]GOTO5 (INCH METRIC VARIABLE)
(INCH)
#100=ABS[#24*10000]
#101=ABS[#26*10000]
N5(INCHES)
IF[#4006EQ20]GOTO6 (METRIC JUMP)
(MM)
#100=ABS[#24*1000]
#101=ABS[#26*1000]
N6 (METRIC)
G0
#3003=1
G10L52 (SET PARAMETERS)
N1241P1R#100 (SET X VALUE)
N1241P2R#101 (SET Z VALUE)
G11
#3003=0
GOTO900
N888#3000=150(NO X VALUE)
N889#3000=151(NO Z VALUE)
N900M99
%

