|
18 | 18 |
|
19 | 19 | # Open 6000 A series PicoScope |
20 | 20 | # returns handle to chandle for use in future API functions |
21 | | -status["openunit"] = ps.ps6000aOpenUnit(ctypes.byref(chandle), None, 0) |
| 21 | +resolution = 0 # PICO_DEVICE_RESOLUTION["PICO_DR_8BIT"] |
| 22 | +status["openunit"] = ps.ps6000aOpenUnit(ctypes.byref(chandle), None, resolution) |
22 | 23 | assert_pico_ok(status["openunit"]) |
23 | 24 |
|
24 | 25 | # Set channel A on |
25 | 26 | # handle = chandle |
26 | | -channel = 0 #enums.PICO_CHANNEL["PICO_CHANNEL_A"] |
| 27 | +channelA = 0 #enums.PICO_CHANNEL["PICO_CHANNEL_A"] |
27 | 28 | coupling = 0 #enums.PICO_COUPLING["PICO_DC"] |
28 | 29 | range = 7 |
29 | 30 | # analogueOffset = 0 V |
30 | 31 | bandwidth = 0 #enums.PICO_CHANNEL["PICO_BW_FULL"] |
31 | | -status["setChannelA"] = ps.ps6000aSetChannelOn(chandle, channel, coupling, range, 0, bandwidth) |
| 32 | +status["setChannelA"] = ps.ps6000aSetChannelOn(chandle, channelA, coupling, range, 0, bandwidth) |
32 | 33 | assert_pico_ok(status["setChannelA"]) |
33 | 34 |
|
| 35 | +# Set simple trigger on channel A, 1 V rising with 1 s autotrigger |
| 36 | +# handle = chandle |
| 37 | +# enable = 1 |
| 38 | +source = channelA |
| 39 | +# threshold = 1000 mV |
| 40 | +direction = 2 # PICO_THRESHOLD_DIRECTION["PICO_RISING"] |
| 41 | +# delay = 0 s |
| 42 | +# autoTriggerMicroSeconds = 1000000 us |
| 43 | +status["setSimpleTrigger"] = ps.ps6000aSetSimpleTrigger(chandle, 1, source, 1000, direction, 0, 1000000) |
| 44 | +assert_pico_ok(status["setSimpleTrigger"]) |
| 45 | + |
34 | 46 | # Close the scope |
35 | 47 | status["closeunit"] = ps.ps6000aCloseUnit(chandle) |
36 | 48 | assert_pico_ok(status["closeunit"]) |
|
0 commit comments