getTriggerState for PS6000

Having problems ? let us know the details here
Post Reply
Kamel
User
User
Posts: 2
Joined: Fri Apr 12, 2024 10:52 am

getTriggerState for PS6000

Post by Kamel »

I'm using a PicoScope PS6000 device. I want to implement a condition in python where I only capture a trace when the trigger is high. So I would use a while loop to continuously check the trigger state and only capture a trace when the trigger is high. Is there some function, or attribute, or method to get the trigger state in python please ?
This what I would like to do in python :
while i < nb_traces:
# Wait until the trigger is high
while ps.getTriggerState() == 0:
time.sleep(0.01) # Adjust the sleep time according to your requirement

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

Re: getTriggerState for PS6000

Post by NeilH »

Hi

Are you able to give more information on exactly what you're trying to do?
It is sounding like you're probably going to want to use a level threshold trigger to capture a block of data when the voltage exceeds a certain amount but I want to check that this would be the way to go for your application.
Neil
Technical Support Engineer

Kamel
User
User
Posts: 2
Joined: Fri Apr 12, 2024 10:52 am

Re: getTriggerState for PS6000

Post by Kamel »

Hi
Thank you for your response.
I want to we capture traces precisely each time when the trigger condition is met as below, ensuring synchronized traces.

# Set up trigger on channel A to trigger when the voltage rises above 0.2 volts
# with a rising edge direction
tg = ps.setSimpleTrigger(trigSrc='A', direction='Rising', threshold_V=0.2, enabled=True)

Post Reply