Samples from SDK will not run

Having problems ? let us know the details here
Post Reply
JanK
Newbie
Posts: 0
Joined: Sun Dec 08, 2013 1:44 pm

Samples from SDK will not run

Post by JanK » Sun Dec 08, 2013 2:00 pm

I just bought a 5244B and connected it to my windows 8 PC. The picoscope software works fine. When I try to compile the sample code from the SDK in directory "C Console," visual studio 2005 is complaining about <stdinh.h>.
Next I tried the sample code "C# console" and that is running but will not find the scope (error 3).

When I download the SDK I selected the scope 5244 as product.
Can you help me?

Martyn
Site Admin
Site Admin
Posts: 3309
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Samples from SDK will not run

Post by Martyn » Mon Dec 09, 2013 7:11 am

stint.h is not part of VS2005, a copy from C:\Program Files\Microsoft Visual Studio 10.0\VC\include for VS2010 attached.
stdint.h
(5.17 KiB) Downloaded 225 times
There is no C# example in the current sdk for the new 5000 series devices, you must be using one for the old model which will not recognise the scope as you have found. Attached is a simple forms based example for a block capture that will get you going.
PS5000ABlockCapture.zip
Simple Block Capture C# Form Example
(1.29 MiB) Downloaded 157 times
Martyn
Technical Support Manager

JanK
Newbie
Posts: 0
Joined: Sun Dec 08, 2013 1:44 pm

Re: Samples from SDK will not run

Post by JanK » Tue Dec 10, 2013 7:41 pm

:D The C# version if working fine now. Thanks for the response.

SteveHageman
Newbie
Posts: 0
Joined: Sat Sep 27, 2014 3:05 am

Re: Samples from SDK will not run

Post by SteveHageman » Sat Sep 27, 2014 5:24 am

Hi - Thanks to your very good manual I was able to get my 5244B to run with USB only Power with this BlockCapture example.

I had to make a new DLL Import for the PowerSource function, then call it like below after calling the OpenDevice,

Code: Select all

[DllImport(_DRIVER_FILENAME, EntryPoint = "ps5000aChangePowerSource")]
        public static extern short ChangePowerSource(short handle, PicoStatus powerstate);
. . . .

Code: Select all

status = Imports.ChangePowerSource(handle, Imports.PicoStatus.PICO_POWER_SUPPLY_NOT_CONNECTED);
After this call the status will be 0x00 and the example runs on USB power.

Thanks for the help and providing this example as it saved me countless hours.

Steve Hageman

SteveHageman
Newbie
Posts: 0
Joined: Sat Sep 27, 2014 3:05 am

Re: Samples from SDK will not run

Post by SteveHageman » Sun Sep 28, 2014 2:50 pm

[Edit] - I removed a duplicate post.....

Post Reply