| 1 | package Lab::Moose::Instrument::Lakeshore372; | ||||||||||||||||||||
| 2 | 1 | $Lab::Moose::Instrument::Lakeshore372::VERSION = '3.931'; | |||||||||||||||||||
| 3 | #ABSTRACT: Lakeshore Model 372 Temperature Controller | ||||||||||||||||||||
| 4 | |||||||||||||||||||||
| 5 | # | ||||||||||||||||||||
| 6 | # TODO: | ||||||||||||||||||||
| 7 | # TLIMIT, TLIMIT? | ||||||||||||||||||||
| 8 | # HTR? RAMPST?, RDGPWR?, RDGST?, RDGSTL? | ||||||||||||||||||||
| 9 | # MONITOR | ||||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | 1 | ▶ | use v5.20; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | 1 | ▶ | use Moose; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 14 | 1 | ▶ | use Moose::Util::TypeConstraints qw/enum/; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 15 | 1 | ▶ | use MooseX::Params::Validate; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 16 | 1 | ▶ | use Lab::Moose::Instrument qw/ | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 17 | 1 | validated_getter validated_setter setter_params /; | |||||||||||||||||||
| 18 | 1 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 19 | 1 | ▶ | use namespace::autoclean; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | 1 | extends 'Lab::Moose::Instrument'; | |||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | 1 | with qw( | |||||||||||||||||||
| 24 | Lab::Moose::Instrument::Common | ||||||||||||||||||||
| 25 | ); | ||||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | 1 | has input_channel => ( | |||||||||||||||||||
| 28 | is => 'ro', | ||||||||||||||||||||
| 29 | isa => enum( [ 'A', 1 .. 16 ] ), | ||||||||||||||||||||
| 30 | default => 5, | ||||||||||||||||||||
| 31 | ); | ||||||||||||||||||||
| 32 | |||||||||||||||||||||
| 33 | 1 | has default_loop => ( | |||||||||||||||||||
| 34 | is => 'ro', | ||||||||||||||||||||
| 35 | isa => enum( [ 0, 1 ] ), | ||||||||||||||||||||
| 36 | default => 0, | ||||||||||||||||||||
| 37 | ); | ||||||||||||||||||||
| 38 | |||||||||||||||||||||
| 39 | 0 | ▶ | sub BUILD { | ||||||||||||||||||
|
Subroutine
BUILD: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 40 | 0 | my $self = shift; | |||||||||||||||||||
| 41 | 0 | $self->clear(); | |||||||||||||||||||
| 42 | 0 | $self->cls(); | |||||||||||||||||||
| 43 | } | ||||||||||||||||||||
| 44 | |||||||||||||||||||||
| 45 | 1 | my %channel_arg = ( channel => { isa => enum( [ 'A', 1 .. 16 ] ), optional => 1} ); | |||||||||||||||||||
| 46 | 1 | my %loop_arg = ( loop => { isa => enum( [ 0, 1 ] ), optional => 1 } ); | |||||||||||||||||||
| 47 | 1 | my %output_arg = ( output => { isa => enum( [ 0, 1, 2 ] ) } ); | |||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | |||||||||||||||||||||
| 50 | 0 | ▶ | sub get_T { | ||||||||||||||||||
|
Subroutine
get_T: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 51 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 52 | \@_, | ||||||||||||||||||||
| 53 | %channel_arg | ||||||||||||||||||||
| 54 | ); | ||||||||||||||||||||
| 55 | 0 | ▶ | my $channel = delete $args{channel} // $self->input_channel(); | ||||||||||||||||||
|
Condition0%0/3
delete $args{"channel"} // $self->input_channel
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"}
$self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
| |||||||||||||||||||||
| 56 | 0 | return $self->query( command => "KRDG? $channel", %args ); | |||||||||||||||||||
| 57 | } | ||||||||||||||||||||
| 58 | |||||||||||||||||||||
| 59 | 0 | ▶ | sub get_value { | ||||||||||||||||||
|
Subroutine
get_value: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 60 | 0 | my $self = shift; | |||||||||||||||||||
| 61 | 0 | return $self->get_T(@_); | |||||||||||||||||||
| 62 | } | ||||||||||||||||||||
| 63 | |||||||||||||||||||||
| 64 | |||||||||||||||||||||
| 65 | 0 | ▶ | sub get_sensor_units_reading { | ||||||||||||||||||
|
Subroutine
get_sensor_units_reading: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 66 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 67 | \@_, | ||||||||||||||||||||
| 68 | %channel_arg | ||||||||||||||||||||
| 69 | ); | ||||||||||||||||||||
| 70 | 0 | ▶ | my $channel = delete $args{channel} // $self->input_channel(); | ||||||||||||||||||
|
Condition0%0/3
delete $args{"channel"} // $self->input_channel
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"}
$self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
| |||||||||||||||||||||
| 71 | 0 | return $self->query( command => "SRDG? $channel", %args ); | |||||||||||||||||||
| 72 | } | ||||||||||||||||||||
| 73 | |||||||||||||||||||||
| 74 | |||||||||||||||||||||
| 75 | 0 | ▶ | sub get_quadrature_reading { | ||||||||||||||||||
|
Subroutine
get_quadrature_reading: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 76 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 77 | \@_, | ||||||||||||||||||||
| 78 | %channel_arg | ||||||||||||||||||||
| 79 | ); | ||||||||||||||||||||
| 80 | 0 | ▶ | my $channel = delete $args{channel} // $self->input_channel(); | ||||||||||||||||||
|
Condition0%0/3
delete $args{"channel"} // $self->input_channel
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"}
$self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
| |||||||||||||||||||||
| 81 | 0 | return $self->query( command => "QRDG? $channel", %args ); | |||||||||||||||||||
| 82 | } | ||||||||||||||||||||
| 83 | |||||||||||||||||||||
| 84 | |||||||||||||||||||||
| 85 | 0 | ▶ | sub get_excitation_power_reading { | ||||||||||||||||||
|
Subroutine
get_excitation_power_reading: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 86 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 87 | \@_, | ||||||||||||||||||||
| 88 | %channel_arg | ||||||||||||||||||||
| 89 | ); | ||||||||||||||||||||
| 90 | 0 | ▶ | my $channel = delete $args{channel} // $self->input_channel(); | ||||||||||||||||||
|
Condition0%0/3
delete $args{"channel"} // $self->input_channel
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"}
$self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
| |||||||||||||||||||||
| 91 | 0 | return $self->query( command => "RDGPWR? $channel", %args ); | |||||||||||||||||||
| 92 | |||||||||||||||||||||
| 93 | } | ||||||||||||||||||||
| 94 | |||||||||||||||||||||
| 95 | |||||||||||||||||||||
| 96 | 0 | ▶ | sub get_setpoint { | ||||||||||||||||||
|
Subroutine
get_setpoint: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 97 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 98 | \@_, | ||||||||||||||||||||
| 99 | %loop_arg | ||||||||||||||||||||
| 100 | ); | ||||||||||||||||||||
| 101 | 0 | ▶ | my $loop = delete $args{loop} // $self->default_loop; | ||||||||||||||||||
|
Condition0%0/3
delete $args{"loop"} // $self->default_loop
MC/DC0%0/2
delete $args{"loop"} // $self->default_loop
delete $args{"loop"}
$self->default_loop
Truth table0%0/3
A // B
A= delete $args{"loop"}B= $self->default_loop
| |||||||||||||||||||||
| 102 | 0 | return $self->query( command => "SETP? $loop", %args ); | |||||||||||||||||||
| 103 | } | ||||||||||||||||||||
| 104 | |||||||||||||||||||||
| 105 | 0 | ▶ | sub set_setpoint { | ||||||||||||||||||
|
Subroutine
set_setpoint: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 106 | 0 | my ( $self, $value, %args ) = validated_setter( | |||||||||||||||||||
| 107 | \@_, | ||||||||||||||||||||
| 108 | %loop_arg | ||||||||||||||||||||
| 109 | ); | ||||||||||||||||||||
| 110 | 0 | ▶ | my $loop = delete $args{loop} // $self->default_loop; | ||||||||||||||||||
|
Condition0%0/3
delete $args{"loop"} // $self->default_loop
MC/DC0%0/2
delete $args{"loop"} // $self->default_loop
delete $args{"loop"}
$self->default_loop
Truth table0%0/3
A // B
A= delete $args{"loop"}B= $self->default_loop
| |||||||||||||||||||||
| 111 | |||||||||||||||||||||
| 112 | # Device bug. The 340 cannot parse values with too many digits. | ||||||||||||||||||||
| 113 | 0 | $value = sprintf( "%.6E", $value ); | |||||||||||||||||||
| 114 | 0 | $self->write( command => "SETP $loop,$value", %args ); | |||||||||||||||||||
| 115 | } | ||||||||||||||||||||
| 116 | |||||||||||||||||||||
| 117 | |||||||||||||||||||||
| 118 | 0 | ▶ | sub set_T { | ||||||||||||||||||
|
Subroutine
set_T: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 119 | 0 | my $self = shift; | |||||||||||||||||||
| 120 | 0 | $self->set_setpoint(@_); | |||||||||||||||||||
| 121 | } | ||||||||||||||||||||
| 122 | |||||||||||||||||||||
| 123 | |||||||||||||||||||||
| 124 | 0 | ▶ | sub set_heater_range { | ||||||||||||||||||
|
Subroutine
set_heater_range: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 125 | 0 | my ( $self, $value, %args ) = validated_setter( | |||||||||||||||||||
| 126 | \@_, | ||||||||||||||||||||
| 127 | %output_arg, | ||||||||||||||||||||
| 128 | value => { isa => enum( [ 0 .. 8 ] ) } | ||||||||||||||||||||
| 129 | ); | ||||||||||||||||||||
| 130 | 0 | my $output = delete $args{output}; | |||||||||||||||||||
| 131 | 0 | $self->write( command => "RANGE $output, $value", %args ); | |||||||||||||||||||
| 132 | } | ||||||||||||||||||||
| 133 | |||||||||||||||||||||
| 134 | 0 | ▶ | sub get_heater_range { | ||||||||||||||||||
|
Subroutine
get_heater_range: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 135 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 136 | \@_, | ||||||||||||||||||||
| 137 | %output_arg, | ||||||||||||||||||||
| 138 | ); | ||||||||||||||||||||
| 139 | 0 | my $output = delete $args{output}; | |||||||||||||||||||
| 140 | 0 | return $self->query( command => "RANGE? $output", %args ); | |||||||||||||||||||
| 141 | } | ||||||||||||||||||||
| 142 | |||||||||||||||||||||
| 143 | |||||||||||||||||||||
| 144 | 0 | ▶ | sub set_heater_setup { | ||||||||||||||||||
|
Subroutine
set_heater_setup: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 145 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 146 | \@_, | ||||||||||||||||||||
| 147 | %loop_arg, | ||||||||||||||||||||
| 148 | resistance => { isa => 'Lab::Moose::PosNum' }, | ||||||||||||||||||||
| 149 | max_current => { isa => enum( [ 0, 1, 2 ] ) }, | ||||||||||||||||||||
| 150 | max_user_current => { isa => 'Lab::Moose::PosNum' }, | ||||||||||||||||||||
| 151 | display => { isa => enum( [ 0, 1 ] ) }, | ||||||||||||||||||||
| 152 | ); | ||||||||||||||||||||
| 153 | 0 | ▶ | my $loop = delete $args{loop} // $self->default_loop; | ||||||||||||||||||
|
Condition0%0/3
delete $args{"loop"} // $self->default_loop
MC/DC0%0/2
delete $args{"loop"} // $self->default_loop
delete $args{"loop"}
$self->default_loop
Truth table0%0/3
A // B
A= delete $args{"loop"}B= $self->default_loop
| |||||||||||||||||||||
| 154 | my ( $resistance, $max_current, $max_user_current, $display ) | ||||||||||||||||||||
| 155 | 0 | = delete @args{qw/resistance max_current max_user_current display/}; | |||||||||||||||||||
| 156 | 0 | $self->write( | |||||||||||||||||||
| 157 | command => | ||||||||||||||||||||
| 158 | "HTRSET $loop, $resistance, $max_current, $max_user_current, $display", | ||||||||||||||||||||
| 159 | %args | ||||||||||||||||||||
| 160 | ); | ||||||||||||||||||||
| 161 | } | ||||||||||||||||||||
| 162 | |||||||||||||||||||||
| 163 | 0 | ▶ | sub get_heater_setup { | ||||||||||||||||||
|
Subroutine
get_heater_setup: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 164 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 165 | \@_, | ||||||||||||||||||||
| 166 | %loop_arg, | ||||||||||||||||||||
| 167 | ); | ||||||||||||||||||||
| 168 | 0 | ▶ | my $loop = delete $args{loop} // $self->default_loop; | ||||||||||||||||||
|
Condition0%0/3
delete $args{"loop"} // $self->default_loop
MC/DC0%0/2
delete $args{"loop"} // $self->default_loop
delete $args{"loop"}
$self->default_loop
Truth table0%0/3
A // B
A= delete $args{"loop"}B= $self->default_loop
| |||||||||||||||||||||
| 169 | 0 | my $rv = $self->query( command => "HTRSET? $loop", %args ); | |||||||||||||||||||
| 170 | 0 | my %htr; | |||||||||||||||||||
| 171 | 0 | @htr{qw/resistance max_current max_user_current display/} = split ',', | |||||||||||||||||||
| 172 | $rv; | ||||||||||||||||||||
| 173 | 0 | return %htr; | |||||||||||||||||||
| 174 | } | ||||||||||||||||||||
| 175 | |||||||||||||||||||||
| 176 | |||||||||||||||||||||
| 177 | 0 | ▶ | sub get_sample_heater_output { | ||||||||||||||||||
|
Subroutine
get_sample_heater_output: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 178 | 0 | my ( $self, %args ) = validated_getter( \@_ ); | |||||||||||||||||||
| 179 | 0 | return $self->query( command => "HTR?", %args ); | |||||||||||||||||||
| 180 | } | ||||||||||||||||||||
| 181 | |||||||||||||||||||||
| 182 | |||||||||||||||||||||
| 183 | 0 | ▶ | sub set_outmode { | ||||||||||||||||||
|
Subroutine
set_outmode: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 184 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 185 | \@_, | ||||||||||||||||||||
| 186 | %output_arg, | ||||||||||||||||||||
| 187 | mode => { isa => enum( [ 0 .. 6 ] ) }, | ||||||||||||||||||||
| 188 | %channel_arg, | ||||||||||||||||||||
| 189 | powerup_enable => { isa => enum( [ 0, 1 ] ), default => 0 }, | ||||||||||||||||||||
| 190 | polarity => { isa => enum( [ 0, 1 ] ), default => 0 }, | ||||||||||||||||||||
| 191 | filter => { isa => enum( [ 0, 1 ] ), default => 0 }, | ||||||||||||||||||||
| 192 | delay => { isa => enum( [ 1 .. 255 ] ) }, | ||||||||||||||||||||
| 193 | ); | ||||||||||||||||||||
| 194 | 0 | ▶ | my $channel = delete $args{channel} // $self->input_channel(); | ||||||||||||||||||
|
Condition0%0/3
delete $args{"channel"} // $self->input_channel
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"}
$self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
| |||||||||||||||||||||
| 195 | my ( $output, $mode, $powerup_enable, $polarity, $filter, $delay ) | ||||||||||||||||||||
| 196 | 0 | = delete @args{qw/output mode powerup_enable polarity filter delay/}; | |||||||||||||||||||
| 197 | 0 | $self->write( | |||||||||||||||||||
| 198 | command => | ||||||||||||||||||||
| 199 | "OUTMODE $output, $mode, $channel, $powerup_enable, $polarity, $filter, $delay", | ||||||||||||||||||||
| 200 | %args | ||||||||||||||||||||
| 201 | ); | ||||||||||||||||||||
| 202 | } | ||||||||||||||||||||
| 203 | |||||||||||||||||||||
| 204 | 0 | ▶ | sub get_outmode { | ||||||||||||||||||
|
Subroutine
get_outmode: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 205 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 206 | \@_, | ||||||||||||||||||||
| 207 | %output_arg, | ||||||||||||||||||||
| 208 | ); | ||||||||||||||||||||
| 209 | 0 | my $output = delete $args{output}; | |||||||||||||||||||
| 210 | 0 | my $rv = $self->query( command => "OUTMODE? $output", %args ); | |||||||||||||||||||
| 211 | 0 | my @rv = split /,/, $rv; | |||||||||||||||||||
| 212 | return ( | ||||||||||||||||||||
| 213 | 0 | mode => $rv[0], channel => $rv[1], powerup_enable => $rv[2], | |||||||||||||||||||
| 214 | polarity => $rv[3], filter => $rv[4], delay => $rv[5] | ||||||||||||||||||||
| 215 | ); | ||||||||||||||||||||
| 216 | } | ||||||||||||||||||||
| 217 | |||||||||||||||||||||
| 218 | |||||||||||||||||||||
| 219 | 0 | ▶ | sub set_input_curve { | ||||||||||||||||||
|
Subroutine
set_input_curve: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 220 | 0 | my ( $self, $value, %args ) = validated_setter( | |||||||||||||||||||
| 221 | \@_, | ||||||||||||||||||||
| 222 | %channel_arg, | ||||||||||||||||||||
| 223 | value => { isa => enum( [ 0 .. 59 ] ) }, | ||||||||||||||||||||
| 224 | ); | ||||||||||||||||||||
| 225 | 0 | ▶ | my $channel = delete $args{channel} // $self->input_channel(); | ||||||||||||||||||
|
Condition0%0/3
delete $args{"channel"} // $self->input_channel
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"}
$self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
| |||||||||||||||||||||
| 226 | 0 | $self->write( command => "INCRV $channel,$value", %args ); | |||||||||||||||||||
| 227 | } | ||||||||||||||||||||
| 228 | |||||||||||||||||||||
| 229 | 0 | ▶ | sub get_input_curve { | ||||||||||||||||||
|
Subroutine
get_input_curve: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 230 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 231 | \@_, | ||||||||||||||||||||
| 232 | %channel_arg, | ||||||||||||||||||||
| 233 | ); | ||||||||||||||||||||
| 234 | 0 | ▶ | my $channel = delete $args{channel} // $self->input_channel(); | ||||||||||||||||||
|
Condition0%0/3
delete $args{"channel"} // $self->input_channel
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"}
$self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
| |||||||||||||||||||||
| 235 | 0 | return $self->query( command => "INCRV? $channel", %args ); | |||||||||||||||||||
| 236 | } | ||||||||||||||||||||
| 237 | |||||||||||||||||||||
| 238 | |||||||||||||||||||||
| 239 | 0 | ▶ | sub set_remote_mode { | ||||||||||||||||||
|
Subroutine
set_remote_mode: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 240 | 0 | my ( $self, $value, %args ) | |||||||||||||||||||
| 241 | = validated_setter( \@_, value => { isa => enum( [ 0 .. 2 ] ) } ); | ||||||||||||||||||||
| 242 | 0 | $self->write( command => "MODE $value", %args ); | |||||||||||||||||||
| 243 | } | ||||||||||||||||||||
| 244 | |||||||||||||||||||||
| 245 | 0 | ▶ | sub get_remote_mode { | ||||||||||||||||||
|
Subroutine
get_remote_mode: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 246 | 0 | my ( $self, %args ) = validated_getter( \@_ ); | |||||||||||||||||||
| 247 | 0 | return $self->query( command => "MODE?", %args ); | |||||||||||||||||||
| 248 | } | ||||||||||||||||||||
| 249 | |||||||||||||||||||||
| 250 | |||||||||||||||||||||
| 251 | 0 | ▶ | sub set_pid { | ||||||||||||||||||
|
Subroutine
set_pid: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 252 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 253 | \@_, | ||||||||||||||||||||
| 254 | %loop_arg, | ||||||||||||||||||||
| 255 | P => { isa => 'Lab::Moose::PosNum' }, | ||||||||||||||||||||
| 256 | I => { isa => 'Lab::Moose::PosNum' }, | ||||||||||||||||||||
| 257 | D => { isa => 'Lab::Moose::PosNum' } | ||||||||||||||||||||
| 258 | ); | ||||||||||||||||||||
| 259 | 0 | my ( $loop, $P, $I, $D ) = delete @args{qw/loop P I D/}; | |||||||||||||||||||
| 260 | 0 | ▶ | $loop = $loop // $self->default_loop(); | ||||||||||||||||||
|
Condition0%0/3
$loop // $self->default_loop
MC/DC0%0/2
$loop // $self->default_loop
$loop
$self->default_loop
Truth table0%0/3
A // B
A= $loopB= $self->default_loop
| |||||||||||||||||||||
| 261 | 0 | $self->write( | |||||||||||||||||||
| 262 | command => sprintf( "PID $loop, %.1f, %d, %d", $P, $I, $D ), | ||||||||||||||||||||
| 263 | %args | ||||||||||||||||||||
| 264 | ); | ||||||||||||||||||||
| 265 | } | ||||||||||||||||||||
| 266 | |||||||||||||||||||||
| 267 | 0 | ▶ | sub get_pid { | ||||||||||||||||||
|
Subroutine
get_pid: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 268 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 269 | \@_, | ||||||||||||||||||||
| 270 | %loop_arg | ||||||||||||||||||||
| 271 | ); | ||||||||||||||||||||
| 272 | 0 | ▶ | my $loop = delete $args{loop} // $self->default_loop; | ||||||||||||||||||
|
Condition0%0/3
delete $args{"loop"} // $self->default_loop
MC/DC0%0/2
delete $args{"loop"} // $self->default_loop
delete $args{"loop"}
$self->default_loop
Truth table0%0/3
A // B
A= delete $args{"loop"}B= $self->default_loop
| |||||||||||||||||||||
| 273 | 0 | my $pid = $self->query( command => "PID? $loop", %args ); | |||||||||||||||||||
| 274 | 0 | my %pid; | |||||||||||||||||||
| 275 | 0 | @pid{qw/P I D/} = split /,/, $pid; | |||||||||||||||||||
| 276 | 0 | return %pid; | |||||||||||||||||||
| 277 | } | ||||||||||||||||||||
| 278 | |||||||||||||||||||||
| 279 | |||||||||||||||||||||
| 280 | 0 | ▶ | sub set_zone { | ||||||||||||||||||
|
Subroutine
set_zone: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 281 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 282 | \@_, | ||||||||||||||||||||
| 283 | %loop_arg, | ||||||||||||||||||||
| 284 | zone => { isa => enum( [ 1 .. 10 ] ) }, | ||||||||||||||||||||
| 285 | top => { isa => 'Lab::Moose::PosNum' }, | ||||||||||||||||||||
| 286 | P => { isa => 'Lab::Moose::PosNum' }, | ||||||||||||||||||||
| 287 | I => { isa => 'Lab::Moose::PosNum' }, | ||||||||||||||||||||
| 288 | D => { isa => 'Lab::Moose::PosNum' }, | ||||||||||||||||||||
| 289 | mout => { isa => 'Lab::Moose::PosNum', default => 0 }, | ||||||||||||||||||||
| 290 | range => { isa => enum( [ 0 .. 8 ] ) }, | ||||||||||||||||||||
| 291 | rate => { isa => 'Lab::Moose::PosNum' }, | ||||||||||||||||||||
| 292 | relay_1 => { isa => enum( [ 0, 1 ] ), default => 0 }, | ||||||||||||||||||||
| 293 | relay_2 => { isa => enum( [ 0, 1 ] ), default => 0 }, | ||||||||||||||||||||
| 294 | ); | ||||||||||||||||||||
| 295 | my ( | ||||||||||||||||||||
| 296 | $loop, $zone, $top, $P, $I, $D, $mout, $range, $rate, $relay_1, | ||||||||||||||||||||
| 297 | $relay_2 | ||||||||||||||||||||
| 298 | ) | ||||||||||||||||||||
| 299 | = delete @args{ | ||||||||||||||||||||
| 300 | 0 | qw/loop zone top P I D mout range rate relay_1 relay_2/}; | |||||||||||||||||||
| 301 | 0 | ▶ | $loop = $loop // $self->default_loop; | ||||||||||||||||||
|
Condition0%0/3
$loop // $self->default_loop
MC/DC0%0/2
$loop // $self->default_loop
$loop
$self->default_loop
Truth table0%0/3
A // B
A= $loopB= $self->default_loop
| |||||||||||||||||||||
| 302 | |||||||||||||||||||||
| 303 | # if ( defined $mout ) { | ||||||||||||||||||||
| 304 | # $mout = sprintf( "%.1f", $mout ); | ||||||||||||||||||||
| 305 | # } | ||||||||||||||||||||
| 306 | # else { | ||||||||||||||||||||
| 307 | # $mout = ' '; | ||||||||||||||||||||
| 308 | # } | ||||||||||||||||||||
| 309 | |||||||||||||||||||||
| 310 | 0 | $self->write( | |||||||||||||||||||
| 311 | command => sprintf( | ||||||||||||||||||||
| 312 | "ZONE $loop, $zone, %.6G, %.1f, %.1f, %d, $mout, $range, %.1f, $relay_1, $relay_2", | ||||||||||||||||||||
| 313 | $top, $P, $I, $D | ||||||||||||||||||||
| 314 | ), | ||||||||||||||||||||
| 315 | %args | ||||||||||||||||||||
| 316 | ); | ||||||||||||||||||||
| 317 | } | ||||||||||||||||||||
| 318 | |||||||||||||||||||||
| 319 | 0 | ▶ | sub get_zone { | ||||||||||||||||||
|
Subroutine
get_zone: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 320 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 321 | \@_, | ||||||||||||||||||||
| 322 | %loop_arg, | ||||||||||||||||||||
| 323 | zone => { isa => enum( [ 1 .. 10 ] ) } | ||||||||||||||||||||
| 324 | ); | ||||||||||||||||||||
| 325 | 0 | my ( $loop, $zone ) = delete @args{qw/loop zone/}; | |||||||||||||||||||
| 326 | 0 | ▶ | $loop = $loop // $self->default_loop; | ||||||||||||||||||
|
Condition0%0/3
$loop // $self->default_loop
MC/DC0%0/2
$loop // $self->default_loop
$loop
$self->default_loop
Truth table0%0/3
A // B
A= $loopB= $self->default_loop
| |||||||||||||||||||||
| 327 | 0 | my $result = $self->query( command => "ZONE? $loop, $zone", %args ); | |||||||||||||||||||
| 328 | 0 | my %zone; | |||||||||||||||||||
| 329 | 0 | @zone{qw/top P I D mout range rate relay_1 relay_2/} = split /,/, $result; | |||||||||||||||||||
| 330 | 0 | return %zone; | |||||||||||||||||||
| 331 | } | ||||||||||||||||||||
| 332 | |||||||||||||||||||||
| 333 | |||||||||||||||||||||
| 334 | 0 | ▶ | sub set_filter { | ||||||||||||||||||
|
Subroutine
set_filter: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 335 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 336 | \@_, | ||||||||||||||||||||
| 337 | %channel_arg, | ||||||||||||||||||||
| 338 | on => { isa => enum( [ 0, 1 ] ) }, | ||||||||||||||||||||
| 339 | settle_time => { isa => enum( [ 1 .. 200 ] ) }, | ||||||||||||||||||||
| 340 | window => { isa => enum( [ 1 .. 80 ] ) } | ||||||||||||||||||||
| 341 | ); | ||||||||||||||||||||
| 342 | my ( $channel, $on, $settle_time, $window ) | ||||||||||||||||||||
| 343 | 0 | = delete @args{qw/channel on settle_time window/}; | |||||||||||||||||||
| 344 | 0 | ▶ | $channel = $channel // $self->input_channel(); | ||||||||||||||||||
|
Condition0%0/3
$channel // $self->input_channel
MC/DC0%0/2
$channel // $self->input_channel
$channel
$self->input_channel
Truth table0%0/3
A // B
A= $channelB= $self->input_channel
| |||||||||||||||||||||
| 345 | |||||||||||||||||||||
| 346 | 0 | $self->write( | |||||||||||||||||||
| 347 | command => "FILTER $channel,$on,$settle_time,$window", | ||||||||||||||||||||
| 348 | %args | ||||||||||||||||||||
| 349 | ); | ||||||||||||||||||||
| 350 | } | ||||||||||||||||||||
| 351 | |||||||||||||||||||||
| 352 | 0 | ▶ | sub get_filter { | ||||||||||||||||||
|
Subroutine
get_filter: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 353 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 354 | \@_, | ||||||||||||||||||||
| 355 | %channel_arg, | ||||||||||||||||||||
| 356 | ); | ||||||||||||||||||||
| 357 | 0 | ▶ | my $channel = delete $args{channel} // $self->input_channel(); | ||||||||||||||||||
|
Condition0%0/3
delete $args{"channel"} // $self->input_channel
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"}
$self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
| |||||||||||||||||||||
| 358 | 0 | my $result = $self->query( command => "FILTER? $channel", %args ); | |||||||||||||||||||
| 359 | |||||||||||||||||||||
| 360 | 0 | my %filter; | |||||||||||||||||||
| 361 | 0 | @filter{qw/on settle_time window/} = split /,/, $result; | |||||||||||||||||||
| 362 | 0 | return %filter; | |||||||||||||||||||
| 363 | } | ||||||||||||||||||||
| 364 | |||||||||||||||||||||
| 365 | |||||||||||||||||||||
| 366 | 0 | ▶ | sub set_freq { | ||||||||||||||||||
|
Subroutine
set_freq: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 367 | 0 | my ( $self, $value, %args ) = validated_setter( | |||||||||||||||||||
| 368 | \@_, | ||||||||||||||||||||
| 369 | %channel_arg, | ||||||||||||||||||||
| 370 | value => { isa => enum( [ 1 .. 5 ] ) }, | ||||||||||||||||||||
| 371 | ); | ||||||||||||||||||||
| 372 | 0 | ▶ | my $channel = delete $args{channel} // $self->input_channel(); | ||||||||||||||||||
|
Condition0%0/3
delete $args{"channel"} // $self->input_channel
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"}
$self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
| |||||||||||||||||||||
| 373 | 0 | $self->write( command => "FREQ $channel,$value", %args ); | |||||||||||||||||||
| 374 | } | ||||||||||||||||||||
| 375 | |||||||||||||||||||||
| 376 | 0 | ▶ | sub get_freq { | ||||||||||||||||||
|
Subroutine
get_freq: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 377 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 378 | \@_, | ||||||||||||||||||||
| 379 | %channel_arg, | ||||||||||||||||||||
| 380 | ); | ||||||||||||||||||||
| 381 | 0 | ▶ | my $channel = delete $args{channel} // $self->input_channel(); | ||||||||||||||||||
|
Condition0%0/3
delete $args{"channel"} // $self->input_channel
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"}
$self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
| |||||||||||||||||||||
| 382 | 0 | return $self->query( command => "FREQ? $channel", %args ); | |||||||||||||||||||
| 383 | } | ||||||||||||||||||||
| 384 | |||||||||||||||||||||
| 385 | |||||||||||||||||||||
| 386 | 0 | ▶ | sub set_common_mode_reduction { | ||||||||||||||||||
|
Subroutine
set_common_mode_reduction: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 387 | 0 | my ( $self, $value, %args ) = validated_setter( | |||||||||||||||||||
| 388 | \@_, | ||||||||||||||||||||
| 389 | value => { isa => enum( [ 0, 1 ] ) }, | ||||||||||||||||||||
| 390 | ); | ||||||||||||||||||||
| 391 | 0 | $self->write( command => "CMR $value", %args ); | |||||||||||||||||||
| 392 | } | ||||||||||||||||||||
| 393 | |||||||||||||||||||||
| 394 | 0 | ▶ | sub get_common_mode_reduction { | ||||||||||||||||||
|
Subroutine
get_common_mode_reduction: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 395 | 0 | my ( $self, %args ) = validated_getter( \@_ ); | |||||||||||||||||||
| 396 | 0 | return $self->query( command => "CMR?", %args ); | |||||||||||||||||||
| 397 | } | ||||||||||||||||||||
| 398 | |||||||||||||||||||||
| 399 | |||||||||||||||||||||
| 400 | 0 | ▶ | sub set_mout { | ||||||||||||||||||
|
Subroutine
set_mout: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 401 | 0 | my ( $self, $value, %args ) = validated_setter( | |||||||||||||||||||
| 402 | \@_, | ||||||||||||||||||||
| 403 | %output_arg, | ||||||||||||||||||||
| 404 | value => { isa => 'Num' } | ||||||||||||||||||||
| 405 | ); | ||||||||||||||||||||
| 406 | 0 | my $output = delete $args{output}; | |||||||||||||||||||
| 407 | 0 | $self->write( command => "MOUT $output, $value", %args ); | |||||||||||||||||||
| 408 | } | ||||||||||||||||||||
| 409 | |||||||||||||||||||||
| 410 | 0 | ▶ | sub get_mout { | ||||||||||||||||||
|
Subroutine
get_mout: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 411 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 412 | \@_, | ||||||||||||||||||||
| 413 | %output_arg, | ||||||||||||||||||||
| 414 | ); | ||||||||||||||||||||
| 415 | 0 | my $output = delete $args{output}; | |||||||||||||||||||
| 416 | 0 | return $self->query( command => "MOUT? $output" ); | |||||||||||||||||||
| 417 | } | ||||||||||||||||||||
| 418 | |||||||||||||||||||||
| 419 | |||||||||||||||||||||
| 420 | 0 | ▶ | sub set_inset { | ||||||||||||||||||
|
Subroutine
set_inset: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 421 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 422 | \@_, | ||||||||||||||||||||
| 423 | %channel_arg, | ||||||||||||||||||||
| 424 | enabled => { isa => enum( [ 0, 1 ] ) }, | ||||||||||||||||||||
| 425 | dwell => { isa => enum( [ 1 .. 200 ] ) }, | ||||||||||||||||||||
| 426 | pause => { isa => enum( [ 3 .. 200 ] ) }, | ||||||||||||||||||||
| 427 | curve_number => { isa => enum( [ 0 .. 59 ] ) }, | ||||||||||||||||||||
| 428 | tempco => { isa => enum( [ 1, 2 ] ) }, | ||||||||||||||||||||
| 429 | ); | ||||||||||||||||||||
| 430 | 0 | ▶ | my $channel = delete $args{channel} // $self->input_channel(); | ||||||||||||||||||
|
Condition0%0/3
delete $args{"channel"} // $self->input_channel
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"}
$self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
| |||||||||||||||||||||
| 431 | my ( $enabled, $dwell, $pause, $curve_number, $tempco ) | ||||||||||||||||||||
| 432 | 0 | = delete @args{qw/enabled dwell pause curve_number tempco/}; | |||||||||||||||||||
| 433 | 0 | $self->write( | |||||||||||||||||||
| 434 | command => | ||||||||||||||||||||
| 435 | "INSET $channel, $enabled, $dwell, $pause, $curve_number, $tempco", | ||||||||||||||||||||
| 436 | %args | ||||||||||||||||||||
| 437 | ); | ||||||||||||||||||||
| 438 | } | ||||||||||||||||||||
| 439 | |||||||||||||||||||||
| 440 | 0 | ▶ | sub get_inset { | ||||||||||||||||||
|
Subroutine
get_inset: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 441 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 442 | \@_, | ||||||||||||||||||||
| 443 | %channel_arg, | ||||||||||||||||||||
| 444 | ); | ||||||||||||||||||||
| 445 | 0 | ▶ | my $channel = delete $args{channel} // $self->input_channel(); | ||||||||||||||||||
|
Condition0%0/3
delete $args{"channel"} // $self->input_channel
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"}
$self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
| |||||||||||||||||||||
| 446 | 0 | my $rv = $self->query( command => "INSET? $channel" ); | |||||||||||||||||||
| 447 | 0 | my %inset; | |||||||||||||||||||
| 448 | 0 | @inset{qw/enabled dwell pause curve_number tempco/} = split /,/, $rv; | |||||||||||||||||||
| 449 | 0 | return %inset; | |||||||||||||||||||
| 450 | } | ||||||||||||||||||||
| 451 | |||||||||||||||||||||
| 452 | |||||||||||||||||||||
| 453 | 0 | ▶ | sub set_intype { | ||||||||||||||||||
|
Subroutine
set_intype: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 454 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 455 | \@_, | ||||||||||||||||||||
| 456 | %channel_arg, | ||||||||||||||||||||
| 457 | mode => { isa => enum( [ 0, 1 ] ) }, | ||||||||||||||||||||
| 458 | excitation => { isa => enum( [ 1 .. 22 ] ) }, | ||||||||||||||||||||
| 459 | autorange => { isa => enum( [ 0, 1, 2 ] ) }, | ||||||||||||||||||||
| 460 | range => { isa => enum( [ 1 .. 22 ] ) }, | ||||||||||||||||||||
| 461 | cs_shunt => { isa => enum( [ 0, 1 ] ), default => 0 }, | ||||||||||||||||||||
| 462 | units => { isa => enum( [ 1, 2 ] ), default => 1 }, | ||||||||||||||||||||
| 463 | ); | ||||||||||||||||||||
| 464 | |||||||||||||||||||||
| 465 | 0 | ▶ | my $channel = delete $args{channel} // $self->input_channel(); | ||||||||||||||||||
|
Condition0%0/3
delete $args{"channel"} // $self->input_channel
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"}
$self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
| |||||||||||||||||||||
| 466 | my ( $mode, $excitation, $autorange, $range, $cs_shunt, $units ) | ||||||||||||||||||||
| 467 | 0 | = delete @args{qw/mode excitation autorange range cs_shunt units/}; | |||||||||||||||||||
| 468 | 0 | $self->write( | |||||||||||||||||||
| 469 | command => | ||||||||||||||||||||
| 470 | "INTYPE $channel, $mode, $excitation, $autorange, $range, $cs_shunt, $units", | ||||||||||||||||||||
| 471 | %args | ||||||||||||||||||||
| 472 | ); | ||||||||||||||||||||
| 473 | } | ||||||||||||||||||||
| 474 | |||||||||||||||||||||
| 475 | 0 | ▶ | sub get_intype { | ||||||||||||||||||
|
Subroutine
get_intype: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 476 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 477 | \@_, | ||||||||||||||||||||
| 478 | %channel_arg, | ||||||||||||||||||||
| 479 | ); | ||||||||||||||||||||
| 480 | 0 | ▶ | my $channel = delete $args{channel} // $self->input_channel(); | ||||||||||||||||||
|
Condition0%0/3
delete $args{"channel"} // $self->input_channel
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"}
$self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
| |||||||||||||||||||||
| 481 | 0 | my $rv = $self->query( command => "INTYPE? $channel", %args ); | |||||||||||||||||||
| 482 | 0 | my %intype; | |||||||||||||||||||
| 483 | 0 | @intype{qw/mode excitation autorange range cs_shunt units/} = split /,/, | |||||||||||||||||||
| 484 | $rv; | ||||||||||||||||||||
| 485 | 0 | return %intype; | |||||||||||||||||||
| 486 | } | ||||||||||||||||||||
| 487 | |||||||||||||||||||||
| 488 | |||||||||||||||||||||
| 489 | 0 | ▶ | sub curve_delete { | ||||||||||||||||||
|
Subroutine
curve_delete: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 490 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 491 | \@_, | ||||||||||||||||||||
| 492 | curve => { isa => enum( [ 21 .. 59 ] ) }, | ||||||||||||||||||||
| 493 | ); | ||||||||||||||||||||
| 494 | 0 | my $curve = delete $args{curve}; | |||||||||||||||||||
| 495 | 0 | $self->write( command => "CRVDEL $curve", %args ); | |||||||||||||||||||
| 496 | } | ||||||||||||||||||||
| 497 | |||||||||||||||||||||
| 498 | |||||||||||||||||||||
| 499 | 0 | ▶ | sub set_curve_header { | ||||||||||||||||||
|
Subroutine
set_curve_header: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 500 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 501 | \@_, | ||||||||||||||||||||
| 502 | curve => { isa => enum( [ 21 .. 59 ] ) }, | ||||||||||||||||||||
| 503 | name => { isa => 'Str' }, | ||||||||||||||||||||
| 504 | SN => { isa => 'Str' }, | ||||||||||||||||||||
| 505 | format => { isa => enum( [ 3, 4, 7 ] ) }, | ||||||||||||||||||||
| 506 | limit => { isa => 'Lab::Moose::PosNum' }, | ||||||||||||||||||||
| 507 | coefficient => { isa => enum( [ 1, 2 ] ) } | ||||||||||||||||||||
| 508 | ); | ||||||||||||||||||||
| 509 | my ( $curve, $name, $SN, $format, $limit, $coefficient ) | ||||||||||||||||||||
| 510 | 0 | = delete @args{qw/curve name SN format limit coefficient/}; | |||||||||||||||||||
| 511 | 0 | $self->write( | |||||||||||||||||||
| 512 | command => | ||||||||||||||||||||
| 513 | "CRVHDR $curve, \"$name\", \"$SN\", $format, $limit, $coefficient", | ||||||||||||||||||||
| 514 | %args | ||||||||||||||||||||
| 515 | ); | ||||||||||||||||||||
| 516 | } | ||||||||||||||||||||
| 517 | |||||||||||||||||||||
| 518 | 0 | ▶ | sub get_curve_header { | ||||||||||||||||||
|
Subroutine
get_curve_header: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 519 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 520 | \@_, | ||||||||||||||||||||
| 521 | curve => { isa => enum( [ 1 .. 59 ] ) }, | ||||||||||||||||||||
| 522 | ); | ||||||||||||||||||||
| 523 | 0 | my $curve = delete $args{curve}; | |||||||||||||||||||
| 524 | 0 | my $rv = $self->query( command => "CRVHDR? $curve", %args ); | |||||||||||||||||||
| 525 | 0 | my %header; | |||||||||||||||||||
| 526 | 0 | @header{qw/name SN format limit coefficient/} = split /,/, | |||||||||||||||||||
| 527 | $rv; | ||||||||||||||||||||
| 528 | 0 | return %header; | |||||||||||||||||||
| 529 | } | ||||||||||||||||||||
| 530 | |||||||||||||||||||||
| 531 | |||||||||||||||||||||
| 532 | 0 | ▶ | sub set_curve_point { | ||||||||||||||||||
|
Subroutine
set_curve_point: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 533 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 534 | \@_, | ||||||||||||||||||||
| 535 | curve => { isa => enum( [ 21 .. 59 ] ) }, | ||||||||||||||||||||
| 536 | index => { isa => enum( [ 1 .. 200 ] ) }, | ||||||||||||||||||||
| 537 | units => { isa => 'Num' }, | ||||||||||||||||||||
| 538 | temp => { isa => 'Num' }, | ||||||||||||||||||||
| 539 | curvature => { isa => 'Num', default => 0 }, | ||||||||||||||||||||
| 540 | ); | ||||||||||||||||||||
| 541 | my ( $curve, $index, $units, $temp, $curvature ) | ||||||||||||||||||||
| 542 | 0 | = delete @args{qw/curve index units temp curvature/}; | |||||||||||||||||||
| 543 | 0 | $self->write( | |||||||||||||||||||
| 544 | command => "CRVPT $curve, $index, $units, $temp, $curvature", %args ); | ||||||||||||||||||||
| 545 | } | ||||||||||||||||||||
| 546 | |||||||||||||||||||||
| 547 | 0 | ▶ | sub get_curve_point { | ||||||||||||||||||
|
Subroutine
get_curve_point: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 548 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 549 | \@_, | ||||||||||||||||||||
| 550 | curve => { isa => enum( [ 1 .. 59 ] ) }, | ||||||||||||||||||||
| 551 | index => { isa => enum( [ 1 .. 200 ] ) }, | ||||||||||||||||||||
| 552 | ); | ||||||||||||||||||||
| 553 | 0 | my $curve = delete $args{curve}; | |||||||||||||||||||
| 554 | 0 | my $index = delete $args{index}; | |||||||||||||||||||
| 555 | 0 | my $rv = $self->query( command => "CRVPT? $curve, $index", %args ); | |||||||||||||||||||
| 556 | 0 | my %point; | |||||||||||||||||||
| 557 | 0 | @point{qw/units temp curvature/} = split /,/, | |||||||||||||||||||
| 558 | $rv; | ||||||||||||||||||||
| 559 | 0 | return %point; | |||||||||||||||||||
| 560 | } | ||||||||||||||||||||
| 561 | |||||||||||||||||||||
| 562 | |||||||||||||||||||||
| 563 | 0 | ▶ | sub set_input_name { | ||||||||||||||||||
|
Subroutine
set_input_name: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 564 | 0 | my ( $self, $value, %args ) = validated_setter( | |||||||||||||||||||
| 565 | \@_, | ||||||||||||||||||||
| 566 | %channel_arg, | ||||||||||||||||||||
| 567 | ); | ||||||||||||||||||||
| 568 | 0 | ▶ | my $channel = delete $args{channel} // $self->input_channel(); | ||||||||||||||||||
|
Condition0%0/3
delete $args{"channel"} // $self->input_channel
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"}
$self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
| |||||||||||||||||||||
| 569 | 0 | $self->write( command => "INNAME $channel, $value", %args ); | |||||||||||||||||||
| 570 | } | ||||||||||||||||||||
| 571 | |||||||||||||||||||||
| 572 | 0 | ▶ | sub get_input_name { | ||||||||||||||||||
|
Subroutine
get_input_name: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 573 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 574 | \@_, | ||||||||||||||||||||
| 575 | %channel_arg, | ||||||||||||||||||||
| 576 | ); | ||||||||||||||||||||
| 577 | 0 | ▶ | my $channel = delete $args{channel} // $self->input_channel(); | ||||||||||||||||||
|
Condition0%0/3
delete $args{"channel"} // $self->input_channel
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"}
$self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
| |||||||||||||||||||||
| 578 | 0 | return $self->query( command => "INNAME? $channel", %args ); | |||||||||||||||||||
| 579 | } | ||||||||||||||||||||
| 580 | |||||||||||||||||||||
| 581 | |||||||||||||||||||||
| 582 | 0 | ▶ | sub set_ramp { | ||||||||||||||||||
|
Subroutine
set_ramp: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 583 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 584 | \@_, | ||||||||||||||||||||
| 585 | %loop_arg, | ||||||||||||||||||||
| 586 | rate => { isa => 'Lab::Moose::PosNum' }, | ||||||||||||||||||||
| 587 | on => { isa => enum( [ 0, 1 ] ) }, | ||||||||||||||||||||
| 588 | ); | ||||||||||||||||||||
| 589 | 0 | ▶ | my $loop = delete $args{loop} // $self->default_loop; | ||||||||||||||||||
|
Condition0%0/3
delete $args{"loop"} // $self->default_loop
MC/DC0%0/2
delete $args{"loop"} // $self->default_loop
delete $args{"loop"}
$self->default_loop
Truth table0%0/3
A // B
A= delete $args{"loop"}B= $self->default_loop
| |||||||||||||||||||||
| 590 | 0 | my $rate = delete $args{rate}; | |||||||||||||||||||
| 591 | 0 | my $on = delete $args{on}; | |||||||||||||||||||
| 592 | 0 | $self->write( command => "RAMP $loop, $on, $rate", %args ); | |||||||||||||||||||
| 593 | } | ||||||||||||||||||||
| 594 | |||||||||||||||||||||
| 595 | 0 | ▶ | sub get_ramp { | ||||||||||||||||||
|
Subroutine
get_ramp: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 596 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 597 | \@_, | ||||||||||||||||||||
| 598 | %loop_arg, | ||||||||||||||||||||
| 599 | ); | ||||||||||||||||||||
| 600 | 0 | ▶ | my $loop = delete $args{loop} // $self->default_loop; | ||||||||||||||||||
|
Condition0%0/3
delete $args{"loop"} // $self->default_loop
MC/DC0%0/2
delete $args{"loop"} // $self->default_loop
delete $args{"loop"}
$self->default_loop
Truth table0%0/3
A // B
A= delete $args{"loop"}B= $self->default_loop
| |||||||||||||||||||||
| 601 | 0 | my $rv = $self->query( command => "RAMP? $loop", %args ); | |||||||||||||||||||
| 602 | 0 | my %ramp; | |||||||||||||||||||
| 603 | 0 | @ramp{qw/on rate/} = split ',', $rv; | |||||||||||||||||||
| 604 | 0 | return %ramp; | |||||||||||||||||||
| 605 | } | ||||||||||||||||||||
| 606 | |||||||||||||||||||||
| 607 | |||||||||||||||||||||
| 608 | 0 | ▶ | sub set_scanner { | ||||||||||||||||||
|
Subroutine
set_scanner: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 609 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 610 | \@_, | ||||||||||||||||||||
| 611 | %channel_arg, | ||||||||||||||||||||
| 612 | autoscan => { isa => enum( [ 0, 1 ] ) }, | ||||||||||||||||||||
| 613 | ); | ||||||||||||||||||||
| 614 | 0 | ▶ | my $channel = delete $args{channel} // $self->input_channel(); | ||||||||||||||||||
|
Condition0%0/3
delete $args{"channel"} // $self->input_channel
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"}
$self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
| |||||||||||||||||||||
| 615 | 0 | my $autoscan = delete $args{autoscan}; | |||||||||||||||||||
| 616 | 0 | $self->write( command => "SCAN $channel, $autoscan", %args ); | |||||||||||||||||||
| 617 | } | ||||||||||||||||||||
| 618 | |||||||||||||||||||||
| 619 | 0 | ▶ | sub get_scanner { | ||||||||||||||||||
|
Subroutine
get_scanner: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 620 | 0 | my ( $self, %args ) = validated_getter( \@_ ); | |||||||||||||||||||
| 621 | 0 | my $rv = $self->query( command => "SCAN?", %args ); | |||||||||||||||||||
| 622 | 0 | my ( $channel, $autoscan ) = split ',', $rv; | |||||||||||||||||||
| 623 | 0 | return ( channel => $channel, autoscan => $autoscan ); | |||||||||||||||||||
| 624 | } | ||||||||||||||||||||
| 625 | |||||||||||||||||||||
| 626 | |||||||||||||||||||||
| 627 | 0 | ▶ | sub set_display_field { | ||||||||||||||||||
|
Subroutine
set_display_field: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 628 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 629 | \@_, | ||||||||||||||||||||
| 630 | field => { isa => enum( [ 1 .. 8 ] ) }, | ||||||||||||||||||||
| 631 | input => { isa => enum( [ 0 .. 17 ] ) }, | ||||||||||||||||||||
| 632 | units => { isa => enum( [ 1 .. 6 ] ) }, | ||||||||||||||||||||
| 633 | ); | ||||||||||||||||||||
| 634 | 0 | my ( $field, $input, $units ) = delete @args{qw/field input units/}; | |||||||||||||||||||
| 635 | 0 | $self->write( command => "DISPFLD $field, $input, $units", %args ); | |||||||||||||||||||
| 636 | } | ||||||||||||||||||||
| 637 | |||||||||||||||||||||
| 638 | 0 | ▶ | sub get_display_field { | ||||||||||||||||||
|
Subroutine
get_display_field: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 639 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 640 | \@_, | ||||||||||||||||||||
| 641 | field => { isa => enum( [ 1 .. 8 ] ) } | ||||||||||||||||||||
| 642 | ); | ||||||||||||||||||||
| 643 | 0 | my $field = delete $args{field}; | |||||||||||||||||||
| 644 | 0 | my $rv = $self->query( command => "DISPFLD? $field", %args ); | |||||||||||||||||||
| 645 | 0 | my ( $input, $units ) = split ',', $rv; | |||||||||||||||||||
| 646 | 0 | return ( input => $input, units => $units ); | |||||||||||||||||||
| 647 | } | ||||||||||||||||||||
| 648 | |||||||||||||||||||||
| 649 | |||||||||||||||||||||
| 650 | 0 | ▶ | sub set_display { | ||||||||||||||||||
|
Subroutine
set_display: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 651 | 0 | my ( $self, %args ) = validated_getter( | |||||||||||||||||||
| 652 | \@_, | ||||||||||||||||||||
| 653 | mode => { isa => enum( [ 0, 1, 2 ] ) }, | ||||||||||||||||||||
| 654 | num_fields => { isa => enum( [ 0, 1, 2 ] ) }, | ||||||||||||||||||||
| 655 | displayed_info => { isa => enum( [ 0 .. 3 ] ) } | ||||||||||||||||||||
| 656 | ); | ||||||||||||||||||||
| 657 | my ( $mode, $num_fields, $displayed_info ) | ||||||||||||||||||||
| 658 | 0 | = delete @args{qw/mode num_fields displayed_info/}; | |||||||||||||||||||
| 659 | 0 | $self->write( | |||||||||||||||||||
| 660 | command => "DISPLAY $mode, $num_fields, $displayed_info", | ||||||||||||||||||||
| 661 | %args | ||||||||||||||||||||
| 662 | ); | ||||||||||||||||||||
| 663 | } | ||||||||||||||||||||
| 664 | |||||||||||||||||||||
| 665 | 0 | ▶ | sub get_display { | ||||||||||||||||||
|
Subroutine
get_display: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 666 | 0 | my ( $self, %args ) = validated_getter( \@_ ); | |||||||||||||||||||
| 667 | 0 | my $rv = $self->query( command => "DISPLAY?", %args ); | |||||||||||||||||||
| 668 | 0 | my ( $mode, $num_fields, $displayed_info ) = split ',', $rv; | |||||||||||||||||||
| 669 | return ( | ||||||||||||||||||||
| 670 | 0 | mode => $mode, num_fields => $num_fields, | |||||||||||||||||||
| 671 | displayed_info => $displayed_info | ||||||||||||||||||||
| 672 | ); | ||||||||||||||||||||
| 673 | } | ||||||||||||||||||||
| 674 | |||||||||||||||||||||
| 675 | |||||||||||||||||||||
| 676 | 1 | __PACKAGE__->meta()->make_immutable(); | |||||||||||||||||||
| 677 | |||||||||||||||||||||
| 678 | 1 | 1; | |||||||||||||||||||
| 679 | |||||||||||||||||||||
| 680 | __END__ | ||||||||||||||||||||