Test and Measurement Forum

PICO_NOT_SUPPORTED_BY_THIS_DEVICE on Python/Linux/4824

Post general discussions on using our drivers to write your own software here

PICO_NOT_SUPPORTED_BY_THIS_DEVICE on Python/Linux/4824

Postby michaelt » Wed Mar 07, 2018 7:12 pm

Hello,

I have a Picoscope 4824 which works OK on my Ubuntu 16.04 PC when I use the Picoscope software.

However, when I tried to use the API I ran into problems. In fact, this program:-

Code: Select all
from picosdk import ps4000a
ps = ps4000a.Device()
print "Attempting open_unit..."
status = ps.open_unit()
print "Result", status, "=", ps.m.pico_tag(status)


Produces this result:
Code: Select all
$ python simple1.py
Attempting open_unit...
Result 287 = PICO_NOT_SUPPORTED_BY_THIS_DEVICE


In case it's relevant, here's what I get when I print ps.info:-
Code: Select all
{
    awg_max: 32767,
    awg_min: -32768,
    awg_size: 16384L,
    batch_and_serial: 'CU640/118',
    cal_date: '26Mar15',
    channel_ranges: {
    0: {
            ascii_label: '+/-10mV',
            enum: 0,
            label: '\xb110mV',
            max_ac_offset: 0.25,
            max_dc_offset: 0.25,
            min_ac_offset: -0.25,
            min_dc_offset: -0.25,
            value: 0.01,
        },
        1: {
            ascii_label: '+/-20mV',
            enum: 1,
            label: '\xb120mV',
            max_ac_offset: 0.25,
            max_dc_offset: 0.25,
            min_ac_offset: -0.25,
            min_dc_offset: -0.25,
            value: 0.02,
        },
        2: {
            ascii_label: '+/-50mV',
            enum: 2,
            label: '\xb150mV',
            max_ac_offset: 0.25,
            max_dc_offset: 0.25,
            min_ac_offset: -0.25,
            min_dc_offset: -0.25,
            value: 0.05,
        },
        3: {
            ascii_label: '+/-100mV',
            enum: 3,
            label: '\xb1100mV',
            max_ac_offset: 0.25,
            max_dc_offset: 0.25,
            min_ac_offset: -0.25,
            min_dc_offset: -0.25,
            value: 0.1,
        },
        4: {
            ascii_label: '+/-200mV',
            enum: 4,
            label: '\xb1200mV',
            max_ac_offset: 0.25,
            max_dc_offset: 0.25,
            min_ac_offset: -0.25,
            min_dc_offset: -0.25,
            value: 0.2,
        },
        5: {
            ascii_label: '+/-500mV',
            enum: 5,
            label: '\xb1500mV',
            max_ac_offset: 0.25,
            max_dc_offset: 0.25,
            min_ac_offset: -0.25,
            min_dc_offset: -0.25,
            value: 0.5,
        },
        6: {
            ascii_label: '+/-1V',
            enum: 6,
            label: '\xb11V',
            max_ac_offset: 2.5,
            max_dc_offset: 2.5,
            min_ac_offset: -2.5,
            min_dc_offset: -2.5,
            value: 1.0,
        },
        7: {
            ascii_label: '+/-2V',
            enum: 7,
            label: '\xb12V',
            max_ac_offset: 2.5,
            max_dc_offset: 2.5,
            min_ac_offset: -2.5,
            min_dc_offset: -2.5,
            value: 2.0,
        },
        8: {
            ascii_label: '+/-5V',
            enum: 8,
            label: '\xb15V',
            max_ac_offset: 2.5,
            max_dc_offset: 2.5,
            min_ac_offset: -2.5,
            min_dc_offset: -2.5,
            value: 5.0,
        },
        9: {
            ascii_label: '+/-10V',
            enum: 9,
            label: '\xb110V',
            max_ac_offset: 25.0,
            max_dc_offset: 25.0,
            min_ac_offset: -25.0,
            min_dc_offset: -25.0,
            value: 10.0,
        },
        10: {
            ascii_label: '+/-20V',
            enum: 10,
            label: '\xb120V',
            max_ac_offset: 25.0,
            max_dc_offset: 25.0,
            min_ac_offset: -25.0,
            min_dc_offset: -25.0,
            value: 20.0,
        },
        11: {
            ascii_label: '+/-50V',
            enum: 11,
            label: '\xb150V',
            max_ac_offset: 25.0,
            max_dc_offset: 25.0,
            min_ac_offset: -25.0,
            min_dc_offset: -25.0,
            value: 50.0,
        },
    },
    driver_version: 'PS4000A Linux Driver, 1.4.0.11',
    firmware_version_1: '1.4.0.0',
    firmware_version_2: '1.0.11.0',
    handle: 1,
    hardware_version: '1',
    has_awg: True,
    has_ets: True,
    has_siggen: True,
    max_adc: 32767,
    max_range: 11,
    max_segments: 125000L,
    memory: 268435264,
    memps: 268435264,
    min_adc: -32767,
    min_range: 0,
    num_channels: 8,
    num_ports: 0,
    siggen_frequency: 1000000,
    siggen_max: 4000000,
    siggen_min: 0,
    usb_version: '3.0',
    variant_info: '4824',
}


