I am porting my application from using the Picoscope 2405A to the 4244A and Picoscope 7 library API. The purpose of the application is to capture a transient pulse of bipolar characteristics. The application configures the Picoscope to use Windowing with Pulse Width Qualification triggering. The application works perfectly on the 2405A with libps2000a API. Porting to the libps4000a required significant translations from the libps2000a API, principally with the following API functions: ps4000aSetTriggerChannelConditions, ps4000aSetTriggerChannelDirections, ps4000aSetTriggerChannelProperties, ps4000aSetPulseWidthQualifierConditions, ps4000aSetPulseWidthQualifierProperties. All of these functions return PICO_OK, yet when calling ps4000IsTriggerOrPulseWidthQulaifierEnabled() neither trigger nor pulse width qualifier are enabled. I turned off the pulse width qualifying trigger with no luck. I turned off the window trigger and converted to a simple magnitude trigger and still not able to enable triggering. Otherwise I am able to successfully open and read data in block mode from the 4244A. If anyone can help, it would be greatly appreciated. I show my code below for the aforementioned API functions.
void
AcqPicoscope::setTriggerChannelConditions()
{
#pragma pack(1)
PS4000A_CONDITION triggerConditions[] =
{
{ PS4000A_CHANNEL_A, PS4000A_CONDITION_TRUE }, // enable triggering on channel A only
{ PS4000A_CHANNEL_B, PS4000A_CONDITION_DONT_CARE }, // channel B
{ PS4000A_CHANNEL_C, PS4000A_CONDITION_DONT_CARE }, // channel C
{ PS4000A_CHANNEL_D, PS4000A_CONDITION_DONT_CARE }, // channel D
{ PS4000A_EXTERNAL, PS4000A_CONDITION_DONT_CARE }, // external
{ PS4000A_TRIGGER_AUX, PS4000A_CONDITION_DONT_CARE }, // aux
{ PS4000A_PULSE_WIDTH_SOURCE, PS4000A_CONDITION_TRUE } // pulse width qualifier is enabled
};
#pragma pack(0)