Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Instrumentation_tests_apps
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ORNL-ETL-Laboratory
Instrumentation_tests_apps
Commits
6c071df2
Commit
6c071df2
authored
1 year ago
by
Mathieu Benoit
Browse files
Options
Downloads
Plain Diff
Merge branch 'main' of
https://code.ornl.gov/ornl-etl-laboratory/instrumentation_tests_apps
parents
df7664e7
0634f7ea
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.vscode/settings.json
+3
-0
3 additions, 0 deletions
.vscode/settings.json
DualElectrometerIVTest.go
+101
-48
101 additions, 48 deletions
DualElectrometerIVTest.go
with
104 additions
and
48 deletions
.vscode/settings.json
0 → 100644
+
3
−
0
View file @
6c071df2
{
"cmake.configureOnOpen"
:
false
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
DualElectrometerIVTest.go
+
101
−
48
View file @
6c071df2
...
@@ -2,6 +2,8 @@ package main
...
@@ -2,6 +2,8 @@ package main
import
(
import
(
"flag"
"flag"
"fmt"
"os"
"time"
"time"
log
"github.com/sirupsen/logrus"
log
"github.com/sirupsen/logrus"
...
@@ -12,6 +14,15 @@ import (
...
@@ -12,6 +14,15 @@ import (
"gitlab.cern.ch/bnl-omega-go/io/writers"
"gitlab.cern.ch/bnl-omega-go/io/writers"
)
)
func
MakeMeasurementFolder
(
base_folder
,
basename
string
)
string
{
t
:=
time
.
Now
()
folderstr
:=
fmt
.
Sprintf
(
"%v/%v_%d-%02d-%02dT%02dh%02dm%02ds%03dms"
,
base_folder
,
basename
,
t
.
Year
(),
t
.
Month
(),
t
.
Day
(),
t
.
Hour
(),
t
.
Minute
(),
t
.
Second
(),
t
.
Nanosecond
()
/
1e6
)
if
err
:=
os
.
MkdirAll
(
folderstr
,
os
.
ModePerm
);
err
!=
nil
{
log
.
Fatal
(
err
)
}
return
folderstr
}
func
main
()
{
func
main
()
{
serialport
:=
flag
.
String
(
"sp"
,
"/dev/ttyUSB0"
,
"Instrument IP"
)
serialport
:=
flag
.
String
(
"sp"
,
"/dev/ttyUSB0"
,
"Instrument IP"
)
...
@@ -25,20 +36,31 @@ func main() {
...
@@ -25,20 +36,31 @@ func main() {
avg
:=
flag
.
Int
(
"avg"
,
10
,
"Number of points for averaging, if 1, averaging is turned off"
)
avg
:=
flag
.
Int
(
"avg"
,
10
,
"Number of points for averaging, if 1, averaging is turned off"
)
vmin
:=
flag
.
Float64
(
"vmin"
,
0
,
"Minimum (absolute) voltage value of the IV Sweep"
)
vmin
:=
flag
.
Float64
(
"vmin"
,
0
,
"Minimum (absolute) voltage value of the IV Sweep"
)
vmax
:=
flag
.
Float64
(
"vmax"
,
-
5
,
"Max (absolute) voltage value of the IV Sweep"
)
vmax
:=
flag
.
Float64
(
"vmax"
,
-
5
,
"Max (absolute) voltage value of the IV Sweep"
)
delay
:=
flag
.
Floa
t64
(
"delay"
,
0.5
,
"Delay between source and measure (s)"
)
delay
:=
flag
.
In
t64
(
"delay"
,
500
,
"Delay between source and measure (
m
s)"
)
nplc
:=
flag
.
Float64
(
"nplc"
,
5
,
"Aperture for the voltage and current measurements (s)"
)
nplc
:=
flag
.
Float64
(
"nplc"
,
5
,
"Aperture for the voltage and current measurements (s)"
)
//
autorange := flag.Bool("autor", false, "Use auto current measurement range")
autorange
:=
flag
.
Bool
(
"autor"
,
false
,
"Use auto current measurement range"
)
//
autoaper := flag.Bool("autoa", false, "Use auto current aperture range")
autoaper
:=
flag
.
Bool
(
"autoa"
,
false
,
"Use auto current aperture range"
)
//updown := flag.Bool("ud", true, "Perform sweep and reverse sweep, or not")
//updown := flag.Bool("ud", true, "Perform sweep and reverse sweep, or not")
basename
:=
flag
.
String
(
"f"
,
""
,
"CSV File to write the results in"
)
folder
:=
flag
.
String
(
"f"
,
""
,
"base folders to write results in"
)
basename
:=
flag
.
String
(
"b"
,
"IV"
,
"basename of saved files"
)
ch1label
:=
flag
.
String
(
"ch1"
,
"Diode"
,
"basename for channel 1"
)
ch2label
:=
flag
.
String
(
"ch2"
,
"GR"
,
"basename for channel 2"
)
rootfile
:=
flag
.
Bool
(
"rf"
,
false
,
"Write root files"
)
rootfile
:=
flag
.
Bool
(
"rf"
,
false
,
"Write root files"
)
pngfile
:=
flag
.
Bool
(
"png"
,
false
,
"write png files"
)
pngfile
:=
flag
.
Bool
(
"png"
,
false
,
"write png files"
)
csvfile
:=
flag
.
Bool
(
"csv"
,
false
,
"write CSV file"
)
csvfile
:=
flag
.
Bool
(
"csv"
,
false
,
"write CSV file"
)
emulation
:=
flag
.
Bool
(
"emulation"
,
false
,
"write CSV file"
)
loglevel
:=
flag
.
String
(
"log"
,
"INFO"
,
"Set verbosity level of the tool"
)
loglevel
:=
flag
.
String
(
"log"
,
"INFO"
,
"Set verbosity level of the tool"
)
flag
.
Parse
()
log
.
Infof
(
"Performing IV with 2 x B6517B, npoints=%v, nplc=%v, vmin=%v, vmax=%v, delay=%v, avg=%v"
,
*
npoints
,
*
nplc
,
*
vmin
,
*
vmax
,
*
delay
,
*
avg
)
log
.
Infof
(
"Setting logging filtering to %v"
,
*
loglevel
)
switch
*
loglevel
{
switch
*
loglevel
{
case
"INFO"
:
case
"INFO"
:
log
.
SetLevel
(
log
.
InfoLevel
)
log
.
SetLevel
(
log
.
InfoLevel
)
...
@@ -54,49 +76,55 @@ func main() {
...
@@ -54,49 +76,55 @@ func main() {
log
.
SetLevel
(
log
.
InfoLevel
)
log
.
SetLevel
(
log
.
InfoLevel
)
}
}
log
.
Info
(
"Performing IV with 2 x B6517B, npoints=%v, nplc=%v, vmin=%v, vmax=%v, delay=%v, avg=%v"
,
*
npoints
,
*
nplc
,
*
vmin
,
*
vmax
,
*
delay
,
*
avg
)
log
.
SetFormatter
(
&
log
.
TextFormatter
{
DisableLevelTruncation
:
true
,
flag
.
Parse
()
FullTimestamp
:
true
,
})
// B6517B
// B6517B
serialctrl
:=
Protocol
.
USBSerialController
{}
serialctrl
:=
Protocol
.
USBSerialController
{}
serialctrl
.
Init
(
*
serialport
)
serialctrl
.
Init
(
*
serialport
,
*
emulation
)
emeter_ch1
:=
electrometer
.
Electrometer
{}
emeter_ch1
:=
electrometer
.
Electrometer
{
Emulation
:
*
emulation
}
emeter_ch2
:=
electrometer
.
Electrometer
{}
emeter_ch2
:=
electrometer
.
Electrometer
{
Emulation
:
*
emulation
}
// Check if electrometers are alive
emeter_ch1
.
Init
(
&
serialctrl
,
"emeter_ch1"
,
*
addr1
)
emeter_ch1
.
Init
(
&
serialctrl
,
"emeter_ch1"
,
*
addr1
)
emeter_ch1
.
IDN
()
emeter_ch1
.
IDN
()
emeter_ch2
.
Init
(
&
serialctrl
,
"
bla
"
,
*
addr2
)
emeter_ch2
.
Init
(
&
serialctrl
,
"
emeter_ch2
"
,
*
addr2
)
emeter_ch2
.
IDN
()
emeter_ch2
.
IDN
()
//emeter_ch1.SetMeterConnect(true)
// Initialize setup
emeter_ch1
.
SetMeterConnect
(
true
)
emeter_ch1
.
SetCurrentMeasurement
()
emeter_ch1
.
SetCurrentMeasurement
()
emeter_ch1
.
SetOutput
(
true
)
emeter_ch1
.
SetOutput
(
true
)
//
emeter_ch1.Set
NPLC(*nplc
)
emeter_ch1
.
Set
ZeroCheck
(
false
)
//
emeter_ch2.SetMeterConnect(true)
emeter_ch2
.
SetMeterConnect
(
true
)
emeter_ch2
.
SetCurrentMeasurement
()
emeter_ch2
.
SetCurrentMeasurement
()
emeter_ch2
.
SetOutput
(
true
)
emeter_ch2
.
SetOutput
(
true
)
//
emeter_ch2.Set
NPLC(*nplc
)
emeter_ch2
.
Set
ZeroCheck
(
false
)
// if *autorange {
// Configure range
// emeter_ch1.SetAutoCurrentRange(true)
if
*
autorange
{
// emeter_ch2.SetAutoCurrentRange(true)
emeter_ch1
.
SetAutoCurrentRange
(
true
)
emeter_ch2
.
SetAutoCurrentRange
(
true
)
//
} else {
}
else
{
//
emeter_ch1.SetAutoCurrentRange(false)
emeter_ch1
.
SetAutoCurrentRange
(
false
)
//
emeter_ch2.SetAutoCurrentRange(false)
emeter_ch2
.
SetAutoCurrentRange
(
false
)
//
}
}
// if *autoaper {
if
*
autoaper
{
// emeter_ch1.SetAutoCurrentAperture(true)
emeter_ch1
.
SetAutoCurrentAperture
(
true
)
// emeter_ch2.SetAutoCurrentAperture(true)
emeter_ch2
.
SetAutoCurrentAperture
(
true
)
// } else {
}
else
{
// emeter_ch1.SetAutoCurrentAperture(false)
emeter_ch1
.
SetAutoCurrentAperture
(
false
)
// emeter_ch2.SetAutoCurrentAperture(false)
emeter_ch2
.
SetAutoCurrentAperture
(
false
)
// }
emeter_ch1
.
SetNPLC
(
*
nplc
)
emeter_ch2
.
SetNPLC
(
*
nplc
)
}
if
*
avg
>
1
{
if
*
avg
>
1
{
emeter_ch1
.
ConfigureAveraging
(
*
avg
,
true
)
emeter_ch1
.
ConfigureAveraging
(
*
avg
,
true
)
...
@@ -108,53 +136,71 @@ func main() {
...
@@ -108,53 +136,71 @@ func main() {
}
}
//Configure source
if
*
vmax
>
100
{
emeter_ch1
.
SetVoltageRange
(
1000
)
emeter_ch2
.
SetVoltageRange
(
1000
)
}
else
{
emeter_ch1
.
SetVoltageRange
(
100
)
emeter_ch2
.
SetVoltageRange
(
100
)
}
emeter_ch1
.
SetSourceVoltage
(
0
)
emeter_ch1
.
SetSourceVoltage
(
0
)
emeter_ch2
.
SetSourceVoltage
(
0
)
emeter_ch2
.
SetSourceVoltage
(
0
)
// Prepare Voltage ram parray
bias_points
:=
make
([]
float64
,
*
npoints
)
bias_points
:=
make
([]
float64
,
*
npoints
)
vstep
:=
(
*
vmax
-
*
vmin
)
/
(
float64
(
*
npoints
)
-
1
)
vstep
:=
(
*
vmax
-
*
vmin
)
/
(
float64
(
*
npoints
)
-
1
)
for
i
:=
0
;
i
<
*
npoints
;
i
++
{
for
i
:=
0
;
i
<
*
npoints
;
i
++
{
bias_points
[
i
]
=
float64
(
i
)
*
vstep
bias_points
[
i
]
=
float64
(
i
)
*
vstep
}
}
//Result data structure
type
datap
struct
{
type
datap
struct
{
Voltage
,
Current1
,
Current2
float64
Voltage
,
Current1
,
Current2
float64
}
}
data
:=
make
([]
datap
,
*
npoints
*
2
)
data
:=
make
([]
datap
,
*
npoints
*
2
)
//IV from Low to High voltage
for
i
:=
0
;
i
<
*
npoints
;
i
++
{
for
i
:=
0
;
i
<
*
npoints
;
i
++
{
emeter_ch1
.
SetSourceVoltage
(
bias_points
[
i
])
emeter_ch1
.
SetSourceVoltage
(
bias_points
[
i
])
time
.
Sleep
(
time
.
Duration
(
*
delay
)
*
(
time
.
S
econd
))
time
.
Sleep
(
time
.
Duration
(
*
delay
)
*
(
time
.
Millis
econd
))
voltage1
,
current_ch1
,
_
,
_
,
_
:=
emeter_ch1
.
Measure
()
voltage1
,
current_ch1
,
_
,
_
,
_
:=
emeter_ch1
.
Measure
()
voltage2
,
current_ch2
,
_
,
_
,
_
:=
emeter_ch2
.
Measure
()
voltage2
,
current_ch2
,
_
,
_
,
_
:=
emeter_ch2
.
Measure
()
voltage
:=
voltage1
voltage
:=
voltage1
if
voltage
==
0
{
if
voltage
==
0
{
voltage
=
voltage2
voltage
=
voltage2
}
}
log
.
Print
f
(
"Voltage CH1 : %v V, Voltage CH2 : %v V, Current CH1 : %v A, Current CH2 : %v A"
,
voltage1
,
voltage2
,
current_ch1
,
current_ch2
)
log
.
Info
f
(
"Voltage CH1 : %v V, Voltage CH2 : %v V, Current CH1 : %v A, Current CH2 : %v A"
,
voltage1
,
voltage2
,
current_ch1
,
current_ch2
)
data
[
i
]
=
datap
{
Voltage
:
voltage
,
Current1
:
current_ch1
,
Current2
:
current_ch2
}
data
[
i
]
=
datap
{
Voltage
:
voltage
,
Current1
:
current_ch1
,
Current2
:
current_ch2
}
}
}
//IV From High to Low voltage
for
i
:=
*
npoints
-
1
;
i
>=
0
;
i
--
{
for
i
:=
*
npoints
-
1
;
i
>=
0
;
i
--
{
emeter_ch1
.
SetSourceVoltage
(
bias_points
[
i
])
emeter_ch1
.
SetSourceVoltage
(
bias_points
[
i
])
time
.
Sleep
(
time
.
Duration
(
*
delay
)
*
(
time
.
S
econd
))
time
.
Sleep
(
time
.
Duration
(
*
delay
)
*
(
time
.
Millis
econd
))
voltage1
,
current_ch1
,
_
,
_
,
_
:=
emeter_ch1
.
Measure
()
voltage1
,
current_ch1
,
_
,
_
,
_
:=
emeter_ch1
.
Measure
()
voltage2
,
current_ch2
,
_
,
_
,
_
:=
emeter_ch2
.
Measure
()
voltage2
,
current_ch2
,
_
,
_
,
_
:=
emeter_ch2
.
Measure
()
voltage
:=
voltage1
voltage
:=
voltage1
if
voltage
==
0
{
if
voltage
==
0
{
voltage
=
voltage2
voltage
=
voltage2
}
}
log
.
Info
(
"Voltage CH1 : %v V, Voltage CH2 : %v V, Current CH1 : %v A, Current CH2 : %v A"
,
voltage1
,
voltage2
,
current_ch1
,
current_ch2
)
log
.
Info
f
(
"Voltage CH1 : %v V, Voltage CH2 : %v V, Current CH1 : %v A, Current CH2 : %v A"
,
voltage1
,
voltage2
,
current_ch1
,
current_ch2
)
data
[
*
npoints
+
i
]
=
datap
{
Voltage
:
voltage
,
Current1
:
current_ch1
,
Current2
:
current_ch2
}
data
[
*
npoints
+
i
]
=
datap
{
Voltage
:
voltage
,
Current1
:
current_ch1
,
Current2
:
current_ch2
}
}
}
//reset source to 0V
emeter_ch1
.
SetSourceVoltage
(
0
)
emeter_ch2
.
SetSourceVoltage
(
0
)
//Shut output
emeter_ch1
.
SetOutput
(
false
)
emeter_ch1
.
SetOutput
(
false
)
emeter_ch2
.
SetOutput
(
false
)
emeter_ch2
.
SetOutput
(
false
)
// Fill up data rrays
vup
,
iup1
,
iup2
,
vdown
,
idown1
,
idown2
:=
make
([]
float64
,
*
npoints
),
make
([]
float64
,
*
npoints
),
make
([]
float64
,
*
npoints
),
make
([]
float64
,
*
npoints
),
make
([]
float64
,
*
npoints
),
make
([]
float64
,
*
npoints
)
vup
,
iup1
,
iup2
,
vdown
,
idown1
,
idown2
:=
make
([]
float64
,
*
npoints
),
make
([]
float64
,
*
npoints
),
make
([]
float64
,
*
npoints
),
make
([]
float64
,
*
npoints
),
make
([]
float64
,
*
npoints
),
make
([]
float64
,
*
npoints
)
for
i
,
v
:=
range
data
{
for
i
,
v
:=
range
data
{
log
.
Info
(
"point %v : %v V, %v A, %v A"
,
i
,
v
.
Voltage
,
v
.
Current1
,
v
.
Current2
)
log
.
Info
f
(
"point %v : %v V, %v A, %v A"
,
i
,
v
.
Voltage
,
v
.
Current1
,
v
.
Current2
)
if
i
<
*
npoints
{
if
i
<
*
npoints
{
vup
[
i
]
=
v
.
Voltage
vup
[
i
]
=
v
.
Voltage
iup1
[
i
]
=
v
.
Current1
iup1
[
i
]
=
v
.
Current1
...
@@ -166,27 +212,34 @@ func main() {
...
@@ -166,27 +212,34 @@ func main() {
}
}
}
}
// Write results to file
resultfolder
:=
MakeMeasurementFolder
(
*
folder
,
*
basename
)
if
*
rootfile
{
if
*
rootfile
{
log
.
Infof
(
"Writing result to ROOT file %v"
,
resultfolder
+
"/"
+*
basename
+
".root"
)
wr
:=
writers
.
ROOTWriter
{}
wr
:=
writers
.
ROOTWriter
{}
wr
.
Init
(
*
basename
+
".root"
)
wr
.
Init
(
resultfolder
+
"/"
+
*
basename
+
".root"
)
wr
.
Write
(
"Voltage (V)"
,
"Current (A)"
,
"IV Curve
1
(Up)"
,
vup
,
iup1
)
wr
.
Write
(
"Voltage (V)"
,
"Current (A)"
,
fmt
.
Sprintf
(
"IV Curve
%v
(Up)"
,
*
ch1label
),
vup
,
iup1
)
wr
.
Write
(
"Voltage (V)"
,
"Current (A)"
,
"IV Curve
1
(Down)"
,
vdown
,
idown1
)
wr
.
Write
(
"Voltage (V)"
,
"Current (A)"
,
fmt
.
Sprintf
(
"IV Curve
%v
(Down)"
,
*
ch1label
),
vdown
,
idown1
)
wr
.
Write
(
"Voltage (V)"
,
"Current (A)"
,
"IV Curve
2
(Up)"
,
vup
,
iup2
)
wr
.
Write
(
"Voltage (V)"
,
"Current (A)"
,
fmt
.
Sprintf
(
"IV Curve
%v
(Up)"
,
*
ch2label
),
vup
,
iup2
)
wr
.
Write
(
"Voltage (V)"
,
"Current (A)"
,
"IV Curve
2
(Down)"
,
vdown
,
idown2
)
wr
.
Write
(
"Voltage (V)"
,
"Current (A)"
,
fmt
.
Sprintf
(
"IV Curve
%v
(Down)"
,
*
ch2label
),
vdown
,
idown2
)
wr
.
Close
()
wr
.
Close
()
}
}
if
*
pngfile
{
if
*
pngfile
{
io
.
WriteWaveformToPNG
(
"Voltage (V)"
,
"Current (A)"
,
"IV Curve 1 (Up)"
,
*
basename
+
"_1_up.png"
,
vup
,
iup1
)
log
.
Infof
(
"Writing plots to %v_%v/%v_up/down.png"
,
resultfolder
+
"/"
+*
basename
,
*
ch1label
,
*
ch2label
)
io
.
WriteWaveformToPNG
(
"Voltage (V)"
,
"Current (A)"
,
"IV Curve 1 (Down)"
,
*
basename
+
"_1_down.png"
,
vdown
,
idown1
)
io
.
WriteWaveformToPNG
(
"Voltage (V)"
,
"Current (A)"
,
"IV Curve 1 (Up)"
,
resultfolder
+
"/"
+*
basename
+
fmt
.
Sprintf
(
"_%v_up.png"
,
*
ch1label
),
vup
,
iup1
)
io
.
WriteWaveformToPNG
(
"Voltage (V)"
,
"Current (A)"
,
"IV Curve 2 (Up)"
,
*
basename
+
"_2_up.png"
,
vup
,
iup2
)
io
.
WriteWaveformToPNG
(
"Voltage (V)"
,
"Current (A)"
,
"IV Curve 1 (Down)"
,
resultfolder
+
"/"
+*
basename
+
fmt
.
Sprintf
(
"_%v_down.png"
,
*
ch1label
),
vdown
,
idown1
)
io
.
WriteWaveformToPNG
(
"Voltage (V)"
,
"Current (A)"
,
"IV Curve 2 (Down)"
,
*
basename
+
"_2_down.png"
,
vdown
,
idown2
)
io
.
WriteWaveformToPNG
(
"Voltage (V)"
,
"Current (A)"
,
"IV Curve 2 (Up)"
,
resultfolder
+
"/"
+*
basename
+
fmt
.
Sprintf
(
"_%v_up.png"
,
*
ch2label
),
vup
,
iup2
)
io
.
WriteWaveformToPNG
(
"Voltage (V)"
,
"Current (A)"
,
"IV Curve 2 (Down)"
,
resultfolder
+
"/"
+*
basename
+
fmt
.
Sprintf
(
"_%v_down.png"
,
*
ch2label
),
vdown
,
idown2
)
}
}
if
*
csvfile
{
if
*
csvfile
{
io
.
WriteWaveformToCSV
(
"Voltage (V)"
,
"Current (A)"
,
"IV Curve 1 (Up)"
,
*
basename
+
"_1_up.csv"
,
vup
,
iup1
)
log
.
Infof
(
"Writing plots to %v_1/2_up/down.csv"
,
*
basename
)
io
.
WriteWaveformToCSV
(
"Voltage (V)"
,
"Current (A)"
,
"IV Curve 1 (Down)"
,
*
basename
+
"_1_down.csv"
,
vdown
,
idown1
)
io
.
WriteWaveformToCSV
(
"Voltage (V)"
,
"Current (A)"
,
"IV Curve 1 (Up)"
,
resultfolder
+
"/"
+*
basename
+
fmt
.
Sprintf
(
"_%v_up.csv"
,
*
ch1label
),
vup
,
iup1
)
io
.
WriteWaveformToCSV
(
"Voltage (V)"
,
"Current (A)"
,
"IV Curve 2 (Up)"
,
*
basename
+
"_2_up.csv"
,
vup
,
iup2
)
io
.
WriteWaveformToCSV
(
"Voltage (V)"
,
"Current (A)"
,
"IV Curve 1 (Down)"
,
resultfolder
+
"/"
+*
basename
+
fmt
.
Sprintf
(
"_%v_down.csv"
,
*
ch1label
),
vdown
,
idown1
)
io
.
WriteWaveformToCSV
(
"Voltage (V)"
,
"Current (A)"
,
"IV Curve 2 (Down)"
,
*
basename
+
"_2_down.csv"
,
vdown
,
idown2
)
io
.
WriteWaveformToCSV
(
"Voltage (V)"
,
"Current (A)"
,
"IV Curve 2 (Up)"
,
resultfolder
+
"/"
+*
basename
+
fmt
.
Sprintf
(
"_%v_up.csv"
,
*
ch2label
),
vup
,
iup2
)
io
.
WriteWaveformToCSV
(
"Voltage (V)"
,
"Current (A)"
,
"IV Curve 2 (Down)"
,
resultfolder
+
"/"
+*
basename
+
fmt
.
Sprintf
(
"_%v_down.csv"
,
*
ch2label
),
vdown
,
idown2
)
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment