Test and Measurement Forum

Problem in running C++/C DEMO

Post your C and C++ discussions here

Problem in running C++/C DEMO

Postby rivallis » Mon Feb 04, 2013 2:28 am

Hi, PICO support engineer,

I newly bought a PICO 3206A and trying to modify the driver to continuously capture the data with high frequency.
At the well beginning, I tried to run the DEMO, which was included in the PS3000asdk_r10_4_3_5 package. I exactly followed
the instructions in the PS3000Acon.c, just as:
To build this application:
* Set up a project for a 32-bit console mode application
* Add this file to the project
* Add PS3000A.lib to the project
* Add ps3000aApi.h and picoStatus.h to the project
* Build the project

However, lots of function definitions are lost, such as:
PS3000A_PWQ_CONDITIONS_V2: undefined
PS3000A_MAX_LOGIC_LEVEL: undefined
PS3000A_DIGITAL_PORT0: undefined
PS3000A_DIGITAL_PORT1: undefined
PS3000A_DIGITAL_PORT: undefined
ps3000aSetDigitalPort: undefined
PS3000A_MAX_DIGITAL_PORTS: undefined...

I checked the ps3000aApi.h, in which those above interface should be created. I only found the PS3000A_PWQ_CONDITIONS, without _V2(Version 2? might be).

I guess the ps3000aApi.h attached in the PS3000asdk_r10_4_3_5 was not the latest one?
Could the support engineer give some help? Thank you in advance.
rivallis
Newbie
 
Posts: 0
Joined: Wed Jan 30, 2013 7:24 am

Re: Problem in running C++/C DEMO

Postby Hitesh » Mon Feb 04, 2013 1:26 pm

Hi Rivallis,

The header file in the SDK dates back to before the launch of the PicoScope 3000 MSO devices. Please find below the correct header file to use.

Hope this helps.
Attachments
ps3000aApi.h
PS3000a Header file
(24.65 KiB) Downloaded 191 times
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: Problem in running C++/C DEMO

Postby fabian.feilcke » Fri Jun 21, 2013 1:35 pm

Hi,

i seem to have the same Problem with the SDK. I downloaded the SDK PS3000asdk_r10_5_0_19
if i try to build the C++ example i get the following error:
Code: Select all
1>Kompilieren...
1>PS3000Acon.c
1>d:\tools\pico\c_console\ps3000acon.c(324) : error C2065: 'PS3000A_MAX_LOGIC_LEVEL': nichtdeklarierter Bezeichner
1>Das Buildprotokoll wurde unter "file://c:\Users\FabianF\Documents\Visual Studio 2008\Projects\Pico Console\Pico Console\Debug\BuildLog.htm" gespeichert.
1>Pico Console - 1 Fehler, 0 Warnung(en)


Visual.png
The Project looks like this


I downloaded the file from this thread as well but get the same result

Any Ideas?
fabian.feilcke
Newbie
 
Posts: 0
Joined: Fri Jun 21, 2013 1:30 pm

Re: Problem in running C++/C DEMO

Postby Hitesh » Fri Jun 21, 2013 2:33 pm

Hi Fabian,

In the ps3000aApi.h file please add the following lines in section containing the #define lines:

Code: Select all
#define PS3000A_MAX_LOGIC_LEVEL     32767
#define PS3000A_MIN_LOGIC_LEVEL     -32767


The header file should be updated in the SDK in the near future.

I hope this helps.
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: Problem in running C++/C DEMO

Postby fabian.feilcke » Mon Jun 24, 2013 10:42 am

Works like a charm, thanks.
fabian.feilcke
Newbie
 
Posts: 0
Joined: Fri Jun 21, 2013 1:30 pm


Return to C and C++

Who is online

Users browsing this forum: No registered users and 0 guests