Re: Multiple PicoScopes on one PC using API

Post general discussions on using our drivers to write your own software here
Post Reply
timyin
Newbie
Posts: 0
Joined: Fri Oct 26, 2018 3:43 pm

Re: Multiple PicoScopes on one PC using API

Post by timyin » Wed Nov 28, 2018 10:20 am

Hi All,

Now in the lab have i only two 3403D devices with the Ubuntu PC available. So i have download the SDK and test a autoScope Programm. The Problem is status["GetValues"] 37 not 0. :cry:

Code: Select all

/usr/bin/python3.6 /home/timyin/Desktop/FA/picosdk-python-wrappers-master/ps3000aExamples/autoScope.py
b'GO7680079'
b'GO7680025'
{'openunit': 0} c_short(1)
{'openunit': 0}
{'openunit': 0} c_short(2)
{'openunit': 0}
the threshold of Trigger D in 3000.000000 mV is to ADC 9754
the threshold of Trigger D2 in 3000.000000 mV is to ADC 9754
the time, that the scope will spend collecting samples in (c_int(1003)) ms
the time, that the scope2 will spend collecting samples in (c_int(1003)) ms
{'openunit': 0, 'setChA': 0, 'setChB': 0, 'setChC': 0, 'setChD': 0, 'maximumValue': 0, 'triggerD': 0, 'GetTimebase': 0, 'runblock': 0, 'SetDataBuffers': 0, 'isReady': 0, 'GetValues': 37} {'openunit': 0, 'setChA': 0, 'setChB': 0, 'setChC': 0, 'setChD': 0, 'maximumValue': 0, 'triggerD': 0, 'GetTimebase': 0, 'runblock': 0, 'SetDataBuffers': 0, 'isReady': 0}
Traceback (most recent call last):
  File "/home/timyin/Desktop/FA/picosdk-python-wrappers-master/ps3000aExamples/autoScope.py", line 464, in <module>
    runScope()
  File "/home/timyin/Desktop/FA/picosdk-python-wrappers-master/ps3000aExamples/autoScope.py", line 342, in runScope
    assert_pico_ok(status["GetValues"])
  File "/home/timyin/Desktop/FA/picosdk-python-wrappers-master/picosdk/functions.py", line 146, in assert_pico_ok
    raise BaseException("Pico_OK not returned")
BaseException: Pico_OK not returned

Process finished with exit code 1
Here is a part of my autoScope Code

Code: Select all

 # Checks data collection to finish the capture
    ready = c_int16(0)
    check = c_int16(0)
    ready2 = c_int16(0)
    check2 = c_int16(0)
    while ready.value == check.value and ready2.value == check2.value:
        status["isReady"] = ps.ps3000aIsReady(chandle, byref(ready))
        status2["isReady"] = ps.ps3000aIsReady(chandle2, byref(ready2))


    # Handle = chandle
    # start index = 0
    # noOfSamples = byref(cmaxSamples)
    # DownSampleRatio = 0
    # DownSampleRatioMode = 0
    # SegmentIndex = 0
    # Overflow = byref(overflow)

    status["GetValues"] = ps.ps3000aGetValues(chandle, 0, byref(cmaxSamples), 0, 0, 0, byref(overflow))
    print(status, status2)
    assert_pico_ok(status["GetValues"])

    status2["GetValues"] = ps.ps3000aGetValues(chandle2, 0, byref(cmaxSamples2), 0, 0, 0, byref(overflow2))
    print(status, status2)
    assert_pico_ok(status2["GetValues"])
Thanks for any help :lol:

Hitesh
PICO STAFF
PICO STAFF
Posts: 2851
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: Multiple PicoScopes on one PC using API

Post by Hitesh » Thu Nov 29, 2018 5:08 pm

Hi timyin,

The status code indicates that no samples are available.

Please check to see if the respective devices are ready before you attempt to retrieve the data from them.

Regards,
Hitesh

Software Dev. Engineer

Post Reply