Monika997

Members
  • Content Count

    20
  • Joined

  • Last visited

Everything posted by Monika997

  1. Thank you very much!! Are there any samples in Javascript? I have to add this to my program which is already written in this language. My program is below: clear() if(!('Wavegen' in this) || !('Scope' in this)) throw "Please open a Scope and a Wavegen instrument"; function conf(freq, amp){ Wavegen.Channel1.Simple.Frequency.value = freq Wavegen.Channel1.checked = true if(freq==0){ Wavegen.Channel1.stop() }else{ Wavegen.Channel1.Simple.Amplitude.value = amp Wavegen.Channel1.run() } wait(0.1) //100ms Scope.single() if(!S
  2. Hello. I have a question - so I am implementing a university project in which one of the activities is to measure the voltage value on two measuring coils (a device for testing the magnetic permeability of a magnetorheological liquid). I would like to know if in the analog discovery 2 device it is possible to read the analog signal on any of the inputs, and if so, on what (i thought that maybe for example DIO1 and DIO2 but i don't know). I need to write a script in Waveforms that will collect the voltages from these two coils and save their values to a file. Please help.
  3. I edited my code so that it would ask all the questions about values first and then set the appropriate frequencies and voltages. 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 Wavegen.Channel1.checked = true 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" } freq_qu
  4. 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,
  5. 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
  6. 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