Skip to content

Commit

Permalink
Updates to python guide
Browse files Browse the repository at this point in the history
  • Loading branch information
Little-LIZard committed Oct 23, 2023
1 parent f3a65a3 commit 57b312a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 29 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,22 @@
from instrcomms import Communications

INST_RESOURCE_STR = (
"USB0::0x05E6::0x6500::04429419::INSTR" # Get from VISA Interactive Control
"USB0::0x05E6::0x6500::04429707::INSTR" # Get from VISA Interactive Control
)
start_time = time.time() # Record start time

# ================================================================================
#
# MAIN CODE STARTS HERE
#
# ================================================================================
def main():
"Main code. Will print instrument IDN 10 times and print elapsed time taken to do so."
start_time = time.time() # Record start time
my_instr = Communications(INST_RESOURCE_STR)
my_instr.connect()

my_instr = Communications(INST_RESOURCE_STR)
my_instr.connect()
my_instr.write("*RST")
for _ in range(10):
my_instr.write("*IDN?")
print(my_instr.read())
print(my_instr.query("*IDN?")) # query is the same as write + read

my_instr.write("*RST")
for _ in range(10):
my_instr.write("*IDN?")
print(my_instr.read())
print(my_instr.query("*IDN?")) # query is the same as write + read
my_instr.disconnect()
stop_time = time.time() # Record stop time
# Notify the user of completion and the data streaming rate achieved.
print("done")
print(f"Elapsed Time: {(stop_time-start_time):0.3f}s")

my_instr.disconnect()

stop_time = time.time() # Record stop time

# Notify the user of completion and the data streaming rate achieved.
print("done")
print(f"Elapsed Time: {(stop_time-start_time):0.3f}s")


if __name__ == "__main__":
main()
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ If you're looking for officially supported software, we invite you to visit [tek
- [Test Script Builder](https://www.tek.com/en/keithley-test-script-builder), dedicated IDE for TSP code development.
- [KickStart](https://www.tek.com/en/products/keithley/keithley-control-software-bench-instruments/kickstart), Instrument control and automation software for both Keithley and Tektronix products.
- [Keithley Automated Characterization Suite (ACS)](https://www.tek.com/en/products/keithley/semiconductor-test-systems/automated-characterization-suite), Advanced characterization and automation software.

- [For more Information on TSP](https://www.tek.com/en/solutions/application/test-automation/tsp-for-test-automation), Test Script Processor, our instrument control command set and programming language
- [More Information on TSP](https://www.tek.com/en/solutions/application/test-automation/tsp-for-test-automation), our instrument control command set and programming language

## Maintainers

Expand Down

0 comments on commit 57b312a

Please sign in to comment.