aboutsummaryrefslogtreecommitdiff
path: root/qolab/hardware/scope/rigolds1054z.py
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-18 23:51:28 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-18 23:51:28 -0400
commit54aef3614ae202245894b0272428fd677f4c0b65 (patch)
treed51c3c30dc1f4c19e8a0715a6ad03da0f8b3f2dc /qolab/hardware/scope/rigolds1054z.py
parent94eed1a5e960361c265d502037fe41a6c8999684 (diff)
downloadqolab-54aef3614ae202245894b0272428fd677f4c0b65.tar.gz
qolab-54aef3614ae202245894b0272428fd677f4c0b65.zip
clean up, new Run and Stop commands
Diffstat (limited to 'qolab/hardware/scope/rigolds1054z.py')
-rw-r--r--qolab/hardware/scope/rigolds1054z.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/qolab/hardware/scope/rigolds1054z.py b/qolab/hardware/scope/rigolds1054z.py
index 85c0ac4..8917021 100644
--- a/qolab/hardware/scope/rigolds1054z.py
+++ b/qolab/hardware/scope/rigolds1054z.py
@@ -5,11 +5,12 @@ Created by Eugeniy E. Mikhailov 2024/07/18
from qolab.hardware.basic import BasicInstrument
from qolab.hardware.scpi import SCPI_PROPERTY
from ._basic import ScopeSCPI
-from qolab.hardware.scpi import response2numStr
from qolab.data.trace import Trace, TraceXY
import numpy as np
import scipy.signal
from pyvisa.constants import InterfaceType
+from pyvisa.errors import VisaIOError
+
class RigolDS1054z(ScopeSCPI):
"""Rigol 1054 scope"""
@@ -23,7 +24,7 @@ class RigolDS1054z(ScopeSCPI):
self.resource.read_termination = "\n"
self.numberOfChannels = 4
self.maxRequiredPoints = 1200
- self.resource.timeout = 1000 # timeout in ms
+ self.resource.timeout = 500 # timeout in ms
# desired number of points per channel, can return twice more
TimePerDiv = SCPI_PROPERTY(
@@ -101,10 +102,10 @@ class RigolDS1054z(ScopeSCPI):
self.write(f"TRIGger:SWEep {val}")
def stop(self):
- self.write(f":STOP")
+ self.write(":STOP")
def run(self):
- self.write(f":RUN")
+ self.write(":RUN")
def getRawWaveform(
self, chNum, availableNpnts=None, maxRequiredPoints=None, decimate=True
@@ -160,7 +161,6 @@ class RigolDS1054z(ScopeSCPI):
to the "Vertical Reference Position" in the Y direction.
<yreference>: the vertical reference position in the Y direction.
"""
- print(preamble)
Npnts = int(preamble[2])
wfRaw = np.zeros(Npnts, dtype=np.int8)
maxreadable = 250_000 # the maximum number of bytes readable in one go