Picoscope stalls when taking measurements

Post general discussions on using our drivers to write your own software here
Post Reply
Posts: 0
Joined: Tue Aug 03, 2021 8:31 pm

Picoscope stalls when taking measurements

Post by pkupec »

Using the Command line interface supplied by picoscope I've made a little test setup. However when the run capture is running it fails and when it's stopped it gives me measurements. I don't understand why it should fail at all because when I run these commands in the command terminal it runs with no issues at all but in my python IDLE window it refuses to work except on the first run and then it proceeds to fail.

I understand that the CLI isn't really completed but I was hoping to at least use it to take measurements in an automated way.

Here is my code.

import os
import subprocess
import time
import signal

def measure():
stream = os.popen("picoscope /a Measurements.CSV?")
measures = stream.read()


ARise = measures.split(",")[5]

AFall = measures.split(",")[14]

AMax = measures.split(",")[23]

AMin = measures.split(",")[32]

BMax = measures.split(",")[41]

print('A Rise',ARise)
print('A Fall',AFall)
print('A Max', AMax)
print('A Min', AMin)
print('B Max', BMax)

return ARise, AFall, AMax, AMin, BMax

for x in range(20):

Posts: 988
Joined: Mon Aug 11, 2014 11:14 am

Re: Picoscope stalls when taking measurements

Post by Gerry »

Hi pkupec,

Sorry for the delayed response (I have been tied up doing other things).

Clearly, the issue is not with the CLI, it's with your use of Python. So this is not really a PicoScope query, more of a Python implementation query, and you are likely to get a suitable response on either Python Forums, or Pure coding Forums. A quick search on Google throws up the following: https://stackoverflow.com/questions/486 ... using-idle.


Technical Specialist

Post Reply