From f66c475ed89ab125cff573ffa692e3d29a596fd5 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Mon, 27 May 2024 23:08:46 -0400 Subject: renamed test to example, to avoid spooking `pytest` --- examples/scope_sds1104x.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 examples/scope_sds1104x.py (limited to 'examples/scope_sds1104x.py') diff --git a/examples/scope_sds1104x.py b/examples/scope_sds1104x.py new file mode 100644 index 0000000..c5c890f --- /dev/null +++ b/examples/scope_sds1104x.py @@ -0,0 +1,19 @@ +import pyvisa +from qolab.hardware.scope import SDS1104X + +if __name__ == '__main__': + print("Testing SDS1104X") + rm = pyvisa.ResourceManager() + print(rm.list_resources()) + instr=rm.open_resource('TCPIP::192.168.0.61::INSTR') + scope = SDS1104X(instr) + print(f'ID: {scope.idn}') + print(f'Ch1 mean: {scope.mean(1)}') + print(f'Ch1 available points: {scope.getAvailableNumberOfPoints(1)}') + print(f'Sample Rate: {scope.getSampleRate()}') + print(f'Time per Div: {scope.getTimePerDiv()}') + print(f'Ch1 Volts per Div: {scope.getChanVoltsPerDiv(1)}') + print(f'Ch1 Voltage Offset: {scope.getChanOffset(1)}') + ch1 = scope.getTrace(1) + ch1.plot() + -- cgit v1.2.3