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