def close(self): # Close unit Disconnect the scope # handle = chandle self.status["close"]=ps.ps5000aCloseUnit(self.chandle) assert_pico_ok(self.status["close"]) # display status returns print('The scope was successfully closed')
def disconnect(self): self.status["stop"] = ps.ps5000aStop(self.chandle) assert_pico_ok(self.status["stop"]) # Closes the unit # Handle = chandle self.status["close"] = ps.ps5000aCloseUnit(self.chandle) assert_pico_ok(self.status["close"]) print("\n----------------- \nConnection closed \n-----------------")
# startFrequency = 10 kHz # stopFrequency = 100 kHz # increment = 5 kHz # dwellTime = 1 # sweepType = ctypes.c_int16(1) = PS5000A_UP # operation = 0 # shots = 0 # sweeps = 0 # triggerType = ctypes.c_int16(0) = PS5000A_SIGGEN_RISING # triggerSource = ctypes.c_int16(0) = PS5000A_SIGGEN_NONE # extInThreshold = 0 wavetype = ctypes.c_int32(1) sweepType = ctypes.c_int32(2) triggertype = ctypes.c_int32(0) triggerSource = ctypes.c_int32(0) status["setSigGenBuiltInV2"] = ps.ps5000aSetSigGenBuiltInV2( chandle, 0, 2000000, wavetype, 10000, 100000, 5000, 1, sweepType, 0, 0, 0, triggertype, triggerSource, 0) assert_pico_ok(status["setSigGenBuiltInV2"]) # Pauses the script to show signal time.sleep(36) # Closes the unit # Handle = chandle status["close"] = ps.ps5000aCloseUnit(chandle) assert_pico_ok(status["stop"]) # Displays the status returns print(status)
def stop(self): self.status["stop"] = ps.ps5000aStop(self.chandle) assert_pico_ok(self.status["stop"]) self.status["close"] = ps.ps5000aCloseUnit(self.chandle) assert_pico_ok(self.status["close"])
# operation = 0 # shots = 0 # sweeps = 0 # triggerType = ctypes.c_int16(1) = PS5000a_SIGGEN_NONE # triggerSource = ctypes.c_int16(1) = P5000a_SIGGEN_NONE # extInThreshold = 1 wavetype = ctypes.c_int32(1) sweepType = ctypes.c_int32(2) triggertype = ctypes.c_int32(0) triggerSource = ctypes.c_int32(0) status["SetSigGenBuiltIn"] = ps.ps5000aSetSigGenBuiltInV2( chandle, 0, 2000000, wavetype, 10000, 100000, 5, 1, sweepType, 0, 0, 0, triggertype, triggerSource, 1) assert_pico_ok(status["SetSigGenBuiltIn"]) # pauses the script to show signal time.sleep(36) # Stops the scope # Handle = chandle status["stop"] = ps.ps5000aStop(chandle) assert_pico_ok(status["stop"]) # Closes the unit # Handle = chandle status["stop"] = ps.ps5000aCloseUnit(chandle) assert_pico_ok(status["stop"]) # Displays the staus returns print(status)
def close(self): """Close the device.""" assert_pico_ok(ps.ps5000aCloseUnit(self._handle)) self._handle = None
def close(self): # Close unit Disconnect the scope self.status["close"] = ps.ps5000aCloseUnit(self.chandle) assert_pico_ok(self.status["close"])