-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_lab.pl
More file actions
56 lines (48 loc) · 1.3 KB
/
test_lab.pl
File metadata and controls
56 lines (48 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
use Lab::Moose;
my $source1 = instrument(
type => 'DummySource',
connection_type => 'Debug',
connection_options => {verbose => 0},
# mandatory protection settings
max_units_per_step => 0.1, # max step is 1mV/1mA
max_units_per_second => 1,
min_units => -10,
max_units => 10,
);
my $source2 = instrument(
type => 'DummySource',
connection_type => 'Debug',
connection_options => {verbose => 0},
# mandatory protection settings
max_units_per_step => 0.1, # max step is 1mV/1mA
max_units_per_second => 1,
min_units => -10,
max_units => 10,
);
my $sweep1 = sweep(
type => 'Step::Voltage',
instrument => $source1,
from => 0, to => 2, step => 0.1,
both_directions => 1,
);
my $sweep2 = sweep(
type => 'Continuous::Voltage',
instrument => $source2,
from => 0, to=> 1,
rate => 0.1, interval => 0.1,
);
my $datafile = sweep_datafile(columns => [qw/source1 source2/]);
my $meas = sub {
my $sweep = shift;
my $v_gate = $source1->cached_level();
my $v_bias = $source2->cached_level();
$sweep->log(
source1 => $v_gate,
source2 => $v_bias,
);
};
$sweep2->start(
slave => $sweep1,
measurement => $meas,
datafile => $datafile,
);