The Fanuc Control has little to do with whether a System Variable is supplied to identify the current pallet; that is entirely up to the MTB.
Following are two Macro Programs that were used on a Kitamura Horizontal, where the only normal "M" code for pallet change was M60, which would merely swap the pallets irrespective of what number was active. Each Macro Program was called with either M61 or M62 registered as a Cuctom "M" Code. The actual active number of the pallet (61 or 62) is stored in Nonvolatile Macro Variable #520. The reference to the Pallet Changer being disabled was related to a fixture that wouldn't fit through the Pallet Change Door and therefore, when in use, a flag was set in Macro Variable #500 to prevent a pallet change happening.
O9003(AUTO*PALLET*M61)
(PROGRAM CALL M61)
M11
IF[#500EQ1]GOTO5555
IF[#520EQ61]GOTO1
G91G28X0Y0Z0B0
G30X0.0Z0
M60
#520=61
G90
N1M99
N5555
#3000=1(PALLET CHANGER DISABLED)
O9004(AUTO*PALLET*M62)
(PROGRAM CALL M62)
M11
IF[#500EQ1]GOTO5555
IF[#520EQ62]GOTO1
G91G28X0Y0Z0B0M09
G30X0.0Z0.0
M60
#520=62
G90
N1M99
N5555
#3000=1(PALLET CHANGER DISABLED)
There would normally be a proximity switch to confirm that the Pallet was in place. You could determine if only the one switch was used for both Pallets, or one for each by testing with the following:
1. Swap a Pallet into the Machine
2. Execute #1 = #1032 and note the number in Variable #1
3. Swap another Pallet into the Machine and repeat step 2
4. If there is a difference in the number recorded in #1, then there is a User Input provided that is different for each Pallet and from this you can determine the Input and use it to identify the current Pallet.
Regards,
Bill