
          // set the ISUS reported spectra range
          if( (srchptr=strstr(cbuf, "SPECTRA,")) != NULL ){

            if( Zcoefs <= 0 ){
              printf("NAK,SPECTRA,ZCoef File Error = %d\n", Zcoefs);
              SCIRxFlush();
              continue;
              }
            if(strchr(srchptr, '?') != NULL){
              printf("ACK,SPECTRA?,%.1lf,%.1lf\n", CellNumToLambda(isus_datpixel_beg, ZeissCoefs), CellNumToLambda(isus_datpixel_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,SPECTRA,SOverflowErr: %s\n", srchptr);
                  i = ERROR;
                  break;
                  }
                else if( (lambda_beg == 0) && (endptr == srchptr) ){
                  printf("NAK,SPECTRA,SConvertErr: %s\n", srchptr);
                  i = ERROR;
                  break;
                  }
                else if( (lambda_beg < 210) || (lambda_beg > 350) ){
                  printf("NAK,SPECTRA,SRangeErr [210,350]: %s\n", srchptr);
                  i = ERROR;
                  break;
                  }
                else
                  ++gotVal;
                }
              else if(i == 2){
                lambda_end = (int)strtol(srchptr, &endptr, 10);
                if( errno == ERANGE ){
                  printf("NAK,SPECTRA,EOverflowErr: %s\n", srchptr);
                  i = ERROR;
                  break;
                  }
                else if( (lambda_end == 0) && (endptr == srchptr) ){
                  printf("NAK,SPECTRA,EConvertErr: %s\n", srchptr);
                  i = ERROR;
                  break;
                  }
                else if( (lambda_end < 210) || (lambda_end > 350) ){
                  printf("NAK,SPECTRA,ERangeErr [210,350]: %s\n", srchptr);
                  i = ERROR;
                  break;
                  }
                else
                  ++gotVal;
                }
              } //end strtok while

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

              printf("ACK,SPECTRA,%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_datpixel_beg, &isus_datpixel_end);
                  DS3234_WrSRAM(ISUS_DATPIXELBEG_PTR, sizeof(ushort), (ushort*)&isus_datpixel_beg);
                  DS3234_WrSRAM(ISUS_DATPIXELEND_PTR, sizeof(ushort), (ushort*)&isus_datpixel_end);
                  SCIRxFlush();
                  continue;
                  }
                }

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

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

              SCIRxFlush();
              continue;
              }

            } // end get SPECTRA if


