Test and Measurement Forum

Converting ADC 212 Program to PicoScope 2000 Series

Post your VB and VBA discussions here

Converting ADC 212 Program to PicoScope 2000 Series

Postby kcosta » Thu Apr 17, 2008 10:09 am

Hello, I'm trying to convert a program that was originally written for an ADC 212 to use a PicoScope 2202.

In the old program I used the function:
Code: Select all
Call adc200_get_single(Values(Int_Channels))

to get a single value from the scope.

What is the equivalent function for the ps2000 series?

I have tried:
Code: Select all
ps2000_get_values(ps2000_handle, Values_a(0), Values_b(0), values_c(0), values_d(0), overflow, no_of_values)

with no_of_values set to 1, but it always returns 0.

Any ideas?

Thanks,
Keith
kcosta
User
User
 
Posts: 2
Joined: Thu Apr 17, 2008 9:10 am

Postby picojohn » Thu Apr 17, 2008 1:25 pm

Hello Keith,

Please try using the PS2000.dll with the programming examples for the PS3000 series, but replacing ps3000 with ps2000 for the routines that are applicable to a PS2000.

Please also refer to the following link: http://www.picotech.com/support/kb/SoftwareInstallation-kb185

Regards
John
picojohn
Zen Master
Zen Master
 
Posts: 382
Joined: Mon Jun 11, 2007 1:10 pm

Postby kcosta » Thu Apr 17, 2008 1:42 pm

Hi John,

Thanks for the reply, I got the example app to work, so I can communicate with the PicoScope 2000, but what I would like to know is which function in the new API can I use that will function as closely as possible to the old one that I used?

The old function was
Code: Select all
Call adc200_get_single(Values(Int_Channels))


But I can not find a similar function in the new API.

I just need it to return a signal value when it is called.
kcosta
User
User
 
Posts: 2
Joined: Thu Apr 17, 2008 9:10 am

Postby gruntman » Thu Apr 17, 2008 3:41 pm

Keith,

There is not a direct equivalent function for the PS2000 series as the ADC-212's adc200_get_single. The way you would set it up to get a single value in the closest way would be to set the scope up in block mode. First you would need to call the following calls:
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 time bases until you locate the required time interval per sample.

Next you will need to call ps2000_run_block(). On this function you will need to state the number of samples as 1. Then wait until ps2000_ready() is ready. Next call ps2000_get_values() to display the single value. After this you simply have to call ps2000_run_block(), ps2000_ready(), and ps2000_get_values() to get you next single value when you need it. After this is done simply call ps2000_stop().

Regards,

Richard Boyd
Crag Technologies, Inc
http://www.pc-oscilloscopes.com
gruntman
Guru
Guru
 
Posts: 109
Joined: Thu Sep 28, 2006 3:50 pm


Return to VB and VBA (Excel, Access)

Who is online

Users browsing this forum: No registered users and 0 guests