• 0

Analog Discovery Waverforms Script - scope time parameters



Using the great script editor but cant (dont understand) how to control the scope "TIME" parameters.  

It seems any script commands like below don't do anything.  No error, but the scope doesn't change.

  • Scope.Time.Base.Real = 0.001
  • Scope.Time.Samples.Value = 32
  • Scope.Time.Rate.Value = 10000

And Scope..BufferSize.value = 256  gives:  TypeError: Result of expression 'Scope.BufferSize' [undefined] is not an object.

Do I have to set these in the actual SCOPE window instrument and not scriptable?


All Im trying to do is get a short sample of data (2ms or so) to grab the current voltage of a sensor in a loop (not too concerned about timing update accuracy) .  If I set the scope to a fast rate, short timebase, and use var average = Scope.Channel1.measure("Average")  it works but I can't seem to do that in a script.  Otherwise of course the reading is average over a large span. I want the "current" reading (within a few ms)


Or is there a better way?  


Edited by mkj
Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Thank you (case sensitive strikes again)!  

  • I had tried this (and it didn't work) :    Scope.Time.Base.Value = 0.001   (I missed the lower case "value" )!  🥴
  • And of course this does work:   Scope.Time.Base.text = "1ms"

And   Ctrl + shift is really handy:  I thought wasn't working but I see you have to have the "." for the commands to appear

BTW - just wanted to say how impressed I am with the overall Analog Discovery products (hardware and software).  I've used them on countless engineering/lab projects and they've been flawless.  Just getting into the scripting more to control stepper motor drivers with the patterns, very quick to get something running during RD phases.  We have about a dozen of the 2 channel and are buying the newer "Pro" 4 channel versions now.

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