Hi, I have a little problem....

I have a MAHO MAT 550 model milling machine with 2 pallet.

Whe I try to change the pallet I have:

N10002 (PROGAM NUM.)
..
..
N39 G0 Z200
N40 M60 (change)
N41 G23 N=10003 (jump to program)


and the other program finish with

N10003
..
..
N25 G0 Z200
N26 M60 (change)
N27 G23 N=10002 (jump to program)


but the CNC stop for an error because there are 2 G23.

I need help to jump between 2 program, one program in the pallet A, when finish change to pallet B that change to A and more....

The only system that I found since today is to finish the first program with M30 and after the finishing of the second program the machine STOP and I have to push the start button.... but it is a loss of time

MANY THANKS