%%%
  VERSION:1
  LANGUAGE:ENGLISH
%%%

MODULE SRdemo(SYSMODULE)
  PROC DoSensCal()

    CameraCalib 1,pCalib1,pCalib2,pCalib3,pCalib4,pCalib5,track3\ScanAngle:=25;

  ERROR
    TEST ERRNO
    CASE SEN_NO_MEAS:
      TPWrite "No data from sensor";
    CASE SEN_NOREADY:
      TPWrite "Sensor not ready";
    CASE SEN_GENERRO:
      TPWrite "Sensor general error";
    CASE SEN_BUSY:
      TPWrite "Sensor busy";
    CASE SEN_UNKNOWN:
      TPWrite "Sensor Unknown error";
    CASE SEN_ILLEGAL:
      TPWrite "Sensor illegal instruction";
    CASE SEN_EXALARM:
      TPWrite "Sensor external alarm";
    CASE SEN_CAALARM:
      TPWrite "Sensor calibration alarm";
    CASE SEN_TEMP:
      TPWrite "Sensor temp alarm";
    CASE SEN_VALUE:
      TPWrite "Sensor value error";
    CASE SEN_CAMCHECK:
      TPWrite "Sensor camcheck error";
    CASE SEN_TIMEOUT:
      TPWrite "Sensor timeout";
    DEFAULT:
      TPWrite "Other error ";
    ENDTEST
    TPReadFK nChoice,"ERROR encountered","","","","Abort","Retry";
    IF nChoice=5 THEN
      RETRY;
    ELSE
      EXIT;
    ENDIF
  ENDPROC
ENDMODULE
