Skip to content

Commit 1aabe4e

Browse files
author
neil.hamilton
committed
Resolve merge conflicts
2 parents 5c47800 + 7a02ced commit 1aabe4e

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

picosdk/ps5000a.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,19 @@ def _define_conditionsInfo():
182182
ps5000a.PICO_RATIO_MODE = {k[19:]: v for k, v in ps5000a.PS5000A_RATIO_MODE.items()}
183183

184184

185+
186+
class PS5000A_TRIGGER_INFO(Structure):
187+
_pack_ = 1
188+
_fields_ = [("status", c_uint32),
189+
("segmentIndex", c_uint32),
190+
("triggerIndex", c_uint32),
191+
("triggerTime", c_int64),
192+
("timeUnits", c_int16),
193+
("reserved0", c_int16),
194+
("timeStampCounter", c_uint64)]
195+
196+
ps5000a.PS5000A_TRIGGER_INFO = PS5000A_TRIGGER_INFO
197+
185198
class PS5000A_DIGITAL_CHANNEL_DIRECTIONS(Structure):
186199
_pack_ = 1
187200
_fields_ = [("channel", c_int32),
@@ -941,6 +954,7 @@ class PS5000A_PWQ_CONDITIONS (Structure):
941954
); """
942955
ps5000a.make_symbol("_SetTriggerDigitalPortProperties", "ps5000aSetTriggerDigitalPortProperties", c_uint32,
943956
[c_int16, c_void_p, c_int16], doc)
957+
<<<<<<< HEAD
944958

945959
doc = """ PICO_STATUS ps5000aSetPulseWidthQualifierProperties
946960
(
@@ -969,4 +983,4 @@ class PS5000A_PWQ_CONDITIONS (Structure):
969983
int16_t nDirections
970984
); """
971985
ps5000a.make_symbol("_SetPulseWidthQualifierDirections", "ps5000aSetPulseWidthQualifierDirections", c_uint32,
972-
[c_int16, c_void_p, c_int16], doc)
986+
[c_int16, c_void_p, c_int16], doc)

ps5000aExamples/ps5000aRapidBlockExample.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,21 @@
291291
status["GetValuesTriggerTimeOffsetBulk"] = ps.ps5000aGetValuesTriggerTimeOffsetBulk64(chandle, ctypes.byref(Times), ctypes.byref(TimeUnits), 0, 9)
292292
assert_pico_ok(status["GetValuesTriggerTimeOffsetBulk"])
293293

294+
# Get and print TriggerInfo for memory segments
295+
# Create array of ps.PS5000A_TRIGGER_INFO for each memory segment
296+
Ten_TriggerInfo = (ps.PS5000A_TRIGGER_INFO*10) ()
297+
298+
status["GetTriggerInfoBulk"] = ps.ps5000aGetTriggerInfoBulk(chandle, ctypes.byref(Ten_TriggerInfo), 0, 9)
299+
assert_pico_ok(status["GetTriggerInfoBulk"])
300+
301+
print("Printing triggerInfo blocks")
302+
for i in Ten_TriggerInfo:
303+
print("PICO_STATUS is ", i.status)
304+
print("segmentIndex is ", i.segmentIndex)
305+
print("triggerTime is ", i.triggerTime)
306+
print("timeUnits is ", i.timeUnits)
307+
print("timeStampCounter is ", i.timeStampCounter)
308+
294309
# Converts ADC from channel A to mV
295310
adc2mVChAMax = adc2mV(bufferAMax, chARange, maxADC)
296311
adc2mVChAMax1 = adc2mV(bufferAMax1, chARange, maxADC)

ps6000aExamples/ps6000aRapidBlockExample.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@
161161
noOfSamples = ctypes.c_uint64(nSamples)
162162
# downSampleRatio = 1
163163
# segmentIndex = 0
164-
overflow = ctypes.c_int16(0)
164+
# Creates a overflow location for each segment
165+
overflow = (ctypes.c_int16 * 10)()
165166
status["getValues"] = ps.ps6000aGetValuesBulk(chandle, 0, ctypes.byref(noOfSamples),0, 9, 1, downSampleMode, ctypes.byref(overflow))
166167
assert_pico_ok(status["getValues"])
167168

@@ -206,4 +207,4 @@
206207
status["closeunit"] = ps.ps6000aCloseUnit(chandle)
207208
assert_pico_ok(status["closeunit"])
208209

209-
print(status)
210+
print(status)

0 commit comments

Comments
 (0)