forked from CAMMS-Duke-University/Source-Meter-PyMeasure
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
user
committed
Feb 3, 2023
1 parent
b52c834
commit 94a2b34
Showing
7 changed files
with
67 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
# Source-Meter-PyMeasure | ||
Keithley SourceMeter using PyMeasure | ||
|
||
- `console_user_interface.py` is the initial program | ||
- `current_to_voltage.py` apples a Current and measures a Voltage | ||
- `voltage_to_current.py` apples a Voltage and measures a Current | ||
|
||
Additional there are some draft/test codes ignore them. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,36 @@ | ||
import tkinter as tk | ||
|
||
|
||
class MyGUI: | ||
def __init__ (self): | ||
fields = ['Text Label 1', 'Text Label 2'] | ||
|
||
self.root = tk.Tk() | ||
self.root.geometry("1500x600") | ||
self.root.title("Keithley Console") | ||
|
||
self.label = tk.Label(self.root, text="Insert the Keithley2400 Parameters", font=('Arial', 16)) | ||
self.label.pack(padx=50, pady=20) | ||
row_num = 0 | ||
# this will create a label widget | ||
self.label_1 = tk.Label(self.root, text="Label 1", font=('Arial', 16)) | ||
# grid method to arrange label respective to row number | ||
self.label_1.grid(row = row_num, column = 0, sticky = tk.W, pady = 2) | ||
# entry widgets, used to take the entry | ||
self.entry_1 = tk.Entry(self.root) | ||
# this will arrange entry widget respective to row number | ||
self.entry_1.grid(row = row_num, column = 1, pady = 2) | ||
|
||
self.myentry = tk.Entry(self.root) | ||
self.myentry.pack() | ||
|
||
self.button = tk.Button(self.root, text="Start Measure", font=('Arial', 16), command=self.start_keithley) | ||
self.button.pack(padx=50, pady=20) | ||
row_num = 1 | ||
# this will create a label widget | ||
self.label_2 = tk.Label(self.root, text="Label 2", font=('Arial', 16)) | ||
# grid method to arrange label respective to row number | ||
self.label_2.grid(row = row_num, column = 0, sticky = tk.W, pady = 2) | ||
# entry widgets, used to take the entry | ||
self.entry_2 = tk.Entry(self.root) | ||
# this will arrange entry widget respective to row number | ||
self.entry_2.grid(row = row_num, column = 1, pady = 2) | ||
|
||
self.root.mainloop() | ||
|
||
def start_keithley(self): | ||
print("Keithley Starts..") | ||
self.root.mainloop() | ||
|
||
MyGUI() |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import numpy as np | ||
|
||
min_voltage = 10 | ||
max_voltage = 10 | ||
data_points = 10 | ||
voltages = np.linspace(min_voltage, max_voltage, num=data_points) | ||
currents = np.zeros_like(voltages) | ||
current_stds = np.zeros_like(voltages) | ||
print("Init Voltages:",voltages) | ||
print("Init Currents:",currents) | ||
print("Init stds Currents:",current_stds) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import tkinter as tk | ||
|
||
|
||
class MyGUI: | ||
def __init__ (self): | ||
|
||
self.root = tk.Tk() | ||
self.root.geometry("1500x600") | ||
self.root.title("Keithley Console") | ||
|
||
self.label = tk.Label(self.root, text="Insert the Keithley2400 Parameters", font=('Arial', 16)) | ||
self.label.pack(padx=50, pady=20) | ||
|
||
self.myentry = tk.Entry(self.root) | ||
self.myentry.pack() | ||
|
||
self.button = tk.Button(self.root, text="Start Measure", font=('Arial', 16), command=self.start_keithley) | ||
self.button.pack(padx=50, pady=20) | ||
|
||
self.root.mainloop() | ||
|
||
def start_keithley(self): | ||
print("Keithley Starts..") | ||
entry_string = self.myentry.get() | ||
print(entry_string) | ||
self.label.configure(text=entry_string) | ||
|
||
MyGUI() |
File renamed without changes.