Test and Measurement Forum

Is this feature available in the public API?

Post your .Net discussions here

Is this feature available in the public API?

Postby davidpruitt » Fri Jul 07, 2017 7:51 pm

We have several PicoScope 2204A oscilloscopes. We are recording a signal that is 500 ms in duration, and throughout the 500 ms duration of time there are a total of 15 biphasic pulses that are each 100 us in duration. We would like to record each biphasic pulse that is 100 us in duration, but we cannot get good enough resolution in "block mode", and "streaming mode" consumes too much CPU power (especially when we connect several PicoScopes to a single computer, each PicoScope consumes about 20% of CPU in streaming mode).

In the PicoScope 6 software, however, we can change some settings that allows us to do something similar to what we need. After connecting to a PicoScope 2204A, I can then go to the Tools menu, and select "Preferences". In this "Preferences" window, under the "General" tab, there is an option to change the "maximum number of waveforms that can be stores in the waveform buffer". We set this to "15". I then select "Apply" and close the window. After that, I change the "Number of Samples" to record in the main window down to 500 samples. This yields a total of 7500 samples which is within the range of the PicoScope 2204A's 8 kS memory buffer. I then set the trigger to "Repeat". Now when I record the signal using the scope, each 100 us pulse shows up as a different "Waveform" that I can flip through in the PicoScope 6 GUI.

I would like to record the signal in this same manner using the API. However, I don't see any way to do a "Repeat" trigger using the API, nor do I see any way to "sub-divide" the waveform buffer so that the PicoScope stores new recordings at different points in the buffer until I retrieve the whole buffer. Any advice on how to do this?
davidpruitt
Advanced User
Advanced User
 
Posts: 21
Joined: Tue May 17, 2016 6:45 pm

Re: Is this feature available in the public API?

Postby Hitesh » Wed Jul 12, 2017 8:53 am

Hi David,

The PicoScope 2204A (and 2205A) do not have segmented memory so the method to achieve what you are looking to do would be to capture successive blocks of data.

It might be a case of doing the following as per section 3.1.1 Using block mode in the Programmer's Guide:

1. Open the oscilloscope using ps2000_open_unit.
2. Select channel ranges and AC/DC coupling using ps2000_set_channel.
3. Using ps2000_set_trigger, set the trigger if required.
4. Using ps2000_get_timebase, select timebases until you locate the required
time interval per sample.
5. Start the oscilloscope running using ps2000_run_block.
6. Poll the driver to find out if the oscilloscope has finished collecting data, using
ps2000_ready.
7. Transfer the block of data from the oscilloscope using ps2000_get_values or
ps2000_get_times_and_values.
8. Display the data.
9. Repeat steps 5 to 8.
10. Stop the oscilloscope using ps2000_stop.
11. Close the device using ps2000_close_unit.

The PicoScope 2000 series oscilloscopes that use the ps2000a driver (e.g. the PicoScope 2405A and 2206B) have the ability to segment the memory for multiple waveform captures in block/rapid block mode.

I hope this helps.

Regards,
Hitesh

Technical Support Engineer
Hitesh
Site Admin
Site Admin
 
Posts: 2429
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire


Return to .Net Languages (C#, VB.Net, .)

Who is online

Users browsing this forum: No registered users and 0 guests