6404b matlab driver

Post your MATLAB discussions here
Post Reply
mpdefeo
Newbie
Posts: 0
Joined: Wed Sep 04, 2013 8:14 pm

6404b matlab driver

Post by mpdefeo » Sat Sep 07, 2013 3:01 pm

Hello,

I have had success opening communication with the 6404b in matlab using the SDK and an additional header file provided by Hitesh. I have started writing a matlab driver, based on the generic 5000 series driver posted on the mathworks website. However, when I try to load the driver using

Code: Select all

test = icdevice('ps6kdriver')
I get an error message from matlab saying I need to provide an interface for the device. However, when I load the generic 5000 series driver, which is almost identical, I get no such error. I have tried adding the entire picoscope6 directory to the matlab path hoping that matlab would auto-detect the usb driver, but that did not work. I am unsure of how to create the appropriate device interface and confused as to why the generic 5000 series driver does not require an interface, but my driver does.

I noticed that in the generic 5000 series driver there is a line that identifies 'rsrcname' as the serial number.

Code: Select all

    serial_num = get(obj, 'RsrcName');
I don't know if this is the same as the 'rsrcname' required as the second argument of 'icdevice', but I tried it anyway, and matlab returned an error.

I think the picotech drivers are 'closed source' but does anyone have an idea of how to call them via matlab, or identify a matlab interface object using the usb driver.

Any feed back on this issue would be very much appreciated.

Regards,
Mike

Hitesh
Site Admin
Site Admin
Posts: 2829
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: 6404b matlab driver

Post by Hitesh » Mon Sep 09, 2013 3:45 pm

Hi Mike,

Are you connecting to the scope as a device object? Are you using the command line in MATLAB or Test and Measurement Tool?

Our products do not use any of the supported standards such as GPIB or VISA and hence the Instrument Driver is a generic one.

If you have PicoScope 6 installed on the PC, then there is no need to install a USB driver as it does it for you.

The 'RsrcName' is just a parameter that you can specify to pass through - we use it to specify the serial number in our drivers.

The underlying PS6000 dll is proprietary and hence the source code is not available. If capturing data in streaming mode, then the ps6000Wrap.dll is required from the SDK for which the source code is available.

Regards,
Hitesh

Technical Support Engineer

mpdefeo
Newbie
Posts: 0
Joined: Wed Sep 04, 2013 8:14 pm

Re: 6404b matlab driver

Post by mpdefeo » Mon Sep 09, 2013 7:26 pm

Thank you for the reply, Hitesh.

I think I found the solution to my problem. I, initially created an interface object driver, not a general driver. Things are now working after converting it to a general driver.

Best,
Mike

Post Reply