Test and Measurement Forum

ps3000a series: time between waveforms in rapid block mode

Post your C and C++ discussions here

ps3000a series: time between waveforms in rapid block mode

Postby aboi » Thu Jun 01, 2017 1:47 pm

Dear Forum

I use a ps3404MSO to measure edge positions within a digital data stream with an accuracy of ~50ns and an edge frequency of <5kHz.

I want to identify edge times of many consecutive edges (>10.000).

I know it is possible to calculate the edge times via post processing of the streamed data once it is saved on the PC using any programming language but this is quite cumbersome and time consuming since the high sample rate leads to a very large amount of data to be stored and processed.

Checking the API, I found the triggered Rapid Block Mode to capture consecutive edges (wave forms) in separate memory segments. By keeping the pre- and postrigger number of samples to a minimum, many edges can be recorded. Unfortunately, I could not find any way in the API Programmer’s Guide to get the time between consecutive waveforms.

In principle, this information seems to be provided by the function ps3000aGetTriggerInfoBulk (*triggerinfo). The API Programmer’s Guide does not detail the information provided in this structure. It points out, though, that this feature is only available on PicoScopes 3207A and 3207B models. This is quite surprising, since I would have considered 34xx devices more capable than 32xx devices.

My questions therefore are:
- Is rapid block mode the best option to capture multiple trigger events from a digital signal or is there another option I have overlooked?
- If rapid block mode is the best option, is it correct, that 34xx devices cannot provide time between consecutive trigger events (correctly stored in separate memory segments)?

All related advice is highly appreciated!

Thank you


Following, a code example operating the PicoScope in Rapid Block mode, resulting in 1000 edges being recorded and transferred to the PC. Question: How to get the times between the segments in overflow?

Code: Select all
// --- Setup ---// Set level trigger on Channel A

int16_t  triggerVoltage = mv_to_adc(1000, unit->channelSettings[PS3000A_CHANNEL_A].range, unit);
struct tPS3000ATriggerChannelProperties sourceDetails = { triggerVoltage, 256 * 10,triggerVoltage,256 * 10,
PS3000A_CHANNEL_A,PS3000A_LEVEL };
struct tPS3000ATriggerConditionsV2 conditions = { PS3000A_CONDITION_TRUE,PS3000A_CONDITION_DONT_CARE,PS3000A_CONDITION_DONT_CARE,
PS3000A_CONDITION_DONT_CARE,PS3000A_CONDITION_DONT_CARE,PS3000A_CONDITION_DONT_CARE,PS3000A_CONDITION_DONT_CARE,
PS3000A_CONDITION_DONT_CARE };
struct tPwq pulseWidth;
struct tTriggerDirections directions = { PS3000A_RISING, PS3000A_NONE,PS3000A_NONE,PS3000A_NONE,PS3000A_NONE,   PS3000A_NONE };
memset(&pulseWidth, 0, sizeof(struct tPwq));

// Set up Trigger
setTrigger(unit, &sourceDetails, 1, &conditions, 1, &directions, &pulseWidth, 0, 0, 0, 0, 0);
// Find the maximum number of segments
status = ps3000aGetMaxSegments(unit->handle, &maxSegments);
printf("Max. number of segments for device: %d\n", maxSegments);
// Set the number of segments (max for ps3404MSO -> 53000 segments)
nSegments = 1000;
status = ps3000aMemorySegments(unit->handle, nSegments, &nMaxSamples);
// Set the number of captures
nCaptures = 1000;
status = ps3000aSetNoOfCaptures(unit->handle, nCaptures);
// Verify timebase index is valid, sample interval will be device dependent
timebase = 2;// Set the number of captures to be retrieved per capture to 2
uint32_t nSamples = 2;
overflow = (int16_t *)calloc(unit->channelCount * nCaptures, sizeof(int16_t));

// --- Run Block ---
status = ps3000aRunBlock(unit->handle, 0, nSamples, timebase, 1, &timeIndisposed, 0, callBackBlock, NULL);
// [collecting data ..]
// --- Retrieve data ---
       status = ps3000aGetValuesBulk(unit->handle, &nSamples, 0, nCaptures - 1, 1, PS3000A_RATIO_MODE_NONE, overflow);
aboi
Newbie
 
Posts: 0
Joined: Mon May 08, 2017 12:45 pm

Re: ps3000a series: time between waveforms in rapid block mo

Postby Hitesh » Mon Jun 05, 2017 9:06 am

Hi aboi,

Could you please e-mail support@picotech.com and we can then discuss this further.

Thanks,
Hitesh

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


Return to C and C++

Who is online

Users browsing this forum: No registered users and 0 guests