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)
Question
mkj
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.
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?
clarify
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now