Direction parameter on pulse width qualifier

Post your C and C++ discussions here
Post Reply
heng
Newbie
Posts: 0
Joined: Mon Jun 11, 2012 7:08 pm

Direction parameter on pulse width qualifier

Post by heng » Fri May 19, 2017 6:07 pm

Can anyone enlighten me as to what the direction parameter is doing with the pulse width qualifier? I can't anywhere in the docs see much about it beyond "the direction of the signal required for the trigger to fire".

I posit that it's the direction that resets the counter, but that's not written down anywhere. Can it be the same as the edge trigger used to actually trigger? Can it be different?

I recall from earlier work on a 3000a series device that the lower thresholds should be used for the PWQ, but I might be mis-recalling. Is this something I need to think about?

This is with a 4227 device, using ps4000SetPulseWidthQualifier.

The PWQ stuff is rather sparse...

Hitesh
Site Admin
Site Admin
Posts: 2793
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Direction parameter on pulse width qualifier

Post by Hitesh » Mon May 22, 2017 11:01 am

Hi heng,

You are correct, the direction for Pulse Width Qualifier (PWQ) is the direction that resets the counter. The pulse width qualifier is a counter which resets when it meets an edge in the direction that is specified and begins counting. When the trigger condition is met (if a trigger condition is specified), there is a process which qualifies whether it meets the overall conditions specified.

You should be able to use either an upper or lower threshold for the PWQ, but the direction enumeration cannot be the same for the trigger and PWQ e.g. if RISING is selected for the trigger, then for a reset on a rising edge for the PWQ, you should specify RISING_LOWER (or vice-versa).

You can certainly combine different directions e.g. for a positive pulse you would reset the PWQ on a rising edge, and trigger on a falling edge.

I will notify our Technical Publications team about updating the Programmer's Guide as required.

Hope the above helps,
Hitesh

Technical Support Engineer

heng
Newbie
Posts: 0
Joined: Mon Jun 11, 2012 7:08 pm

Re: Direction parameter on pulse width qualifier

Post by heng » Mon May 22, 2017 12:53 pm

That answers my question perfectly. Thank you!

Post Reply