Skip to content

Commit

Permalink
Added filter controls to Keithley 2606B
Browse files Browse the repository at this point in the history
  • Loading branch information
jclederman committed Nov 12, 2024
1 parent 9a645b2 commit 2d08baf
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions lightlab/equipment/lab_instruments/Keithley_2606B_SMU.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,3 +385,24 @@ def setCurrentMode(self, protectionVoltage=1):
self.__setSourceMode(isCurrentSource=True)
self.setProtectionVoltage(protectionVoltage)
self._configCurrent(0)

def getFilterParams(self):
filters = ['', 'Repeat Average', 'Moving Average', 'Median']

enable_str = self.query_print(f"{self.smu_full_string}.measure.filter.enable")
type_str = self.query_print(f"{self.smu_full_string}.measure.filter.type")
count_str = self.query_print(f"{self.smu_full_string}.measure.filter.count")

return True if int(enable_str) else False, filters[int(type_str)], int(count_str)

def enableFilter(self):
self.write(f"{self.smu_full_string}.measure.filter.enable = {self.smu_full_string}.FILTER_ON")

def disableFilter(self):
self.write(f"{self.smu_full_string}.measure.filter.enable = {self.smu_full_string}.FILTER_OFF")

def setFilterRepeat(self):
self.write(f"{self.smu_full_string}.measure.filter.type = {self.smu_full_string}.FILTER_REPEAT_AVG")

def setFilterCount(self, count):
self.write(f"{self.smu_full_string}.measure.filter.count = {count}")

0 comments on commit 2d08baf

Please sign in to comment.