• 0
gpettit

Is it possible to write to a scope math channel using a script

Question

Posted (edited)

Is it possible to fill the buffer of a Scope Math channel from a script?

Scope1.Math1.data[i] = some value

Thanks in advance,

Greg

Edited by gpettit

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 1

Hello,

You could use a reference channel for this purpose.

// clone a real channel to have proper time alignment
Scope1.Ref1.Clone(Scope1.Channel1)
Scope1.Ref1.enable = true

// custom data array
var c = Scope1.Channel1.alldata.length
var rg = [];
for(var i = 0; i < c; i++){
    rg[i] = sin(4*2*PI*i/c)
}
// apply it
Scope1.Ref1.data = rg

i1.png

gpettit likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now