Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Scripting #50

Open
samkristoff opened this issue Oct 18, 2017 · 1 comment
Open

Custom Scripting #50

samkristoff opened this issue Oct 18, 2017 · 1 comment

Comments

@samkristoff
Copy link
Contributor

Requested on the forums here.

@bhclowers
Copy link

I'm not sure whether this has been implemented or not, but in short, I'd like to have the capacity or a means to add a channel or even a reference trace that can co-add traces after each trigger. Currently, we use the following code with the Analog Discovery and then save the ref spectrum manually:

var rgr3 = Scope.Ref3.data;
if(Index==1){
    for(var i=0; i<rgr3.length; i++){
        rgr3[i]/=Maximum;
     }
    Scope.Ref3.data = rgr3;
    Scope.Ref3.Clone(Scope.Channel1);
}
else{
    var rgc1 = Scope.Channel1.data;
    for(var i=0; i<rgc1.legth; i++){
        rgr3[i]+=rgc1[i];
    }
Scope.Ref3.data = rgr3;
}

Index++;
if(Index>Maximum) Index = 1;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants