Negative trigger delay with SetTriggerDelay()

Post general discussions on using our drivers to write your own software here
Post Reply
krishulis
Newbie
Posts: 0
Joined: Wed Dec 03, 2014 3:07 pm

Negative trigger delay with SetTriggerDelay()

Post by krishulis »

Introduction: I am using Picoscope 3404B, with r10_5_1_1 sdk. Working with .NET (C#), based on PS3000ACSConsole example code. I have successfully set timebase, vertical resolutions, signal generator, and captured data based on CollectBlockTriggered method from example.

The question: is there a way to put the trigger event in the middle of received block ?

right now: event - data - data - data - data - data - data
want this: data - data - data - event - data - data - data


Right now, as I understand, trigger event occurs, and then data block is received. I would like to receive data block, where trigger occurs in middle of data points (like on usual oscilloscopes), but i could not find a way to set negative delay with Imports.SetTriggerDelay(_handle, triggerDelay); function, because it's argument - triggerDelay - is unsigned (uint32_t), as written in ps3000abpg.en.pdf r12. If I set triggerDelay value to some value, then it just shifts the trigger event more to the left, which is the exact opposite of what I want to achieve.

Am I missing something? What is the best way to do this ?

Hitesh

Re: Negative trigger delay with SetTriggerDelay()

Post by Hitesh »

Hi krishulis,

From the PicoScope 3000 Series (A API) Programmer's Guide, the definition for the ps3000aSetTriggerDelay is:
This function sets the post-trigger delay, which causes capture to start a defined time
after the trigger event.
The above function would not be suitable as it would cause the device to wait before starting sampling.

The best thing to do would be to set the pre- and post-trigger samples to be 50% of the total number of samples that you wish to capture in the call to Imports.RunBlock

Regards,

krishulis
Newbie
Posts: 0
Joined: Wed Dec 03, 2014 3:07 pm

Re: Negative trigger delay with SetTriggerDelay()

Post by krishulis »

Excellent, that was exactly what I was looking for.
Thank you !

Post Reply