Read vertical resolution and time base from Matlab

Post your MATLAB discussions here
Post Reply
mk434346
Newbie
Posts: 0
Joined: Wed Mar 23, 2022 11:49 am

Read vertical resolution and time base from Matlab

Post by mk434346 »

Hi everyone,

I am using Matlab, more specifically the PicoScope Support Toolbox (version 1.1), to interface a PicoScope 5444D. I can connect to the device and run the example scripts without problems.

However, I cannot read out the current vertical resolution using the command "ps5000aGetDeviceResolution" as described in the Programmer's Guide (https://www.picotech.com/download/manua ... rGuide.pdf).

Instead I get the Matlab error "Unrecognized function or variable 'deviceRes'.". It seems as if this command was not properly implemented in the Matlab driver.
As a workaround I can access the resolution by reading the member variable "resolution" of the device object. However, this is not documented anywhere.

Second, I couldn't find a way to read out the sample rate (or time base). Despite the name, the function "ps5000aGetTimebase2" does only return the time base if one attempts to set a new time base. Reading the member variable "timebase" of the device object doesn't seem to work as this always reads 65.

Am I doing it wrong or should these things be fixed in the driver packages?

Best,
Max

mk434346
Newbie
Posts: 0
Joined: Wed Mar 23, 2022 11:49 am

Re: Read vertical resolution and time base from Matlab

Post by mk434346 »

Update: The function "ps5000aGetTimebase2" does _not_ set the timebase but can be used check if setting the timebase (with "set(PC.ps5000aDeviceObj, 'timebase', timebaseIndex)") was successful. In this case, the member property "timebase" can also be read to read back the current timebase index.

Post Reply