private void measureNoiseFloor() { ProgressStatus(new ProgressEventArgs("Start Measuring Noise Floor")); actual = startf; // for loop start to end with step while (actual < stopf) { ProgressStatus(new ProgressEventArgs("Measure Signal Level for frequency " + actual)); ctrlSDR.setCommand(sdrCATCommand.setFrequency(actual)); ctrlSDR.setCommand(sdrCATCommand.setCWLMode()); Thread.Sleep(100); String value = ctrlSDR.getCommand(sdrCATCommand.getRxMeter()).Replace("ZZRM1", "").Replace("dBm;", ""); nf_measurement[actual] = value; actual = actual + stepf; } ProgressStatus(new ProgressEventArgs("nextStep")); }