What's new
What's new

Fanuc 18i-mb spindle orientation with G10

Oovos

Plastic
Joined
Mar 7, 2019
Hello.

I tried to make macro call which orientates spinde to wanted position. Problem is that i cannot change orientation parameter #4077 with g10. I can change eg. #3202 with it and manually i can change #4077. But if i run this code, #4077 wont change:

G10 L50
N4077 R800
G11

Is there some lock for this parameter which needs to open first?
 
If I remember correctly 4077 is the position of the spindle orientation M19. Some Fanuc controls you can call another (Sxxxx?) variable along with the M19 to orientate how you want.

3202.2 sounds like the one that hides the 9000's programs? Maybe you could say a little more about what you're trying to do, might help someone help you better.

Brent
 
M19 S? wont work on my machine so thats why im making macro call which changes 4077 parameter. Then i modify tool change macro to make sure its correct in tool change.

3202 was just example which proof that g10 works. So code below works to put 9000 programs write protect off:

G10 L50
N3202 R00000011
G11

But if i try to do that with 4077, nothing happens. No errors and no change in 4077 value.
 
Unless I'm not understanding all you need to do is correct the position of where it orientates with M19.

Then you wouldn't need a macro to alter where it stops. Look at the thread below and pay attention to what jashley is talking about. I believe he walks you through correcting the spindle orientation misalignment. Sorry no help on your G10 macro, maybe somebody else will show up with that.

Brent

Fanuc 0i-td "M19" spindle orientation question?
 
Im talking about mill too. But that does not help me since i can change that value manually but i want to do it in program. Maybe i cannot explain well but my only question is: how i can change parameter 4077 with G10?
 
SOLVED!

It really needed P1 to work.

So final code:

G10 L50
N4077 P1 R(value)
G11

Thanks Gregor!
 
Changing #4077 works great and i modified tool change macro so that it allways changes #4077 to correct before tool change. But i found that after G11 i need to wait ~1sec before m19 because value is not updated right away. So now i have g4 p1000 in every tool change. Only way to avoid this is to somehow read #4077 value and check if its correct then jump over G4.

So my question is: Can i somehow read parameter value in macro?
 
Supposedly, the PRM function was introduced for this purpose, but it your control is probably too old. It doesn't work on any of mine, so I don't know which controls actually support it.

The syntax is

#100=PRM[4077]/[1]
 
I am not well versed in macro's, but given the new info - wouldn't it seem better to have an equaszion in your other apps and let 4077 be?

Like:

[#4077 + 1500]

Or sumpthing like that?


That way you don';t have to worry about not getting 4077 changed back and whatever that might entail?


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

Think Snow Eh!
Ox
 
I need to orientate spindle in different positions and only way is to change parameter. If that prm syntax wont work i will add #500 variable where i wrote value when i change parameter and then i can check that...
 
I need to orientate spindle in different positions and only way is to change parameter. If that prm syntax wont work i will add #500 variable where i wrote value when i change parameter and then i can check that...
Hello Oovos,
The PRM function was not available with your model control. I think it was introduced circa the time of the FS30i control.

Regards,

Bill
 
So my question is: Can i somehow read parameter value in macro?
Better to answer late than never :)
You can easily read the value of a variable in a macro. For example
IF #4077 GE 300 GOTO 100
GOTO 200
-
-
-
N100
#4077=1392
N200

If this parameter is a number, then everything will work.
 
Better to answer late than never :)
You can easily read the value of a variable in a macro. For example
IF #4077 GE 300 GOTO 100
GOTO 200
-
-
-
N100
#4077=1392
N200

If this parameter is a number, then everything will work.
Actually no. That would work if #4077 was a Variable, but the OP wants to change the value of a Parameter; for that G10 is required.

Regards,

Bill
 
I was wrong, of course #4077 is macro variable number 4077, not parameter 4077.
But, is it necessary to use G10 only to read the parameter?
As Sinha points out, G10 is to write to a parameter and not all controls have the function to Read the content of a parameter. For this, the control needs to have the User Macro PRM function available. I'm fairly sure that wasn't introduced until circa the time of the FS30i control.

Regards,

Bill
 








 
Back
Top