Trying to digest the setting up of Triggers with the PS5000con.c sample provided with the software. From reading the API function descriptions, I'm trying to see if I understand the use of multiple structs for the two functions (ps5000SetTriggerChannelConditions and ps5000SetTriggerChannelProperties)
Saying that you can pass an array of structs and the function will do some logical voodoo on it to setup the trigger.
Correct me if I'm wrong, if I understand this correctly (I am not an expert on using an o-scope! Pico or otherwise), I have the ability to trigger the scope based on the following scenario...
I can have the software start a trigger IF either
Rising trace at 75mV on channel A
or
Rising trace at -50mV on channel B
To do this, I can setup two "Structs" as defined by tTriggerChannelProperties and set them to
struct#1 "75mv", Channel A
struct#2 "-50mV", Channel B
Ignoring the other values (hysteresis, threshholdMode...)...
When sent to the function ps5000SetTriggerChannelProperties, it will logically OR the two structs and then define ONE trigger to basically go off when either of the conditions apply?
It doesn't look like one can associate a FALLING direction and a RISING direction in the same trigger? i..e the trigger direction is not a field in this struct... i.e if I wanted to set up a trace with a rising 75mV or a falling -50mV in the above example...
For ps5000SetTriggerChannelConditions,
if I set channel A and channel B to CONDITION_TRUE in the same Struct, this means that the trigger has to exist on both channel inputs (a LOGICAL-AND) but if I send in more than one structs to the above function, this would basically be a LOGICAL-OR.
Are there examples running around somewhere? Just want to make sure I understand the logic and stuff here..
Jay
Cart

