Converting ADC 212 Program to PicoScope 2000 Series

 
Post new topic   Reply to topic    Pico Technology Forum Index -> VB and VBA (Excel, Access)
Author Message
kcosta
User
User


Joined: 17 Apr 2008
Posts: 2

PostPosted: Thu Apr 17, 2008 10:09 am    Post subject: Converting ADC 212 Program to PicoScope 2000 Series Reply with quote

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:
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:
 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
Back to top
picojohn
Site Admin
Site Admin


Joined: 11 Jun 2007
Posts: 333

PostPosted: Thu Apr 17, 2008 1:25 pm    Post subject: Reply with quote

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
Back to top
kcosta
User
User


Joined: 17 Apr 2008
Posts: 2

PostPosted: Thu Apr 17, 2008 1:42 pm    Post subject: Reply with quote

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:
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.
Back to top
gruntman
Guru
Guru


Joined: 28 Sep 2006
Posts: 87
Location: Garden City, KS USA

PostPosted: Thu Apr 17, 2008 3:41 pm    Post subject: Reply with quote

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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Pico Technology Forum Index -> VB and VBA (Excel, Access)
All times are GMT
Page 1 of 1

 


Pico Technology topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group