tomas61
-
Posts
11 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Posts posted by tomas61
-
-
How do I define bi dimensional arrays?
var peakCounter = [];
var peakCounter = [][]; ---syntax error
var peakCounter = [,];---doesn't give me a syntax error but it doesn't work, it only follows the index after the comma
Thanks
-
Thanks
how do I format a number to display only two decimal points in print
print(totalCounter);
will print this
2.2000000000000006
What is the base language you use for script, (java, python, etc)
This would be so much easier with a good user manual
-
How do I use the plot1.Y1 to display an array
var peakBar = [];
plot2.Y1.peakBar;
also can I plot two or more data sets in a single plot window
Tomas
-
-
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");
-
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
-
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
-
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
Scripts
in Test and Measurement
Posted
Thanks
Any way to send data to google sheets?