aboutsummaryrefslogtreecommitdiff
path: root/qolab/hardware/vacuum_gauge/mks390.py
diff options
context:
space:
mode:
authorMichael Vorobiov <mvorobiov@wm.edu>2024-11-07 11:16:50 -0500
committerMichael Vorobiov <mvorobiov@wm.edu>2024-11-07 11:16:50 -0500
commit8abbd937a8a0e9feae5aea1ccd74aa7067e1945f (patch)
tree5e991a6890571b3617b3e1bb939dda56895030ba /qolab/hardware/vacuum_gauge/mks390.py
parentbad72c3819018db4b6a08004f7f19535892ac047 (diff)
downloadqolab-8abbd937a8a0e9feae5aea1ccd74aa7067e1945f.tar.gz
qolab-8abbd937a8a0e9feae5aea1ccd74aa7067e1945f.zip
MKS390 vacuum gauge returns NaN if fails to get pressure reading
Diffstat (limited to 'qolab/hardware/vacuum_gauge/mks390.py')
-rw-r--r--qolab/hardware/vacuum_gauge/mks390.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/qolab/hardware/vacuum_gauge/mks390.py b/qolab/hardware/vacuum_gauge/mks390.py
index 8556001..402af2e 100644
--- a/qolab/hardware/vacuum_gauge/mks390.py
+++ b/qolab/hardware/vacuum_gauge/mks390.py
@@ -14,7 +14,6 @@ from qolab.hardware.basic import BasicInstrument
from qolab.hardware.scpi import SCPIinstr
import pyvisa
import numpy as np
-import logging
import time
@@ -30,6 +29,8 @@ class MKS390(SCPIinstr):
"""
super().__init__(resource, *args, **kwds)
self.resource = resource
+
+ #self.config["Device model"] = "MKS 390"
self.resource.baud_rate = 19200
self.resource.timeout = 5000
self.resource.read_termination = '\r'
@@ -42,7 +43,7 @@ class MKS390(SCPIinstr):
self.ignition_status = False
self.id = gauge_id
- self._read_ignition_status()
+ #self._read_ignition_status()
def enable_ignition(self, ig_status=False):
self._read_ignition_status()
@@ -73,6 +74,7 @@ class MKS390(SCPIinstr):
except pyvisa.VisaIOError as e:
print(f'[ERROR!] Failed to read vacuum gauge ignition status.\n\t{e}')
+ #@BasicInstrument.tsdb_append # The function does not work with the decorator (need to work on it later)
def get_pressure(self):
try:
# Sending a command
@@ -84,7 +86,7 @@ class MKS390(SCPIinstr):
return response
except pyvisa.VisaIOError as e:
print(f'[ERROR!] Failed to get vacuum gauge reading.\n\t{e}')
- return 0.0
+ return np.nan()
'''
def close(self):