aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-12-01 10:49:44 -0500
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-12-01 10:49:44 -0500
commit642c6f937a2826cb92b8f83b5b61a4c17d551e2c (patch)
treed7e8a507f146363f5184c85bf6195eaf782186d9
parentff6bfa21ca561472b0ab9e7820382c5d410eab5d (diff)
downloadqolab-642c6f937a2826cb92b8f83b5b61a4c17d551e2c.tar.gz
qolab-642c6f937a2826cb92b8f83b5b61a4c17d551e2c.zip
added test file test_scope_sds1104x
-rw-r--r--test/test_scope_sds1104x.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/test_scope_sds1104x.py b/test/test_scope_sds1104x.py
new file mode 100644
index 0000000..ef60a38
--- /dev/null
+++ b/test/test_scope_sds1104x.py
@@ -0,0 +1,19 @@
+import pyvisa
+from 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()
+