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
PICO STAFF
PICO STAFF
Posts: 2855
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

Software Dev. 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!

hinxx
Newbie
Posts: 0
Joined: Mon May 13, 2019 12:45 pm

Re: Direction parameter on pulse width qualifier

Post by hinxx » Mon May 13, 2019 6:14 pm

Does the same logic apply to Ps4000a API? Ex. for PS 4824 unit.

Martyn
Site Admin
Site Admin
Posts: 3609
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Direction parameter on pulse width qualifier

Post by Martyn » Tue May 14, 2019 8:14 am

Yes it should be the same, although I currently don't have access to a system to check.
Martyn
Technical Support Manager

Post Reply