tomas61

Members
  • Content Count

    6
  • Joined

  • Last visited

  1. Thanks One more, can you send an example on how to plot data from the script, keep getting parse error when trying "plot1.Y2.data[] = lData;" if(!('Scope1' in this)) throw "Please open a Scope instrument"; Scope1.single(); if(!Scope1.wait()) throw "Stopped"; var average = 0; var lData = Scope1.Channel1.data; plot1.Y2.data[] = lData; lData.forEach(function(sample){average += sample;}) average /= data.length; print("Average: "+average+" V");
  2. Yep, you were right, the bins weren't getting filled because my threshold was too big Where do you get the info for commands like "Tool,question..." Is there a main language reference book/document Thanks
  3. Thanks Attila, But most importantly, why the variable data is not getting updated It only works with the first set of data for(outLoops=0;outLoops<10;outLoops++) { // reading 50 times, 5 seconds plus for(loops=0;loops<10;loops++) {// acquire data Scope1.single(); Scope1.wait(); data = Scope1.Channel2.data; for(index=0;index<8;index++) { thresholdLow -= 0.01; thresholdHigh = thresholdLow - 0.01; data.forEach(function(sample){if((sample < thresholdLow)&&(sample > thresholdHigh))counter[index]++;});// build histogram } //index } // loops
  4. I am trying to run scripts, but I haven't been able to find a good complete set of instructions/reference manual Got the ECMA-262 manual and waveform 2015 ref. man. documents but neither tell me how to make a while loop that will stop when I press a key. Also, why the data is not getting updated for(outLoops=0;outLoops<10;outLoops++) { // reading 50 times, 5 seconds plus for(loops=0;loops<10;loops++) { // acquire data Scope1.single(); Scope1.wait(); data = Scope1.Channel2.data; for(index=0;index<8;index++) { thresholdLow -= 0.01; thresholdHigh = thresholdLow - 0.01; data.forEach(function(sample){if((sample < thresholdLow)&&(sample > thresholdHigh))counter[index]++;});// build histogram } //index } // loops
  5. I started using the old Discovery (black box) In my computer I have and older version of the software. The waveform generator has a slide bar but when I installed the latest version in a different computer there is no slide bar The old and new version are attached I really need the slide bar, I can't type the number because I can't be looking at the screen and/o typing for small increments I need while I am running the experiment, In the older version I just click in the slide bar or type the up/down arrow, in the new one I have to type it Any way to get the older version or change something in the settings Thanks (BTW this is an awesome tool, I have been a EE for 30 years )