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 »

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

Re: Direction parameter on pulse width qualifier

Post by Hitesh »

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,

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

Re: Direction parameter on pulse width qualifier

Post by heng »

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 »

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

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

Re: Direction parameter on pulse width qualifier

Post by Martyn »

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

Post Reply