'***************************************************************************
'Description:
'Use the #POSERR automatic subroutine to detect when you exceed
'the position error limit set by the ER command.
'***************************************************************************
'OE*=1 will set all of the axes to shut off when the error limit is reached
#psrtest
  ER -1;     'disable error limit
  v1= TIME
  WT 1000
  ER 0;       'enable error limit
  #go;JP #go; 'keep a continuous loop running for automatic subroutine to run
EN

#POSERR
  v2= TIME-v1
  MG "ERROR HIT at Time=",v2
  WT 1000
  ER 1000
RE 1