Test and Measurement Forum

SDK problem with the PS 5444B

Post your C and C++ discussions here

SDK problem with the PS 5444B

Postby shenrotin » Mon Jul 15, 2013 11:59 am

Hello,

I recently bought a PS5444B. Everything is running well with the provided software Picoscope6.

I'm trying to use the SDK to communicate with a PS5444B. I recently downloaded the SDK 5000 from this site. I'm trying to run the simplified example:

Code: Select all
   char ch;
   int i;
   PICO_STATUS status;
   UNIT_MODEL unit;

   printf("PS5000 driver example program\n");
   printf("Version 1.0\n\n");
   printf("\n\nOpening the device...\n");
   fflush(stdin);


   //open unit
   status = ps5000OpenUnit(&(unit.handle));
   printf("Handle: %d\n", unit.handle);
   fflush(stdin);
   if (status != PICO_OK)
   {
      printf("Unable to open device\n");
      printf("Error code : %d\n", status);
      fflush(stdin);
      exit(-1); // exit program - nothing after this executes
   }

I tried to compile this with gcc (GCC) 4.6.2 (MinGw) under windows 7 (x64, processor intel i5). The compilation is ok. The link is made with "PS5000.lib".

However, when I run the code, after the splashscreen, I get:

"Opening the device...
Handle: 0
Unable to open device
Error code : 3"

I also tried in C# and I got a similar behaviour. I wonder if this is not related to the 32-bits/64-bits compatibility issues.
How can I make sure my program uses the same dll's than the PicoScope 6 software ? How can I make sure I use the correct dll. I'm not too sure to understand how the link is made.
Maybe I need to copy certain files in the system directories, could you provide a complete description of the list of these files?

Could you help me with this ? Are there other troubleshooting tests I could perform ?

Thank you.

Henrotin Sébastien.
shenrotin
Newbie
 
Posts: 0
Joined: Mon Jul 15, 2013 11:40 am

Re: SDK problem with the PS 5444B

Postby shenrotin » Mon Jul 15, 2013 5:45 pm

I also noticed that the file PS5000a.lib is provided on the installation CD.
I tried to use this one instead, but the header is missing and the function signatures are different than in the file PS5000.lib

Sébastien.
shenrotin
Newbie
 
Posts: 0
Joined: Mon Jul 15, 2013 11:40 am

Re: SDK problem with the PS 5444B

Postby Hitesh » Tue Jul 16, 2013 1:48 pm

Hi Sébastien,

We are aware that the SDK for the PicoScope 5203 and 5204 is being mapped to the new PicoScope 5000 series devices on our website.

I've uploaded the files that you need including a basic C file that opens the unit, displays unit information and closes the unit. Note that the call to open unit allows you to specify the resolution of the device.

PS5000a_C.zip
Files for C example
(4.68 MiB) Downloaded 196 times


A more detailed example should be available soon.

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: SDK problem with the PS 5444B

Postby shenrotin » Tue Jul 16, 2013 2:07 pm

Great! Your example works fine. I'm going to try to fetch some values, now. Thanks a lot.

Sébastien.
shenrotin
Newbie
 
Posts: 0
Joined: Mon Jul 15, 2013 11:40 am

Re: SDK problem with the PS 5444B

Postby shenrotin » Thu Jul 18, 2013 9:47 am

Hello,

Everything works pretty well. I'm able to use the SDK to fetch data. However, I would like to compile my program to target a X64 machine. Do you know if the same lib (PS5000a) exist in 64-bits ?

Thank you.

Sébastien.
shenrotin
Newbie
 
Posts: 0
Joined: Mon Jul 15, 2013 11:40 am

Re: SDK problem with the PS 5444B

Postby Hitesh » Fri Jul 19, 2013 12:26 pm

Hi Sébastien,

Please find the lib and dll in the attached zip file.

ps5000a_x64.zip
64-bit PS5000a.dll & lib file
(1.13 MiB) Downloaded 186 times


Regards,
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: SDK problem with the PS 5444B

Postby shenrotin » Fri Jul 19, 2013 2:42 pm

Thanks! Problem solved. It worked easily with mingw64 (http://sourceforge.net/projects/mingw-w64/) under Windows 7.
shenrotin
Newbie
 
Posts: 0
Joined: Mon Jul 15, 2013 11:40 am


Return to C and C++

Who is online

Users browsing this forum: No registered users and 0 guests