A few questions on advanced triggering

Post general discussions on using our drivers to write your own software here
Post Reply
heng
Newbie
Posts: 0
Joined: Mon Jun 11, 2012 7:08 pm

A few questions on advanced triggering

Post by heng »

I have a few questions advanced triggering.

1) What happens if I create an impossible trigger condition? (say, 2 conditions in which channel A is set to True in one and False in the other). Does this just result in the trigger never happening?

2) Does the pulse width qualifier trigger entirely independently of the normal channel triggers? (meaning I can have some logical function of the the pulse width qualifier on some channel, and a trigger on that same channel)

3) What happens if I set, say, an edge trigger ANDed with a pulse width qualifier. Does it wait until both conditions have happened to trigger? Or does it never trigger? Similary for any ANDed combination of pulse triggers that are never going to be coincident in time?

4) Similarly, does the pulse width qualifier trigger if and only if all the logical conditions are satisfied for the correct period? (entering a pulse counts as "satisfied").

That should do for now. :)

Cheers,

Henry

ziko
Advanced User
Advanced User
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Re: A few questions on advanced triggering

Post by ziko »

Hi I have deleted the response I sent earlier and used one of our engineers responses as it straight from the source so let me know if you have any further questions:

"
Not sure what product, so I'll refer to PS3000A.

1. You cannot create an impossible trigger because separate conditions are OR-ed together - see P78 of manual. In the example the scope would always trigger, rather than never trigger (it would be like trigger mode "none" in PicoScope, or writing a single condition with all rows set to "don't care").

2. The pulse width qualifier is AND-ed with the channel triggers that form part of the same condition. If in your trigger condition you set (for example) ChA and PWQ to "true", then the scope will trigger on an edge on ChA (the end of the pulse) if at that instant in time the pulse width condition you have set is also met. This pulse width condition could relate to ChA (or another channel) and defines the start of the pulse and a time condition (less than a time, more than a time, or inside a time range). If you are using edge triggering for the pulse width, you can use different voltage thresholds for the start and end of the pulse. If you are using window triggering, you must use the same window for the start and end.

Here's an example to set up a trigger for pulses on ChA which are above 0V for between a lower and upper time limit:
• Use ps3000aSetTriggerChannelProperties to set ChA to "level" mode, upper and lower thresholds to zero, and whatever hysteresis you want.
• Use ps3000aSetPulseWidthQualifier to define the start and duration of the pulse. Set a single condition (ChA true), direction "rising lower", pulse width type "in range", and your time thresholds measured in sample intervals.
• Use ps3000aSetTriggerChannelDirections to define the end of the pulse. Set ChA direction to "falling upper".
• Use ps3000aSetTriggerChannelConditions to set a single condition (ChA and PWQ true) which completes your trigger.
3. The edge and pulse conditions must be simultaneously true if they are part of one condition (AND-ed together). So if you set up an edge trigger on ChB and a "less than 100ns" PWQ on ChA, this will only trigger if an edge on ChB happens less than 100ns after an edge on ChA (if you connect the clock of a digital system to ChA and the data to ChB, this is a hold-time trigger). If the condition never happens, the scope never triggers.
4. For the PWQ (as for the main trigger) all the channels set within one condition are AND-ed together so must be simultaneously true for it to count as a pulse.
"
Ziko

Technical Specialist

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

Re: A few questions on advanced triggering

Post by heng »

Thanks Ziko
1. You cannot create an impossible trigger because separate conditions are OR-ed together - see P78 of manual. In the example the scope would always trigger, rather than never trigger (it would be like trigger mode "none" in PicoScope, or writing a single condition with all rows set to "don't care").
Yes, of course - I should have got that!
3. The edge and pulse conditions must be simultaneously true if they are part of one condition (AND-ed together). So if you set up an edge trigger on ChB and a "less than 100ns" PWQ on ChA, this will only trigger if an edge on ChB happens less than 100ns after an edge on ChA (if you connect the clock of a digital system to ChA and the data to ChB, this is a hold-time trigger). If the condition never happens, the scope never triggers.
That is interesting. Does that mean that if the ultimate pulse length is longer than 100ns, that fact doesn't influence whether the trigger fires.

In the case where we _only_ have the PWQ on ChA, does this fire after the pulse has been confirmed to be less than 100ns?

ziko
Advanced User
Advanced User
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Re: A few questions on advanced triggering

Post by ziko »

Hi Heng,

Please find response below:

"Does that mean that if the ultimate pulse length is longer than 100ns, that fact doesn't influence whether the trigger fires.

Yes. In the example we have defined (using the trigger circuit) a "pulse" as being the time between an edge on ChA and a subsequent edge on ChB, and so the time ChA is high for does not matter at all. It could be a second or a few nanoseconds, all that matters is whether an edge on ChB comes along within 100ns of the edge on ChA.


In the case where we _only_ have the PWQ on ChA, does this fire after the pulse has been confirmed to be less than 100ns?

Using only the PWQ is a rather special case and only really makes sense when using a "time greater than" condition. This makes what we call a dropout trigger in the PicoScope software and will fire if the time since the last edge on ChA exceeds 100ns at any time (i.e. a repeating signal like a clock has stopped).

If you want to trigger on the end of a pulse on ChA, only if that pulse was less than 100ns, just follow the directions in my original example in point (2) but change the time condition from "in range" to "less than".

Regards,
"
Ziko

Technical Specialist

Post Reply