Test and Measurement Forum

Negative trigger delay with SetTriggerDelay()

Post general discussions on using our drivers to write your own software here

Negative trigger delay with SetTriggerDelay()

Postby krishulis » Wed Dec 03, 2014 3:19 pm

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 ?
krishulis
Newbie
 
Posts: 0
Joined: Wed Dec 03, 2014 3:07 pm

Re: Negative trigger delay with SetTriggerDelay()

Postby Hitesh » Thu Dec 04, 2014 10:10 am

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,
Hitesh

Technical Specialist
Pico Technology
Hitesh
Site Admin
Site Admin
 
Posts: 2058
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Negative trigger delay with SetTriggerDelay()

Postby krishulis » Thu Dec 04, 2014 12:50 pm

Excellent, that was exactly what I was looking for.
Thank you !
krishulis
Newbie
 
Posts: 0
Joined: Wed Dec 03, 2014 3:07 pm


Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 2 guests