Fastest sampling rates

Post your VB and VBA discussions here
Post Reply
davewilliams
Newbie
Posts: 0
Joined: Wed Feb 10, 2016 9:28 pm

Fastest sampling rates

Post by davewilliams » Sun Feb 28, 2016 9:14 am

Hi (Hitesh),

I'm using a Picoscope 3406DMSO and am having trouble getting it to work faster than a 4ns time interval. I wonder if you can help?

I'm measuring pulses from a scintillation-based radiation detector. I wish to measure the time of the pulse (relative to a trigger TTL signal) and the pulse's shape with as much temporal resolution as I can.
I'm trying to measure this analogue signal on Channel B and am using Channel A for the trigger
After calling ps3000aGetTimebase() with timebase value 0 or 1, the device reports status 14 (PICO_INVALID_TIMEBASE).
I think this unit is capable of a 2ns sample interval with timebase=1. The table on page 8 of the API programmers guide says "2ns, No more than two channels or digital ports enabled". Am I right in thinking the unit is capable of 2ns time resolution, if so, how do I access that?

Also, I was wondering, is there a VBA call to ps3000aSetBandwidthFilter() and ps3000aGetTimebase()?

Hope you can help?

Yours,

Dave

Hitesh
Site Admin
Site Admin
Posts: 2812
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Fastest sampling rates

Post by Hitesh » Mon Feb 29, 2016 2:48 pm

Hi Dave,

By default, all channels will be enabled when a connection is established with the PicoScope (including digital ports).

Try calling the ps3000aSetChannel() function to explicitly turn off Channels C and D as well as ps3000aSetDigitalPort() to turn off Digital PORT0 and PORT1. This should then allow you to use a timebase of 1.

With regards to the two functions, the ps3000aGetTimebase() function declaration is shown in the example file:

Code: Select all

Declare Function ps3000aGetTimebase Lib "ps3000a.dll" (ByVal handle As Integer, ByVal timebase As Long, ByVal noSamples As Long, ByRef timeInterval As Long, ByVal oversample As Integer, ByRef maxSamples As Long, ByVal segmentIndex As Long) As Long
and the ps3000aSetBandwidthFilter() function can be declared in a similar manner to the other functions defined in the example file:

Code: Select all

Declare Function ps3000aSetBandwidthFilter Lib "ps3000a.dll" (ByVal handle As Integer, ByVal channel As Long, ByVal bandwidth As Long) As Long
Hope this helps.
Hitesh

Technical Support Engineer

davewilliams
Newbie
Posts: 0
Joined: Wed Feb 10, 2016 9:28 pm

Re: Fastest sampling rates

Post by davewilliams » Tue Mar 01, 2016 9:47 am

Thanks Hitesh,

You're correct, explicitly disabling works, I'm now able to acquire with a 2ns interval by calling:
Call ps3000aSetChannel(handle, 0, 1, 1, RangeA, 0) ' Ch A: enabled, DC Coupled, RangeA, 0.0V offset
Call ps3000aSetChannel(handle, 1, 1, 1, RangeB, 0) ' Ch B: enabled, DC Coupled, RangeB, 0.0V offset
Call ps3000aSetChannel(handle, 2, 0, 1, 0, 0) ' Ch C: disabled
Call ps3000aSetChannel(handle, 3, 0, 1, 0, 0) ' Ch D: disabled
Call ps3000aSetDigitalPort(handle, &H80, 0, 1) ' Digital Port 1 disabled
Call ps3000aSetDigitalPort(handle, &H81, 0, 1) ' Digital Port 2 disabled

Sorry, you're quite right ps3000aGetTimebase() is the the example, I actually meant to ask about the signal generator commands such as ps3000aSetSigGenBuiltIn() [I copied and pasted from the manual pdf and somehow the copy didn't 'take', sorry about that]

I couldn't find ps3000aSetSigGenBuiltIn() or ps3000aSetSigGenPropertiesBuiltIn(),
ps3000aSetSigGenArbitrary() or ps3000aSetSigGenPropertiesArbitrary() in the wrapper.c program in C:\PicoSDK\PS3000A\C wrapper\ps3000aWrap.c

Is there a way to set the signal generator?

Yours,

Dave

Hitesh
Site Admin
Site Admin
Posts: 2812
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Fastest sampling rates

Post by Hitesh » Tue Mar 01, 2016 2:10 pm

Hi Dave,

The wrapper libraries primarily designed to help with programming languages like Excel VBA that do not support C-style callback functions and also to simplify the process of calling the advanced trigger functions by avoiding the use of structures.

You can follow the existing function declarations in the file and define the signal generator functions using the definitions in the ps3000aApi.h file/Programmer's Guide and mapping the correct data types.

Regards,
Hitesh

Technical Support Engineer

davewilliams
Newbie
Posts: 0
Joined: Wed Feb 10, 2016 9:28 pm

Re: Fastest sampling rates

Post by davewilliams » Thu Mar 03, 2016 10:12 pm

Many thanks Hitesh, I'll do that, Dave

Post Reply