Changing Tool Radius Settings in a CNC Controller

Advice on hand-coding some tool settings in a CNC controller. September 27, 2008

Question
I'm running a Heian ER-242PBMC with a Fanuc 180i-MB control. What I'd like to do is access the tool offset data for use in parametric programming. For instance, where I'd like to run a part in two passes, I would create a compensation value for the first pass that is (Tool radius + 2mm). The dealer doesn't seem to catch on what I'm trying to do. Does anyone know whether these values can be transferred to a variable?

Forum Responses
(CNC Forum)
From contributor K:
I have worked on Fanuc's but not sure how to do what you want on them. It's a piece of cake on Allen Bradley controls. You don't want to access the offset but alter it in the program. For tool diameter it's called machine stock allowance "MSA=2mm" that is the variable.

So my program would go like this;

NCcode
NCcode
NCcode
part of program i want to repeat below
MSA=2; this is tool radius+2mm
(EPP,A,B);this means repeat from "A"to"B"


"A"
NCcode
NCcode
NCcode
MSA=0; this sets tool radius to original
"B"
End of program I want to repeat.


From contributor C:
With Fanuc CNC Macro function you are able to read the tool offset value from system variable (#2001 ~ #2200) into local (#1~#33) or common variable (#100~#149) then you can do all kinds operations you need to do.

Example:

#100=#2001 (read offset 1 value into command variable)
#101=#100+2. (do your operation)
G01X#101 F250.



From the original questioner:
That's perfect Contributor C! I've been looking for that for quite a while. Here's another bit of info I wish I could access.

I have a twin table machine. Each table has a "consent" button to indicate whether that part is ready to run. M261 & M262 will read the state of those two buttons and run or wait accordingly.

What I'd like to do is run a logic program like this:

N50 IF (table 1 not ready) GOTO 100
table 1 program
N100 IF (table 2 not ready) GOTO 50
table 2 program

I just don't know how to tell it to read the state of those consent buttons!



From contributor C:
Normally a twin table features need to have a #1000~#1015 input signal to work with the Consent switch, if this switch active means the table is ready for machining.

Then we will do as follow:

N10
N50 IF #1000=0 GOTO 100
M98 PYYYY (table 1 program)
GOTO 200
N100 IF #1001 =0 GOTO 200
M98 PVVVV (table 2 program)


N200 GOTO 10 (LOOPING)
A M code finction will not allow you do the Loop.

To be able to do loop, you need to change machine PLC logic to tight the switch to the interface input signal then it will work. also don't forget that you need to reset the signal during that table is cutting before job is finish, a M95 spindle off command or a vacuum off can rest this input signal.



From the original questioner:
I can read #1000, but it doesn't seem to tie in to the state of my consent switches. How is that done?


From contributor C:
Since the Macro option is on, you shall be able to read the status of #1000. But is the system link the switch with CNC system variable #1000~#1015? This is taken care by the machine builder's PLC ladder control logic.

Is this machine Using FANUC PLC or OMRON PLC? Go to the back cabinet open the door (turn off the power of machine first) and look into your left hand side see there are a OMRON PLC unit or not. Basically you need have Dealer or someone able to modify the PLC to change the PLC to get it work the way you want.



From the original questioner:
As far as I can tell, it's a Fanuc PLC. I can't see anything that says Omron.


From contributor C:
If it is Fanuc PLC, it will be easier. Still you need to have the PLC modify to be able to get the whole connection set up.