Monika997

Members
  • Content Count

    15
  • Joined

  • Last visited

  1. So now my code look like this: clear() if(!('Wavegen' in this) || !('Scope' in this)) throw "Please open a Scope and a Wavegen instrument"; function conf(amp, freq){ Wavegen.Channel1.Simple.Amplitude.value = amp if(freq==0){ Wavegen.Channel1.stop() }else{ Wavegen.Channel1.Simple.Frequency.value = freq Wavegen.Channel1.run() } wait(0.1) //100ms Scope.single() if(!Scope.wait()) throw "stopped" } if (Tool.question("Frequency should be constant?") == true) { frequencyconst = Tool.getInteger("Frequency constant value is", 0,
  2. Thank you so much @attila I've got one more question. These values are already given in the code - var rgAmp = [0.005, 0.01] var rgFreq = [0,2,6,8,10] but in my program I enter the range and the number of steps in the popup window. I would like the two-dimensional array to be made up of these values entered in the window. if (Tool.question("Frequency should be constant?") == true) { frequencyconst = Tool.getInteger("Frequency constant value is", 0, 0, 10000) } else { frequencyfrom= Tool.getInteger("Frequency range from [Hz]", 0, 0, 100) frequencyto = Tool.getI
  3. clear() if(!('Wavegen' in this) || !('Scope' in this)) throw "Please open a Scope and a Wavegen instrument"; if (Tool.question("Frequency should be constant?") == true) { frequencyconst = Tool.getInteger("Frequency constant value is", 0, 0, 10000) print("Frequnecy is constant and the value is " + frequencyconst ) } else { frequencyfrom= Tool.getInteger("Frequency range from [Hz]", 0, 0, 100) frequencyto = Tool.getInteger("Frequency range to [Hz]", 0, 0, 100) frequencystep= Tool.getInteger("Frequency number of steps", 0, 0, 100) print("Frequnecy range is from: " + frequencyfrom + " H