|
8 | 8 | import ctypes |
9 | 9 | from picosdk.ps3000a import ps3000a as ps |
10 | 10 | import numpy as np |
| 11 | +import matplotlib |
11 | 12 | import matplotlib.pyplot as plt |
12 | 13 | from picosdk.functions import adc2mV, assert_pico_ok |
13 | 14 |
|
|
292 | 293 | Times = (ctypes.c_int16*10)() |
293 | 294 | TimeUnits = ctypes.c_char() |
294 | 295 | status["GetValuesTriggerTimeOffsetBulk"] = ps.ps3000aGetValuesTriggerTimeOffsetBulk64(chandle, ctypes.byref(Times), ctypes.byref(TimeUnits), 0, 9) |
295 | | -assert_pico_ok(status["GetValuesTriggerTimeOffsetBulk"]) |
| 296 | + |
| 297 | +print(Times[0:9]) |
| 298 | +print(TimeUnits) |
296 | 299 |
|
297 | 300 | # Finds the max ADC count |
298 | 301 | # Handle = chandle |
|
312 | 315 | adc2mVChAMax7 = adc2mV(bufferAMax7, chARange, maxADC) |
313 | 316 | adc2mVChAMax8 = adc2mV(bufferAMax8, chARange, maxADC) |
314 | 317 | adc2mVChAMax9 = adc2mV(bufferAMax9, chARange, maxADC) |
| 318 | +assert_pico_ok(status["GetValuesTriggerTimeOffsetBulk"]) |
315 | 319 |
|
316 | 320 | # Creates the time data |
317 | 321 | time = np.linspace(0, (cmaxSamples.value - 1) * timeIntervalns.value, cmaxSamples.value) |
318 | 322 |
|
319 | 323 | # Plots the data from channel A onto a graph |
320 | | -plt.plot(time, adc2mVChAMax[:]) |
321 | | -plt.plot(time, adc2mVChAMax1[:]) |
322 | | -plt.plot(time, adc2mVChAMax2[:]) |
323 | | -plt.plot(time, adc2mVChAMax3[:]) |
324 | | -plt.plot(time, adc2mVChAMax4[:]) |
325 | | -plt.plot(time, adc2mVChAMax5[:]) |
326 | | -plt.plot(time, adc2mVChAMax6[:]) |
327 | | -plt.plot(time, adc2mVChAMax7[:]) |
328 | | -plt.plot(time, adc2mVChAMax8[:]) |
329 | | -plt.plot(time, adc2mVChAMax9[:]) |
| 324 | + |
| 325 | +plt.plot(time, adc2mVChAMax) |
| 326 | +print('test') |
| 327 | +plt.plot(time, adc2mVChAMax1) |
| 328 | +plt.plot(time, adc2mVChAMax2) |
| 329 | +plt.plot(time, adc2mVChAMax3) |
| 330 | +plt.plot(time, adc2mVChAMax4) |
| 331 | +plt.plot(time, adc2mVChAMax5) |
| 332 | +plt.plot(time, adc2mVChAMax6) |
| 333 | +plt.plot(time, adc2mVChAMax7) |
| 334 | +plt.plot(time, adc2mVChAMax8) |
| 335 | +plt.plot(time, adc2mVChAMax9) |
| 336 | + |
330 | 337 | plt.xlabel('Time (ns)') |
331 | 338 | plt.ylabel('Voltage (mV)') |
332 | 339 | plt.show() |
|
0 commit comments