we have bought a sh 5000 , but need a pallet change program that identifies the pallet so as not to machine wrong pallet by mistake. we have one that works for our hitachi seiki which is fanuc but will not work for the mori . i really want the program to look similar to the hitachi as shown below.

O1255(12551019006 REV C)




G4
IF[#1011EQ1]GOTO2
IF[#1012EQ1]GOTO1
GOTO999


N1
G91G30P4Z0.0
G91G30P4X0Y0Z0
G90B0
M60
(PALLET 1)
(WORK CO-ORDS)

G90G10L20P1X-154.5Y121.5Z-685.65(G540 FLANGE FACE)
G90G10L20P2X75.05Y182.03Z-642.44(G541 OP20 FACE)


IF[#1012EQ1]GOTO1000

M98P1256

N2
G91G30P4Z0.0
G91G30P4X0Y0Z0
G90B0
M60
(PALLET 2)
(WORK CO-ORDS)

G90G10L20P3X75.45Y181.9Z-642.374(G542 OP10 FACE)
G90G10L20P4X-188.5Y181.9Z-662.20(G543 BUSH BORE)


IF[#1011EQ1]GOTO1000

M98P1257

GOTO1
M30
N999#3000=999(PALLET ERROR)
N1000#3000=999(WRONG WORK COORDS FOR PALLET IN M/C)
M30