grbl 1.1 won't return Mpos status

I am using Xpro  V2 cnc controller and when using python to send G codes some time it responds with the proper message where it includes MPos M/C state etc and other times it only responds with ‘ok’ although it suppose to send realtime m/c position.

Obviously this is casuing enourmous problem instead of waiting in position it just flys to next position issued by the program. The python program only sends 1 move instructions at a time using only one axis

here is the partial code

while True:
ser1.write(b’?’)
time.sleep(0.5)
x =ser1.readline().strip().decode(‘cp1252’)
xMsg = x[x.find(’<’)+1:x.find(’|’)]

if x[0] != ‘<’ and x[0] != ‘o’ : continue

if xMsg==‘Idle’ :
z=round(abs(float(x[x.find(’:’)+1:x.find(’,’)])))
if(1200-z!=MC_POS): continue
elif xMsg==‘Alarm’:
QMessageBox.warning(self, ‘Warning’, “Something went wrong\n Reset the MC”)
break
elif xMsg==‘Run’: continue
else:
print('XDRIVE - ‘+L_bytes+’ '+x)
break

Hope there is a solution