What's new
What's new

Fanuc 18i MB macro Variable

NeedCNC2

Banned
Joined
Dec 14, 2006
Location
USA
Does anyone know the machine variable that indicates which pallet is currently in the machine for a horizontal? It will be interesting to see if I get an answer here before the builder.

Thanks in advance.
 
You need to provide more info:
Machine make and model specifically. Most parameters such as pallet numbers are assignable by the MTB, so could potentially vary from MTB to MTB.
 
On a Doosan HP6300 the pallet change M code tells the machine what pallet is in the machine, M61 = pallet 1 and M62 = pallet 2 the company that sold us the machine said there is no system variable that tells the machine what pallet is in the machine. as far as a parameter that I do not know. Hope this helps.
 
The operation is using probing. They are using M60 to switch pallets. I need to save the probed work coordinates specific to the pallets. I may have use a small program to call the main program. It is not the way the client intended to run.
 
There is a few different ways that you can check to see if there is a variable that tracks the pallet number. More than likely it is not a variable that says 1,2,3,4 ect. How many pallets do you have? If you have 2 then it is probably a variable that is set to 0 or 1 depending on the pallet.

I would not rely 100% on the person who sold you the machine as they might have never had a reason to know or check if there was a variable for current pallet in the machine.

These are usually the input/output variables that would be assigned to this. I am not positive about the 18i control( but I can check for you) but on my Fanucs #1000-#1035 are the input variables and #1100-#1135 are the output variables. You can run a short program to check to see if there is a variable for this. I do this quite often as on older machines the MTB manual has usually vanished into thin air. Run this program to check.

O0004
#1=0
#2=0
WHILE[#1LT35]DO1
#[100+#2]=#[1000+#2]
#[136+#2]=#[1100+#2]
#1=#1+1
#2=#2+1
END1
M30

Now your common variables #100-#135 will be set to the values of #1000-#1035. Your #136-#171 will be set to #1100-#1135. Record any values here. Do a pallet change and run the program again to see what variables changed.

If there is no variables that are going to help you out I would write a macro to be called with every pallet change and use your common variables to keep them in order. For example if you want to call the pallet in the machine #1 set a variable between #500-#999 equal to 1 as these will not rest or clear at power down. Now every time you do a M60 have a macro call with the M60 that changes the variable to the pallet number using an IF statment.

IF[#500EQ0]TH#500=1
IF[#500EQ1]TH#500=0
M99

Now you can set your probing data for the proper pallet by checking the #500 variable to see what pallet it has. One thing you have to be careful of is if you have the capability of manually changing the pallet then the #500 will have to be manually changed.

Stevo
 
Stevo

The manual pallet change was my concern also.

The builder just notified me that they use #1008 for pallet 1, #1009 for pallet 2.

Thanks to everyone that replied.
 
Cool I am glad you got it. I figured they were using something to dictate the current pallet. On pallets they are usually tracking it somewere. Now you can use these variables to write the probing data.

Let us know if you need a hand writing the code to assign the data. You should have more checks and double checks then you do code for dictating which probe data goes with what pallet. I make all of mine fool proof. I have seen it many times that there were not enough checks and the wrong data went to the wrong pallet. This can be a catastrophic problem :eek:.

Stevo
 








 
Back
Top