We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5784288 commit 4366b88Copy full SHA for 4366b88
1 file changed
examples/gpib-tektronix-hardcopy.py
@@ -0,0 +1,24 @@
1
+"""
2
+An example script which can be used with run-script.
3
+
4
+This script will request a screen capture from a Tektronix
5
+oscilloscope.
6
7
+ glasgow script gpib-tektronix-hardcopy.py gpib-controller -V5
8
9
10
11
+address = 10
12
13
+# await iface.send_to(address, b"HARDCOPY:FORMAT EPSCOLOR")
14
+# await iface.send_to(address, b"HARDCOPY:FORMAT BMPCOLOR")
15
+await iface.send_to(address, b"HARDCOPY:FORMAT TIFF")
16
17
+await iface.send_to(address, b"HARDCOPY:COMPRESSION 0")
18
+await iface.send_to(address, b"HARDCOPY:LAYOUT LAND")
19
+await iface.send_to(address, b"HARDCOPY:PORT GPIB")
20
+await iface.send_to(address, b"HARDCOPY START")
21
22
+with open('hardcopy.tiff', 'wb') as f:
23
+ async for b in iface.iter_from(address):
24
+ f.write(b)
0 commit comments