Unable to open connection with PicoScope 3406DMSO

Post general discussions on using our drivers to write your own software here
Post Reply
hadi
Newbie
Posts: 0
Joined: Fri Jun 01, 2018 8:30 pm

Unable to open connection with PicoScope 3406DMSO

Post by hadi »

I'm on windows 10 with Picoscope 3406DMSO (3000 series) and have installed the appropriate SDK and PicoScope 6.

I am able to connect to the PicoScope using PicoScope 6 software. However, I am unable to connect to it with the ps3000.dll. I have tried both importing the ps3000.dll into C++ code and also tried the Python wrapper found https://github.com/colinoflynn/pico-pyt ... nnected.py(modified it match 3000 series). My code successfully loads the dll and finds the ps3000_open_unit function, however it consistently returns 0 as the return value (the handle, which means that it could not find the picoscope).

My C++ code is as follows:


#include "stdafx.h"
#include
#include



typedef int16_t (WINAPI * Loadedfunc)();

int main()
{

HMODULE dll = LoadLibrary("ps3000.dll");

if (dll != NULL) {
std::cout << "found dll" << std::endl;

Loadedfunc func = (Loadedfunc)GetProcAddress(dll, "ps3000_open_unit");
int16_t handle = 5;
if (func != NULL) {
handle = func();
std::cout << "handle: " << handle << std::endl;
FreeLibrary(dll);
int x;
std::cin >> x;
}

else {

std::cout << "Couldn't load function" << std::endl;

}
}

else {
std::cout << "Did not find dll" << std::endl;
}

return 0;

}


What am I missing?

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

Re: Unable to open connection with PicoScope 3406DMSO

Post by Martyn »

You are using the ps3000.dll , you actually need the ps3000a.dll , and ps3000a examples, for the 3406DMSO as it is a newer model.
Martyn
Technical Support Manager

Post Reply