Test and Measurement Forum

2205A Example on CodeBlocks

Post your C and C++ discussions here

2205A Example on CodeBlocks

Postby searchresults » Thu Oct 06, 2011 7:55 pm

Hi all,
I am trying to get an example program running for the 2205A on CodeBlocks.

As I understand it, there is no C++ example for the 2205A, only a C example. I am completely inexperienced in these matters; so, I don't actually know if the difference between C & C++ is trivial or not.

Can anyone offer help getting a C or C++ example for the 2205A running?

thanks!
Charlie
searchresults
Newbie
 
Posts: 0
Joined: Thu Oct 06, 2011 7:48 pm

Re: 2205A Example on CodeBlocks

Postby Martyn » Fri Oct 07, 2011 6:54 am

I am not familiar with CodeBlocks as an IDE, I use Microsoft Visual C++ 2010 Express Edition for which the process is

  • Create an empty Windows Console Application
  • Copy "PS2000con.c", "ps2000.h", and "PS2000.lib" to the project folder
  • Add these existing items to the project
  • Build and Run
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2355
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: 2205A Example on CodeBlocks

Postby searchresults » Mon Oct 10, 2011 5:26 pm

Hi Martyn,
Thanks for the help!

I think I did what you suggested, but I still get a bug:
I did the following:
- Installed Microsoft Visual C++ 2010 Express Edition
- Created a new empty console application
- Copied the three files into the project folder
- Placed them into their respective folders in VC++ (PS2000.h -> Header Files, PS2000.lib -> Resource Files, and PS2000con.c -> Source Files.)

The code will successfully build but, when I try to run it I get the following error:

"This application has failed to start because ps2000.dll was not found. Re-installing the application may fix the problem."

I'm not sure what they mean by re-installing the application. I tried putting ps2000.dll in the project file, but that didn't work either.

I have the Picoscope 2205A plugged in and have checked it with PicoScope 6.

Thanks!
searchresults
Newbie
 
Posts: 0
Joined: Thu Oct 06, 2011 7:48 pm

Re: 2205A Example on CodeBlocks

Postby searchresults » Mon Oct 10, 2011 8:53 pm

Hi Martyn,
I was able to get the example going; thanks again for the help.

I followed your instructions but got an error saying it couldn't locate PS2000.dll. I copied this file to the "WINDOWS/system32" folder and it worked perfectly.

(I'm mentioning this for anyone else who comes across the same problem)
searchresults
Newbie
 
Posts: 0
Joined: Thu Oct 06, 2011 7:48 pm


Return to C and C++

Who is online

Users browsing this forum: No registered users and 0 guests