How to configure pulse width trigger mode?

Post your C and C++ discussions here
Post Reply
Posts: 0
Joined: Sat Nov 16, 2019 2:09 am

How to configure pulse width trigger mode?

Post by liao.rand »

How to configure pulse width trigger mode?
I used 500ns positive pulse to trigger the oscilloscope, and I also configured relevant parameters completely according to the data manual.
I used pico2206B. When its time base is 0, the ADC number 250 represents 500ns.

The following is the detailed code of my configuration:
SourceDetails. ThresholdUpper = 250;
SourceDetails. ThresholdUpperHysteresis = 0;
SourceDetails. ThresholdLower = 16256;
SourceDetails. ThresholdLowerHysteresis = 0;
SourceDetails. Channel = PS2000_CHANNEL_A;

SourceDetails. ThresholdMode = LEVEL;

The conditions. ChannelA = CONDITION_TRUE;
The conditions. ChannelB = CONDITION_DONT_CARE;
The conditions. ChannelC = CONDITION_DONT_CARE;
The conditions. ChannelD = CONDITION_DONT_CARE;
The conditions. The external = CONDITION_DONT_CARE;
The conditions. The aux = CONDITION_DONT_CARE;
The conditions. PWQ = CONDITION_TRUE;
The conditions. Digital = CONDITION_DONT_CARE;

Directions. ChannelA = RISING;
Directions. ChannelB = NONE;
Directions. ChannelC = NONE;
Directions. ChannelD = NONE;
Directions. ChanneEXT = NONE;
Directions. ChannelAUX = NONE;

Struct tPwqConditions pwqconditions;
Pwqconditions. ChannelA = CONDITION_TRUE;
Pwqconditions. ChannelB = CONDITION_DONT_CARE;
Pwqconditions. ChannelC = CONDITION_DONT_CARE;
Pwqconditions. ChannelD = CONDITION_DONT_CARE;
Pwqconditions. External = CONDITION_DONT_CARE;
Pwqconditions. Aux = CONDITION_DONT_CARE;

PulseWidth. The conditions = & pwqconditions;
PulseWidth. The lower = 200; / /??
PulseWidth. Upper = 0;
PulseWidth. Type = PW_TYPE_GREATER_THAN;
PulseWidth. NConditions = 1;
PulseWidth. Direction = RISING_LOWER; / /??

However, when I use ps2000aIsTriggerOrPulseWidthQualifierEnabled () this function testing pulse width when the trigger is set, the data returned is (1, 0), is set up the trigger, but didn't set the trigger pulse width.
Please help me.

Post Reply