def close(self): self.status["stop"] = ps.ps3000aStop(self.chandle) assert_pico_ok(self.status["stop"]) # Closes the unit # Handle = chandle self.status["close"] = ps.ps3000aCloseUnit(self.chandle) assert_pico_ok(self.status["close"])
print "Plotting data..." plt.figure(num='PicoScope 3000 Series (A API) MSO Block Capture Example') plt.title('Plot of Digital Port 0 digital channels vs. time') plt.plot(time, bufferDPort0[0], label='D7') # D7 is the last array in the tuple. plt.plot(time, bufferDPort0[1], label='D6') plt.plot(time, bufferDPort0[2], label='D5') plt.plot(time, bufferDPort0[3], label='D4') plt.plot(time, bufferDPort0[4], label='D3') plt.plot(time, bufferDPort0[5], label='D2') plt.plot(time, bufferDPort0[6], label='D1') plt.plot(time, bufferDPort0[7], label='D0') # D0 is the last array in the tuple. plt.xlabel('Time (ns)') plt.ylabel('Logic Level') plt.legend(loc="upper right") plt.show() print "Close figure to stop the device and close the connection." # Stops the scope # handle = chandle status["stop"] = ps.ps3000aStop(chandle) assert_pico_ok(status["stop"]) # Closes the unit # handle = chandle status["closeUnit"] = ps.ps3000aCloseUnit(chandle) assert_pico_ok(status["closeUnit"]) # Displays the status returns print(status)
def stop(self): """Stop data capture.""" assert_pico_ok(ps.ps3000aStop(self._handle))