• 0
Sign in to follow this  
Matt B

Scope, Script and StaticIO

Question

Hello, 

I am having a issue writing a script to turn on a digital output for pulse width measurement. I have two measurements. One has a pulse width of about 45us and the other around 80us. I have tried to display the Pulse Width using script and I am having issues. I would like to use the pulse width measurements and check it for tolerance. If measurement is good, turn on output. 

Any help would be appreciated.

 

Thanks,

Matt

Share this post


Link to post
Share on other sites

Recommended Posts

  • 0

Is there a easy way to shorten the number from scope. Example I get a 88.23456987655, I would like to capture or round to 88.23?

@attila Awesome... How would I implement this into a array. 

For example below is the code. "rgusw" is the array I would like to round. 

image.thumb.png.8e005d152ed3e7a27c871f4f58698b27.png

Share this post


Link to post
Share on other sites
  • 0
    var usw = Scope1.Channel1.measure("NegWidth")*1e6
    rgusw.push(round(usw*100)/100)
    sumusw += usw
    ccw++
}
var avgusw = round(sumusw/ccw*100)/100

 

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
Sign in to follow this