
          // set the ISUS fit window
          if( (srchptr=strstr(cbuf, "FIT,")) != NULL ){

            if( Zcoefs <= 0 ){
              printf("NAK,FIT,ZCoef File Error = %d\n", Zcoefs);
              SCIRxFlush();
              continue;
              }
            if(strchr(srchptr, '?') != NULL){
              printf("ACK,FIT?,%.1lf,%.1lf\n", CellNumToLambda(isus_pixel_beg, ZeissCoefs), CellNumToLambda(isus_pixel_end, ZeissCoefs) );
              SCIRxFlush();
              continue;
              }

            i = gotVal = 0;
            srchptr = strtok(srchptr, ",");
            while( (srchptr = strtok(NULL, ",")) != NULL ){
              ++i;
              if(i == 1){
                lambda_beg = (int)strtol(srchptr, &endptr, 10);
                if( errno == ERANGE ){
                  printf("NAK,FIT,SOverflowErr: %s\n", srchptr);
                  i = ERROR;
                  break;
                  }
                else if( (lambda_beg == 0) && (endptr == srchptr) ){
                  printf("NAK,FIT,SConvertErr: %s\n", srchptr);
                  i = ERROR;
                  break;
                  }
                else if( (lambda_beg < 215) || (lambda_beg > 300) ){
                  printf("NAK,FIT,SRangeErr [215,300]: %s\n", srchptr);
                  i = ERROR;
                  break;
                  }
                else
                  ++gotVal;
                }
              else if(i == 2){
                lambda_end = (int)strtol(srchptr, &endptr, 10);
                if( errno == ERANGE ){
                  printf("NAK,FIT,EOverflowErr: %s\n", srchptr);
                  i = ERROR;
                  break;
                  }
                else if( (lambda_end == 0) && (endptr == srchptr) ){
                  printf("NAK,FIT,EConvertErr: %s\n", srchptr);
                  i = ERROR;
                  break;
                  }
                else if( (lambda_end < 215) || (lambda_end > 300) ){
                  printf("NAK,FIT,ERangeErr [215,300]: %s\n", srchptr);
                  i = ERROR;
                  break;
                  }
                else
                  ++gotVal;
                }
              } //end strtok while

            if( (gotVal == 2) && (i != ERROR) ){
              if( lambda_end <= lambda_beg ){
                printf("NAK,FIT,EVal<SVal: %d, %d\n", lambda_beg, lambda_end);
                SCIRxFlush();
                continue;
                }
              if( (lambda_end - lambda_beg) <= 10 ){
                printf("NAK,FIT,EVal-SVal!>10: %d, %d\n", lambda_beg, lambda_end);
                SCIRxFlush();
                continue;
                }

              printf("ACK,FIT,%d,%d\n", lambda_beg, lambda_end);

              SCIRxFlush();
              if( SerGetsTmout(abuf, sizeof(abuf), GET_ACK_TIMEOUT) > 0 ){
                if( MatchACK(abuf) == ACK ){               //if ACK update values
                  MatchPixelsToLambda(LambdaData, lambda_beg, lambda_end, &isus_pixel_beg, &isus_pixel_end);
                  isus_fit_pixels = (isus_pixel_end - isus_pixel_beg) + 1;
				  DS3234_WrSRAM(ISUS_PIXELBEG_PTR, sizeof(ushort), (ushort*)&isus_pixel_beg);
                  DS3234_WrSRAM(ISUS_PIXELEND_PTR, sizeof(ushort), (ushort*)&isus_pixel_end);
                  SCIRxFlush();
                  continue;
                  }
                }

              sprintf(ebuf, "FIT Command ACK Failure");
              LogErrorMsg(ebuf, (int)COMMAND_ACK_FAILURE, sys_message_enable);

              SCIRxFlush();
              continue;
              } // end gotVal2 if
            else{
              if(i != ERROR)
                printf("NAK,FIT,FormatErr\n");

              SCIRxFlush();
              continue;
              }

            } // end get FIT if


