Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ readable messages are written to stderr.
positional arguments:
address VISA resource name for sourcemeter
t_dwell Total number of seconds for the dwell phase(s)
t_total Total number of seconds to run for
t_total Total number of seconds to run for, if 0 run forever

optional arguments:
-h, --help show this help message and exit
Expand Down
8 changes: 4 additions & 4 deletions mppTracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

parser.add_argument("address", nargs='?', default=None, type=str, help="VISA resource name for sourcemeter")
parser.add_argument("t_dwell", nargs='?', default=None, type=int, help="Total number of seconds for the dwell phase(s)")
parser.add_argument("t_total", nargs='?', default=None, type=int, help="Total number of seconds to run for")
parser.add_argument("t_total", nargs='?', default=None, type=int, help="Total number of seconds to run for, if 0 run forever")
parser.add_argument('--dummy', default=False, action='store_true', help="Run in dummy mode (doesn't need sourcemeter, generates simulated device data)")
parser.add_argument('--visa_lib', type=str, help="Path to visa library in case pyvisa can't find it, try C:\\Windows\\system32\\visa64.dll")
parser.add_argument('--reverse_polarity', default=False, action='store_true', help="Swaps voltage polarity on output terminals.")
Expand Down Expand Up @@ -351,7 +351,7 @@ def weAreDone(sm):
i = i*polarity
t_run = tx-t0
myPrint('{:1d},{:.4e},{:.4e},{:.4e}'.format(exploring,t_run,v,i), flush=True)
if t_run > args.t_total:
if t_run > args.t_total and args.t_total != 0:
weAreDone(sm)
toc = time.time() - tic

Expand All @@ -372,7 +372,7 @@ def weAreDone(sm):
i = i*polarity
t_run = tx-t0
myPrint('{:1d},{:.4e},{:.4e},{:.4e}'.format(exploring,t_run,v,i), flush=True)
if t_run > args.t_total:
if t_run > args.t_total and args.t_total != 0:
weAreDone(sm)
i_explore = numpy.append(i_explore, i)
v_explore = numpy.append(v_explore, v)
Expand Down Expand Up @@ -403,7 +403,7 @@ def weAreDone(sm):
i = i*polarity
t_run = tx-t0
myPrint('{:1d},{:.4e},{:.4e},{:.4e}'.format(exploring,t_run,v,i), flush=True)
if t_run > args.t_total:
if t_run > args.t_total and args.t_total != 0:
weAreDone(sm)
v_set = v_set + dV
sm.write(':source:voltage {0:0.4f}'.format(Vmpp))
Expand Down