ps3000aGetUnitInfo

Post your C and C++ discussions here
Post Reply
Lukasz Matuszak
Newbie
Posts: 0
Joined: Thu Sep 11, 2014 8:47 am

ps3000aGetUnitInfo

Post by Lukasz Matuszak » Thu Dec 13, 2018 3:37 pm

Hi, I have copied the example from SDK file PS3000ACSConsole.sln regarding GetDeviceInfo.

Code: Select all

System.Text.StringBuilder line = new System.Text.StringBuilder(80);
		
	    short status;	
            if (_handle >= 0)
            {
                for (int i = 0; i < 11; i++)
                {
                    short requiredSize;
                    status = Imports.GetUnitInfo(_handle, line, 80, out requiredSize, i);
                    if (i == 3)
                    {
                        if (line.ToString().Contains("340"))    // PS340XA/B device
                            _channelCount	= QUAD_SCOPE;
                        else
                            _channelCount	= DUAL_SCOPE;
                    }
                    if (i == 3)
                    {
                        if (line.ToString().EndsWith("MSO"))
                            _digitalPorts = 2;
                        else
                            _digitalPorts = 0;

                    }
                    Console.WriteLine("{0}: {1}", description[i], line);
                }
            }
        }
After Imports.GetUnitInfo is executed i = 0, status = 0 and line returns 1.3.0.136
next time round when i = 1, status = 42 and line is empty. The line is always empty for me from i = 1 till i = 11

In programming guide PDF file it tells if:
* string, on exit, the information string selected specified by the
info argument. If string is NULL, only requiredSize is
returned.
my requiredLenght is 80 characters so that cant be an issue.

I tried to put a value instead of i and without for loop and the same result.
Any idea why I cannot read PicoScope information?

Forgot to mention I'm using PicoScope 3406B

Any help greatly appreciate, Lukasz

AndrewA
PICO STAFF
PICO STAFF
Posts: 245
Joined: Tue Oct 21, 2014 3:07 pm

Re: ps3000aGetUnitInfo

Post by AndrewA » Tue Dec 18, 2018 9:52 am

Hi Lukasz,

To start could you try this newer version of the SDK (both 32 and 64-bit installers are here)-

https://drive.google.com/drive/folders/ ... VcoctxB6Uv

I did see issues with when calling ps2000aGetDeviceInfo function, in our LabVIEW code.
ps2000aGetDeviceInfo returned picostatus(41). But did not have issues after updating to the newer version of the SDK above.
Regards Andrew
Technical Specialist

Lukasz Matuszak
Newbie
Posts: 0
Joined: Thu Sep 11, 2014 8:47 am

Re: ps3000aGetUnitInfo

Post by Lukasz Matuszak » Tue Dec 18, 2018 10:48 am

Hi AndrewA,

Thanks for the link I have update the drivers (32-bit).PicoStatus has return (42)
PICO_INFO_UNAVAILABLE
The handle is invalid so no information is available about the device. Only
PICO_DRIVER_VERSION is available.
The Driver Version is returning: 1.3.0.136, where when I run Console example it returns: 1.6.0.17. The only difference between example and my coding is that i don't have "Console.WriteLine" command.

Post Reply