I just got a Pico 5242. Plan to develop a VB application for it under Window 8 or 7. Do you have VB or C# examples for 5000 series available that I may use as my project start up? That would save my time to find the right references and get the scope initialization when I start the project in Microsoft Visual Studio.
Which version of Microsoft Visual Studio do you support? How about Visual Studio 2013?
I downloaded your example, complied it on Visual Studio 2013 on 64 bits window 8 OS with warnings but no error. However, when I run it, it gave me the exception of "cannot load ps5000a.dll" on "short status = Imports.OpenUnit(out handle, null, resolution);"
Where may I download this dll? Is there anyone report issues with running via Visual Studio 2013 on 64 bits window 8 OS?
I downloaded Software Development Kit R10.5.2.1, a software development kit (SDK) containing drivers and example code is available for the PicoScope 5242. I did not find any installation program to run.
So I copied the ps5000a.dll to Window/sytem32 folder, the project folder, and the debug folder where PS5000a.exe is. None of them works. The PS5000a sample program still could not find /load the ps5000a.dll.
For a quick test if you are building a 64 bit application, copy the 64bit ps5000a.dll to the same directory as the exe , if building 32bit copy the 32bit dll.
The dll's you need to use on a 64 bit system are in the x64 directory of the sdk, attached here. You will need to put both dll's in your application directory.
I recompiled the PS5000a program. Now it can starts and displays the first massage "PS5000a VB.Net example program". However, I got the exception as "An unhandled exception of type 'System.BadImageFormatException' occurred in PS5000a.exe
Additional information: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"
when it runs to the next statement: status = ps5000aOpenUnit(handle, vbNullString, DeviceResolution.PS5000A_DR_12BIT) below:
Sub Main()
Dim status As UInteger
Dim handle As Short
Console.WriteLine("PS5000a VB.Net example program" & vbNewLine & "==============================" & vbNewLine)
status = ps5000aOpenUnit(handle, vbNullString, DeviceResolution.PS5000A_DR_12BIT)