GeoCOM Reference Manual
Automation - AUT
Leica TPS1200 / TS30 / TM30 – Version 1.50
57
hrc = AUS_SetUserAtrState(ON);
// activate ATR mode
while(rc!=GRC_OK && TryAgain && hrc==GRC_OK)
{
rc = AUT_Search(Hz_Area,V_Area,FALSE);
switch (rc)
{
case (GRC_OK):
// execution successful
// Target found
break;
case (GRC_AUT_NO_TARGET):
//no target found.
//increase search area
H= 0.1;
= 0.1;
if (Hz_Area > 1)
{
TryAgain = FALSE;
}
break;
case (GRC_COM_TIMEDOUT):
//communication timeout
//increase timeout until 30s
hrc = COM_GetTimeOut(nComTimeOut);
nComTimeOut=(short)__min(nCom=5, 60);
hrc = COM_SetTimeOut(nComTimeOut);
//abort if timeout >= 30s
if (nComTimeOut >= 30)
{
TryAgain = FALSE;
}
break;
default:
//error: search not possible
//here further error analyse possible
break;
}
}
hrc = COM_GetTimeOut(nOldComTimeOut);// Set old time
// out back
hrc = AUS_SetUserAtrState(OFF);// Note: LOCK mode will
// be automatically also
// reseted!