Skip to content

Commit 4366b88

Browse files
committed
Example gpib run script
1 parent 5784288 commit 4366b88

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)