Jump to content
  • 0

Hello, Looking to create my first script on Analog Discovery Pro 4 (ADP3450)


scott.moore

Question

Hello!

I am interested in creating a script that will record the time from channel 1 being triggered on a single event capture until a resultant event (rising edge) occurs on channel 2. Seems easy enough. Anyone willing to throw some examples at me to get me started?

Thanks!

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

That sounds reasonable. I figured it would be a post processing operation.

Is it possible to have the script running in the background when armed and capture system time at the trigger, then have a loop structure monitoring the second channel voltage until a threshold is reached then capture the system time again. Then I just subtract the first timestamp from the second time stamp and I have the value I am looking for?

thank you for your help!

Scott 

Link to comment
Share on other sites

  • 0

Hi @scott.moore

What is the distance between the triggers ? What measurement precision do you need ?

The software timer only has a few milliseconds of resolution/precision.
If the distance is less than a few milliseconds, trigger on event 1 use a script to look for event 2
If it is more, you can configure alternate trigger and use the device trigger date&time difference for distance, for device system frequency resolution (8-10ns)
You can also use the sample time (trigger crossing interpolation) difference for higher resolution measurement.

Link to comment
Share on other sites

  • 0

Attila,

Thank you for your response. The time between the events will be somewhere in the neighborhood of 5-10mS. I'd like to have good resolution so it sounds like the alternate trigger will be the way to go. I will do that instead of pursuing the scripting option.

Thanks again!

Scott

Link to comment
Share on other sites

  • 0

Hi @scott.moore

The alternate trigger to work with 5-10ms seems to require the Scope interface to be invisible. tt1.dwf3work
Having this in from adds a few milliseconds of delay, so it may not catch the next trigger.
Such method can be implemented with better performance in custom app/script.

image.png

 

And this is a solution with data processing in Script: tt2.dwf3work

image.png

Link to comment
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
×
×
  • Create New...