How to get the information from the driver ps3000 c#?

Post your .Net discussions here
Post Reply
verter
Newbie
Posts: 0
Joined: Mon Nov 24, 2014 4:21 pm

How to get the information from the driver ps3000 c#?

Post by verter » Sat Jul 23, 2016 6:00 am

Code: Select all

private void button1_Click(object sender, EventArgs e)
        {
            textBox1.Text = "-1";
            _handle = ps3000_open_unit();
            textBox1.Text = _handle.ToString();
            GetInfo(A);
            ps3000_close_unit(_handle);
            textBox3.Text = A.ToString();
        }
        private string GetInfo(InfoType info)
        {
            StringBuilder s = new StringBuilder(_NUM_UNIT_INFO_CHARS);

            
            ps3000_get_unit_info(_handle, s, _NUM_UNIT_INFO_CHARS, info);
            textBox2.Text = s.ToString();
            return s.ToString();
        }

how to get UsbVersion (ps3000_get_unit_info) ?
Attachments
prot_v1.rar
(26 KiB) Downloaded 188 times
kod.JPG

Sanjay
User
User
Posts: 3
Joined: Mon Jun 20, 2016 1:08 pm

Re: How to get the information from the driver ps3000 c#?

Post by Sanjay » Thu Jul 28, 2016 11:55 am

Here you go:

Code: Select all

MessageBox.Show(GetInfo(InfoType.UsbVersion));
And to just place the version in the text box without a message box:

Code: Select all

GetInfo(InfoType.UsbVersion);

Post Reply