Maybe somehow the code do not reach M30 ...
Lets says if you have some conditions or if you are stuck in any part of the code before reaching M30 it will not be processed by the controller.
Lets say if you execute this :
N1 IF [0NE1] GOTO 3
N2 M30
N3
the M30 is never reached even after the pgm is fully executed