SDK problem with the PS 5444B

Post your C and C++ discussions here
Post Reply
shenrotin
Newbie
Posts: 0
Joined: Mon Jul 15, 2013 11:40 am

SDK problem with the PS 5444B

Post by shenrotin »

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

Post by shenrotin »

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.

Hitesh

Re: SDK problem with the PS 5444B

Post by Hitesh »

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 860 times
A more detailed example should be available soon.

I hope this helps.

shenrotin
Newbie
Posts: 0
Joined: Mon Jul 15, 2013 11:40 am

Re: SDK problem with the PS 5444B

Post by shenrotin »

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

Post by shenrotin »

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.

Hitesh

Re: SDK problem with the PS 5444B

Post by Hitesh »

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 854 times
Regards,

shenrotin
Newbie
Posts: 0
Joined: Mon Jul 15, 2013 11:40 am

Re: SDK problem with the PS 5444B

Post by shenrotin »

Thanks! Problem solved. It worked easily with mingw64 (http://sourceforge.net/projects/mingw-w64/) under Windows 7.

ivan.capraro
Newbie
Posts: 0
Joined: Fri May 27, 2022 3:11 pm

Re: SDK problem with the PS 5444B

Post by ivan.capraro »

Hi, I am also using PS5444B, well trying to.
I've downloaded and installed the SDK, open up the example but the file picoConnectProbes.h is not in the SDK, and so the file PicoDeviceStructs.h complains about it...

I was able to compile and run the example file you have shared above, but that is just the connection, I wonder if for a complete example that file is required or not. Thanks

Post Reply