I recently got a picoscope 3205D and I have to develop a code in C# that can connect to it and use some ps3000 functions to communicate with it.
The problem is that, I plug it to my pc, launch it with the function ps3000_open_unit() but the return keep being "0", which mean "No picoscope found". (-1 for connection failure and >0 for successful connection)

If you have a solution, I let you my code hereunder and I'll be glad that you help me !

And if you have any question about my code, let me know on this topic channel.

Thank you for your attention,

Matmattah
Code: Select all
private void button_launch_Click(object sender, EventArgs e)
{
int ret_int = ps3000.OpenRet();
if (ret_int > 0)
{
listbox_logs.Items.Add("PicoScope openned\n");
}
else if (ret_int == 0)
{
listbox_logs.Items.Add("No PicoScope found\n");
//Thread.Sleep(500);
//this.Close();
}
else if (ret_int == -1)
{
listbox_logs.Items.Add("The PicoScope fails to open\n");
//Thread.Sleep(500);
//this.Close();
}
}
Code: Select all
public int OpenRet()
{
int r = ps3000_open_unit();
return r;
}