Test and Measurement Forum

capture and display all buffers from channels

Post your VB and VBA discussions here

capture and display all buffers from channels

Postby sachi_impedx » Mon Feb 29, 2016 9:25 pm

Hi,
I have a picoscope 5444A and have downloaded the SDK for it. I have modified the PS5000A excel file with GetData VBA to get data from channel A and Channel B of the picoscope.
However, my actual goal is to get to display 5 buffers/5 waveforms for each channel. I know I have to ue memorysegments and setnoofcaptures, which I have.

Code: Select all
status = ps5000aGetTimebase(handle, timebase, numSamples, timeInterval, maxSamples, 0)
   
    ' set memoty segments
    Call ps5000aMemorySegments(handle, 64, maxSamples)
    Call ps5000aSetNoOfCaptures(handle, 5)
   
    ' Set Data Buffers
    Call ps5000aSetDataBuffer(handle, 0, valuesChA(0), numSamples, 0, 0) ' segment index 0, no downsampling
    Call ps5000aSetDataBuffer(handle, 1, valuesChB(0), numSamples, 0, 0) ' segment index 0, no downsampling
   


But I am not sure how to setdatabuffers and getvaluesbulk to get it to display all 5 waveforms for each channel. Could someone please help with this code.
sachi_impedx
Newbie
 
Posts: 0
Joined: Mon Feb 29, 2016 8:22 pm

Re: capture and display all buffers from channels

Postby Hitesh » Tue Mar 01, 2016 2:20 pm

Hi sachi_impedx,

This post may provide provide some useful guidance.

You will need to set up a 3D array where each channel/segment combination has a data array assigned to it. These are then individually set with the ps5000aSetDataBuffer() function so that the driver has a location to write the data to when the ps5000aGetValuesBulk() function is called.

Are you using Rapid Block mode to capture events with minimum re-arm time or do you just need to capture 5 events per channel?

Regards,
Hitesh

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

Re: capture and display all buffers from channels

Postby sachi_impedx » Thu Mar 03, 2016 5:56 pm

I am just using regular runblock function. I am trying to get 5 buffers per channel displayed on my excel file;
Is there a code I could use to set up 3D arrays and use SetDataBuffers?
sachi_impedx
Newbie
 
Posts: 0
Joined: Mon Feb 29, 2016 8:22 pm

Re: capture and display all buffers from channels

Postby Hitesh » Thu Mar 10, 2016 10:35 am

Hi sachi_impedx,

How far apart are the events that you are trying to capture for each channel?

This will determine if you can use a standard block capture approach in a loop (you would not need to set up a 3D array in this case) or use the rapid block functions.

Regards,
Hitesh

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


Return to VB and VBA (Excel, Access)

Who is online

Users browsing this forum: No registered users and 0 guests