diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eba74f4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +venv/ \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..8d34af4 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,24 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Attempt license upgrade", + "type": "debugpy", + "request": "launch", + "program": "license_upgrade.py", + "console": "integratedTerminal", + "args": ["192.168.1.142"] + }, + { + "name": "Remote scope tests", + "type": "debugpy", + "request": "launch", + "program": "remote_scope.py", + "console": "integratedTerminal", + "args": ["172.17.99.12"] + } + ] +} \ No newline at end of file diff --git a/Readme.md b/Readme.md index 781d2a1..423df12 100644 --- a/Readme.md +++ b/Readme.md @@ -1,9 +1,9 @@ -# Rigol +# Rigol Script from the EEVBlog, that will activate all options on a rigol scope. ## Usage: ``` -python3 rigol_kg.py 192.168.1.142 +python3 license_upgrade.py 192.168.1.142 ``` I had to force enable overwriting the key: diff --git a/rigol_kg.py b/license_upgrade.py similarity index 100% rename from rigol_kg.py rename to license_upgrade.py diff --git a/remote_scope.py b/remote_scope.py new file mode 100644 index 0000000..963ad88 --- /dev/null +++ b/remote_scope.py @@ -0,0 +1,19 @@ +import sys, matplotlib +from pymso5000.mso5000 import MSO5000 + +with MSO5000(address = "172.17.99.12") as mso: + print(f"Identify: {mso.identify()}") + + mso.set_channel_enable(0, True) + mso.set_channel_enable(1, True) + + data = mso.query_waveform((0, 1)) + print(data) + + import matplotlib.pyplot as plt + plt.plot(data['x'], data['y0'], label = "Ch1") + plt.plot(data['x'], data['y1'], label = "Ch2") + plt.show() + +if __name__ == "__main__": + pass \ No newline at end of file