| 1 | package Lab::Instrument::Multimeter; | ||||||||||||||||||||
| 2 | #ABSTRACT: Generic digital multimeter base class | ||||||||||||||||||||
| 3 | 2 | $Lab::Instrument::Multimeter::VERSION = '3.881'; | |||||||||||||||||||
| 4 | 2 | ▶ | use v5.20; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | 2 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | 2 | ▶ | use Lab::Instrument; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | 2 | our @ISA = ("Lab::Instrument"); | |||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | 2 | our %fields = ( | |||||||||||||||||||
| 12 | supported_connections => [], | ||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | device_settings => {}, | ||||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | ); | ||||||||||||||||||||
| 17 | |||||||||||||||||||||
| 18 | sub new { | ||||||||||||||||||||
| 19 | 1 | ▶ | my $proto = shift; | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||||||||||||
| 20 | 1 | ▶ | my $class = ref($proto) || $proto; | ||||||||||||||||||
|
Condition33%1/3
ref $proto || $proto
MC/DC0%0/2
ref $proto || $proto
ref $proto
$proto
Truth table33%1/3
A || B
A= ref $protoB= $proto
| |||||||||||||||||||||
| 21 | 1 | my $self = $class->SUPER::new(@_); | |||||||||||||||||||
| 22 | 1 | $self->${ \( __PACKAGE__ . '::_construct' ) }(__PACKAGE__); | |||||||||||||||||||
| 23 | 1 | return $self; | |||||||||||||||||||
| 24 | } | ||||||||||||||||||||
| 25 | |||||||||||||||||||||
| 26 | # template functions for inheriting classes | ||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | sub id { | ||||||||||||||||||||
| 29 | 0 | ▶ | die "id not implemented for this instrument\n"; | ||||||||||||||||||
|
Subroutine
id: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 30 | } | ||||||||||||||||||||
| 31 | |||||||||||||||||||||
| 32 | sub get_range { | ||||||||||||||||||||
| 33 | 0 | ▶ | my $self = shift; | ||||||||||||||||||
|
Subroutine
get_range: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 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 | ▶ | my $self = shift; | ||||||||||||||||||
|
Subroutine
set_range: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 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 | ▶ | my $self = shift; | ||||||||||||||||||
|
Subroutine
get_level: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 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 | ▶ | die "selftest not implemented for this instrument\n"; | ||||||||||||||||||
|
Subroutine
selftest: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 58 | } | ||||||||||||||||||||
| 59 | |||||||||||||||||||||
| 60 | sub configure_voltage_dc { | ||||||||||||||||||||
| 61 | 0 | ▶ | die "configure_voltage_dc not implemented for this instrument\n"; | ||||||||||||||||||
|
Subroutine
configure_voltage_dc: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 62 | } | ||||||||||||||||||||
| 63 | |||||||||||||||||||||
| 64 | sub configure_voltage_dc_trigger { | ||||||||||||||||||||
| 65 | 0 | ▶ | die "configure_voltage_dc_trigger not implemented for this instrument\n"; | ||||||||||||||||||
|
Subroutine
configure_voltage_dc_trigger: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 66 | } | ||||||||||||||||||||
| 67 | |||||||||||||||||||||
| 68 | sub triggered_read { | ||||||||||||||||||||
| 69 | 0 | ▶ | die "triggered_read not implemented for this instrument\n"; | ||||||||||||||||||
|
Subroutine
triggered_read: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 70 | } | ||||||||||||||||||||
| 71 | |||||||||||||||||||||
| 72 | sub get_error { | ||||||||||||||||||||
| 73 | 0 | ▶ | die "get_error not implemented for this instrument\n"; | ||||||||||||||||||
|
Subroutine
get_error: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 74 | } | ||||||||||||||||||||
| 75 | |||||||||||||||||||||
| 76 | 2 | 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.881 | ||||||||||||||||||||
| 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 | ||||||||||||||||||||