I'm a new user of picoscope, and I got my 6404d last month.
I want to use python to build my application, and I need help.
I can set a simple trigger with this function, ps6000SetSimpleTrigger().
But I don't know how to use function ps6000SetTriggerChannelConditions().I have built the struct like this
Code: Select all
class trigger_conditions(ctypes.Structure):
""" creates a struct to match PS6000_TRIGGER_CONDITIONS"""
_pack_ = 1
_fields_ = [('channelA', ctypes.c_int8),
('channelB', ctypes.c_int8),
('channelC', ctypes.c_int8),
('channelD', ctypes.c_int8),
('external', ctypes.c_int8),
('aux', ctypes.c_int8),
('pulseWidthQualifier', ctypes.c_int8)]
Code: Select all
conditions = trigger_conditions(1, 0, 1, 0, 0, 0, 0)
status["triggerconditions"] = ps.ps6000SetTriggerChannelConditions(chandle, ctypes.byref(conditions), 1)
assert_pico_ok(status["triggerconditions"])
Code: Select all
Traceback (most recent call last):
File "E:/python/picoscope/test01/test02.py", line 84, in
assert_pico_ok(status["triggerconditions"])
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python37\lib\site-packages\picosdk\functions.py", line 133, in assert_pico_ok
raise PicoSDKCtypesError("PicoSDK returned '{}'".format(PICO_STATUS_LOOKUP[status]))
picosdk.errors.PicoSDKCtypesError: PicoSDK returned 'PICO_CONDITIONS'
Thanks