I give the user 2 seconds to change it to MM after the estop is hit or it estops the sytem again.
Dim Inch_mode As Boolean
Dim Estopped As Boolean
Estopped = GetOEMLED(800)
Inch_mode = GetOEMLED(801)
If(Inch_mode)Then
'Is the sytem estopped already
If Not(Estopped)Then
'Estop system
DoOEMButton(1021)
End If
While(GetOEMLED(800))
MESSAGE "Went Into Inch Mode:"&i
sleep(250)
Wend
'Give the user time to change to mm?
Sleep(2000)
End If