[Python][PS3206D MSO] measurements with digital channels

Post general discussions on using our drivers to write your own software here
Post Reply
marcAC
Newbie
Posts: 0
Joined: Tue Sep 17, 2019 8:00 am

[Python][PS3206D MSO] measurements with digital channels

Post by marcAC »

Hello everyone,

we are currently trying to figure out how to set triggers and take measurement values with the digital channels of the PicoScope 3206D MSO after we already did it with the analog channels.

Are there any working examples for doing this?

Kind regards
Marc

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

Re: [Python][PS3206D MSO] measurements with digital channels

Post by NeilH »

Hi Marc

We don't currently have any examples showing triggering on a digital channel in python for the 3000a driver but there is a example using the 2000a driver, ps2000aMSOBlockExample.py, and the commands are nearly identical between the two drivers.

To trigger with a digital channel, the advance trigger functions need to be used, these are detailed in the programmer's guide https://www.picotech.com/download/manuals/picoscope-3000-series-a-api-programmers-guide.pdf

Neil
Neil
Technical Support Engineer

marcAC
Newbie
Posts: 0
Joined: Tue Sep 17, 2019 8:00 am

Re: [Python][PS3206D MSO] measurements with digital channels

Post by marcAC »

Hey Neil,

thanks for your fast reply.

Do you mean this example? If not where can I find the one you mean, if yes what about this example, it seems to be for the PicoScope 3000?

Marc

marcAC
Newbie
Posts: 0
Joined: Tue Sep 17, 2019 8:00 am

Re: [Python][PS3206D MSO] measurements with digital channels

Post by marcAC »

marcAC wrote:
Tue Sep 17, 2019 8:49 am
Hey Neil,

thanks for your fast reply.

Do you mean this example? If not where can I find the one you mean, if yes what about this example, it seems to be for the PicoScope 3000?

Marc
So I took the second mentioned example and copied the part of the digital trigger from the PS2000-example into it, after that I copied the missing classes and enums out of ps2000a.py to ps3000a.py and I don't get any errors any more. But when I try to run it, the programm doesn't wait for the trigger and instead just collects the data directly.

Does someone know why it doesn't work this way?

Kind regards
Marc

Anders_Eriksson
Newbie
Posts: 0
Joined: Fri Nov 15, 2019 10:09 am

Re: [Python][PS3206D MSO] measurements with digital channels

Post by Anders_Eriksson »

71 dont_care = ps.PS3000A_TRIGGER_STATE['PS3000A_CONDITION_DONT_CARE']
72 trigger_true = ps.PS3000A_TRIGGER_STATE['PS3000A_CONDITION_TRUE']
73 nConditions = 1

AttributeError: 'Ps3000alib' object has no attribute 'PS3000A_TRIGGER_STATE'

Please can you update the code on github, so it runs and works also for the ps3000a?
-->
Hi I am also trying to get a digital trig to work in the ps3000aBlockMSOExample

I have copied and pasted the example code for the ps2000a example, but now I get

---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
~\PythonTool\ps3000aBlockMSOExample.py in
69 # nConditions = 1
70
---> 71 dont_care = ps.PS3000A_TRIGGER_STATE['PS3000A_CONDITION_DONT_CARE']
72 trigger_true = ps.PS3000A_TRIGGER_STATE['PS3000A_CONDITION_TRUE']
73 nConditions = 1

AttributeError: 'Ps3000alib' object has no attribute 'PS3000A_TRIGGER_STATE'

Please can you update the code on github, so it runs and works also for the ps3000a?