File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ #
2+ # Copyright (C) 2020 Pico Technology Ltd. See LICENSE file for terms.
3+ #
4+ # PS6000 A BLOCK MODE EXAMPLE
5+ # This example opens a 6000a driver device, sets up two channels and a trigger then collects a block of data.
6+ # This data is then plotted as mV against time in ns.
7+
8+ import ctypes
9+ import numpy as np
10+ from picosdk .ps6000a import ps6000a as ps
11+ import matplotlib .pyplot as plt
12+ from picosdk .functions import adc2mV , assert_pico_ok
13+
14+ # Create chandle and status ready for use
15+ chandle = ctypes .c_int16 ()
16+ status = {}
17+
18+ # Open 6000 A series PicoScope
19+ # returns handle to chandle for use in future API functions
20+ status ["openunit" ] = ps .ps6000aOpenUnit (ctypes .byref (chandle ), None , 0 )
21+ assert_pico_ok (status ["openunit" ])
22+
23+ # Close the scope
24+ status ["closeunit" ] = ps .ps6000aCloseUnit (chandle )
25+ assert_pico_ok (status ["closeunit" ])
26+
27+ print (status )
You can’t perform that action at this time.
0 commit comments