line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lab::Instrument::Multimeter; |
2
|
|
|
|
|
|
|
#ABSTRACT: Generic digital multimeter base class |
3
|
|
|
|
|
|
|
$Lab::Instrument::Multimeter::VERSION = '3.880'; |
4
|
2
|
|
|
2
|
|
1723
|
use v5.20; |
|
2
|
|
|
|
|
7
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
54
|
|
7
|
2
|
|
|
2
|
|
12
|
use Lab::Instrument; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
868
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @ISA = ("Lab::Instrument"); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our %fields = ( |
12
|
|
|
|
|
|
|
supported_connections => [], |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
device_settings => {}, |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub new { |
19
|
1
|
|
|
1
|
1
|
2
|
my $proto = shift; |
20
|
1
|
|
33
|
|
|
5
|
my $class = ref($proto) || $proto; |
21
|
1
|
|
|
|
|
8
|
my $self = $class->SUPER::new(@_); |
22
|
1
|
|
|
|
|
2
|
$self->${ \( __PACKAGE__ . '::_construct' ) }(__PACKAGE__); |
|
1
|
|
|
|
|
7
|
|
23
|
1
|
|
|
|
|
3
|
return $self; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# template functions for inheriting classes |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub id { |
29
|
0
|
|
|
0
|
1
|
|
die "id not implemented for this instrument\n"; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub get_range { |
33
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
Lab::Exception::DriverError->throw( "The unimplemented method stub " |
36
|
|
|
|
|
|
|
. __PACKAGE__ |
37
|
|
|
|
|
|
|
. "::get_range() has been called. I can't work like this.\n" ); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub set_range { |
41
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
42
|
|
|
|
|
|
|
|
43
|
0
|
|
|
|
|
|
Lab::Exception::DriverError->throw( "The unimplemented method stub " |
44
|
|
|
|
|
|
|
. __PACKAGE__ |
45
|
|
|
|
|
|
|
. "::set_range() has been called. I can't work like this.\n" ); |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub get_level { |
49
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
50
|
|
|
|
|
|
|
|
51
|
0
|
|
|
|
|
|
Lab::Exception::DriverError->throw( "The unimplemented method stub " |
52
|
|
|
|
|
|
|
. __PACKAGE__ |
53
|
|
|
|
|
|
|
. "::set_level() has been called. I can't work like this.\n" ); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub selftest { |
57
|
0
|
|
|
0
|
0
|
|
die "selftest not implemented for this instrument\n"; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
sub configure_voltage_dc { |
61
|
0
|
|
|
0
|
0
|
|
die "configure_voltage_dc not implemented for this instrument\n"; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
sub configure_voltage_dc_trigger { |
65
|
0
|
|
|
0
|
0
|
|
die "configure_voltage_dc_trigger not implemented for this instrument\n"; |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
sub triggered_read { |
69
|
0
|
|
|
0
|
0
|
|
die "triggered_read not implemented for this instrument\n"; |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub get_error { |
73
|
0
|
|
|
0
|
1
|
|
die "get_error not implemented for this instrument\n"; |
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
1; |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
__END__ |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=pod |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=encoding utf-8 |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 NAME |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Lab::Instrument::Multimeter - Generic digital multimeter base class |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 VERSION |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
version 3.880 |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 DESCRIPTION |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
The Lab::Instrument::Multmeter class implements a generic interface to |
95
|
|
|
|
|
|
|
digital all-purpose multimeters. It is intended to be inherited by other |
96
|
|
|
|
|
|
|
classes, not to be called directly, and provides a set of generic functions. |
97
|
|
|
|
|
|
|
The class |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
my $hp=new(\%options); |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head1 METHODS |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head2 get_value |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
$value=$hp->get_value(); |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Read out the current measurement value, for whatever type of measurement |
110
|
|
|
|
|
|
|
the multimeter is currently configured. |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=head2 id |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
$id=$hp->id(); |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
Returns the instruments ID string. |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head2 display_on |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
$hp->display_on(); |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
Turn the front-panel display on. |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=head2 display_off |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
$hp->display_off(); |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
Turn the front-panel display off. |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=head2 display_text |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
$hp->display_text($text); |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
Display a message on the front panel. |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=head2 display_clear |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
$hp->display_clear(); |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
Clear the message displayed on the front panel. |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=head1 CAVEATS/BUGS |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
none known so far :) |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=head1 SEE ALSO |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=over 4 |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=item * L<Lab::Instrument> |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
=item * L<Lab::Instrument:HP34401A> |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=item * L<Lab::Instrument:HP3458A> |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
=back |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
This software is copyright (c) 2023 by the Lab::Measurement team; in detail: |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
Copyright 2011 Andreas K. Huettel, Florian Olbrich |
163
|
|
|
|
|
|
|
2012 Alois Dirnaichner, Florian Olbrich |
164
|
|
|
|
|
|
|
2016 Simon Reinhardt |
165
|
|
|
|
|
|
|
2017 Andreas K. Huettel |
166
|
|
|
|
|
|
|
2020 Andreas K. Huettel |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
170
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
=cut |