Can't use any python librairy

Discussion forum for the Picoscope 6 Linux software
Post Reply
mattou
Newbie
Posts: 0
Joined: Thu May 02, 2019 11:31 am

Can't use any python librairy

Post by mattou »

Hi,

I am a happy (new) user of a picoscope 6407.
I have installed the firmware on linux and it works great with the picoscope software.
However, when I use a python lib, it crashes at the initialization step.
I tried with pico-python (installed from a pip repository) and I get a PICO_COUPLING_NOT_SUPPORTED at this line

Code: Select all

channelRange = ps.setChannel('A', 'DC', waveformAmplitude, 0.0, enabled=True, BWLimited=False)

I also tried the official librairy (picosdk-python-wrappers) and I get the following exception:

Code: Select all

raise ArgumentOutOfRangeError("%s device doesn't support a range as wide as %sV" % (self.name, signal_peak))
at this line:

Code: Select all

channel_configs = [ChannelConfig('B', True, 'DC', 0.1)]
I tried very small DC values but it always raises the same exception.
I have the feeling that the errors I get with the two librairies are linked but I can't tell what I am doing wrong.
Could anybody help me with this?

NeilH
PICO STAFF
PICO STAFF
Posts: 268
Joined: Tue Jul 18, 2017 8:28 am

Re: Can't use any python librairy

Post by NeilH »

Hi

Are you able to post the full code that you're using from the python-wrappers including the settings you're using for the scope?
Have you checked in the programmer's guide that you're passing values that are correct for the 6407?
https://www.picotech.com/download/manua ... -guide.pdf

Neil
Neil
Technical Support Engineer

mattou
Newbie
Posts: 0
Joined: Thu May 02, 2019 11:31 am

Re: Can't use any python librairy

Post by mattou »

Hi,

Thank you for your answer.
According to the programmer's guide, the voltage range should be +- 100mV, and it should be set to DC, which is what I think I am doing in the code I am testing.
For picosdk-python-wrappers I try to run the code provided in examples (block.py): https://pastebin.com/Pt0DXXqT

erikiverson
Newbie
Posts: 0
Joined: Fri Jun 04, 2021 5:26 pm

Re: Can't use any python librairy

Post by erikiverson »

I have this same problem. It seems like the range is supposed to be specified in an enum, in ps6000.py

Code: Select all

ps6000.PS6000_RANGE = make_enum([
    "PS6000A_10MV",
    "PS6000_20MV",
    "PS6000_50MV",
    "PS6000_100MV",
    "PS6000_200MV",
    "PS6000_500MV",
    "PS6000_1V",
    "PS6000_2V",
    "PS6000_5V",
    "PS6000_10V",
    "PS6000_20V",
    "PS6000_50V",
    "PS6000_MAX_RANGES",
])
Where, in constants.py, the make_enum function is defined.
I tried using the enum, and also passing integers for the range in the ChannelConfig function, and also just leaving them blank since the function says it is optional. Nothing worked.

Post Reply