After calling open_unit but before it returns, there's a delay of about 4-5 seconds. The first time I use open_unit after using the the GUI picoscope software, I hear a relay clicking in that delay.

The programmers' guide doesn't even list PICO_NOT_SUPPORTED_BY_THIS_DEVICE as a possible return from ps4000aOpenUnit() - let alone why! Can anyone suggest what the problem is / what I should do about it?

Thanks!
michaelt
Newbie
 
Posts: 0
Joined: Wed Mar 07, 2018 6:58 pm

Re: PICO_NOT_SUPPORTED_BY_THIS_DEVICE on Python/Linux/4824

Postby Hitesh » Thu Mar 08, 2018 11:23 am

Hi michaelt,

Its possible that another function is being called as part of the open unit process via the bindings.

Are you using the latest files from our GitHub repository?

Regards,
Hitesh

Technical Support Engineer
Hitesh
Site Admin
Site Admin
 
Posts: 2718
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: PICO_NOT_SUPPORTED_BY_THIS_DEVICE on Python/Linux/4824

Postby michaelt » Mon Mar 12, 2018 12:56 am

Hitesh wrote:Are you using the latest files from our GitHub repository?


Yes, I checked out the latest version as of the day I made my post.
michaelt
Newbie
 
Posts: 0
Joined: Wed Mar 07, 2018 6:58 pm

Re: PICO_NOT_SUPPORTED_BY_THIS_DEVICE on Python/Linux/4824

Postby Hitesh » Tue Mar 13, 2018 5:20 pm

Hi michaelt,

Its not the ps4000aOpenUnit() function that is returning the status code but likely to be another function.

I am in the process of investigating and will post an update. From the ps.info() call you can see that the device has successfully connected.

Update: We have resolved an issue in the Python bindings. Please update the files from GitHub and try the code again.

Thanks,
Hitesh

Technical Support Engineer
Hitesh
Site Admin
Site Admin
 
Posts: 2718
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: PICO_NOT_SUPPORTED_BY_THIS_DEVICE on Python/Linux/4824

Postby michaelt » Mon Mar 26, 2018 8:53 am

This seems to have fixed things - thanks very much!
michaelt
Newbie
 
Posts: 0
Joined: Wed Mar 07, 2018 6:58 pm

Re: PICO_NOT_SUPPORTED_BY_THIS_DEVICE on Python/Linux/4824

Postby Hitesh » Mon Mar 26, 2018 2:52 pm

Thanks for confirming the fix! :D
Hitesh

Technical Support Engineer
Hitesh
Site Admin
Site Admin
 
Posts: 2718
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire


Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 0 guests