Open the Pico

Post your .Net discussions here
Post Reply
Matmattah
Newbie
Posts: 0
Joined: Tue Jan 31, 2023 9:49 am

Open the Pico

Post by Matmattah »

Hi everyone,

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 ! :lol:
And if you have any question about my code, let me know on this topic channel. :wink:

Thank you for your attention, :D
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();
            }
        }
The function OpenRet() :

Code: Select all

public int OpenRet()
        {
            int r = ps3000_open_unit();

            return r;
        }

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

Re: Open the Pico

Post by Martyn »

The 3205D uses the ps3000a.dll not the ps3000.dll You will find some example C# code here https://github.com/picotech/picosdk-c-s ... er/ps3000a
Martyn
Technical Support Manager

Matmattah
Newbie
Posts: 0
Joined: Tue Jan 31, 2023 9:49 am

Re: Open the Pico

Post by Matmattah »

Thank you very much, it seems to work but, now, the return tells that the Pico isn't responding :
07 | PICO_NOT_RESPONDING
The PicoScope is not responding to commands from the PC
I don't know what to do next, I think I made all the steps to make it work correctly. :roll:
(good library, connection to a good power supply, arguments)

If you have one more solution i'm a taker.

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

Re: Open the Pico

Post by Martyn »

Did you try to run the code from GitHub without making any changes?

If not can you post the code you are using.
Martyn
Technical Support Manager

Matmattah
Newbie
Posts: 0
Joined: Tue Jan 31, 2023 9:49 am

Re: Open the Pico

Post by Matmattah »

Finally it was just a stupid mistake from me, thank you for your help anyway. :wink:

Post Reply