| 1 | package Lab::XPRESS::Sweep::DietersCrazyTempSweep; | ||||||||||||||||||||||
| 2 | #ABSTRACT: Dieter's crazy temperature sweep | ||||||||||||||||||||||
| 3 | 1 | $Lab::XPRESS::Sweep::DietersCrazyTempSweep::VERSION = '3.881'; | |||||||||||||||||||||
| 4 | 1 | ▶ | use v5.20; | ||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||
| 5 | |||||||||||||||||||||||
| 6 | 1 | ▶ | use Lab::XPRESS::Sweep; | ||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||
| 7 | 1 | ▶ | use Time::HiRes qw/usleep/, qw/time/; | ||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||
| 8 | 1 | ▶ | use strict; | ||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||
| 9 | |||||||||||||||||||||||
| 10 | 1 | our @ISA = ('Lab::XPRESS::Sweep'); | |||||||||||||||||||||
| 11 | |||||||||||||||||||||||
| 12 | sub new { | ||||||||||||||||||||||
| 13 | 0 | ▶ | my $proto = shift; | ||||||||||||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||
| 14 | 0 | my @args = @_; | |||||||||||||||||||||
| 15 | 0 | ▶ | my $class = ref($proto) || $proto; | ||||||||||||||||||||
|
Condition0%0/3
ref $proto || $proto
MC/DC0%0/2
ref $proto || $proto
ref $proto
$proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
| |||||||||||||||||||||||
| 16 | |||||||||||||||||||||||
| 17 | # define default values for the config parameters: | ||||||||||||||||||||||
| 18 | my $self->{default_config} = { | ||||||||||||||||||||||
| 19 | 0 | id => 'Time_sweep', | |||||||||||||||||||||
| 20 | interval => 1, | ||||||||||||||||||||||
| 21 | points => [ 0, 10 ], | ||||||||||||||||||||||
| 22 | duration => [1], | ||||||||||||||||||||||
| 23 | stepwidth => 1, | ||||||||||||||||||||||
| 24 | mode => 'continuous', | ||||||||||||||||||||||
| 25 | allowed_instruments => ['Lab::Instrument::ITC'], | ||||||||||||||||||||||
| 26 | allowed_sweep_modes => ['continuous'], | ||||||||||||||||||||||
| 27 | }; | ||||||||||||||||||||||
| 28 | |||||||||||||||||||||||
| 29 | # create self from Sweep basic class: | ||||||||||||||||||||||
| 30 | 0 | $self = $class->SUPER::new( $self->{default_config}, @args ); | |||||||||||||||||||||
| 31 | 0 | bless( $self, $class ); | |||||||||||||||||||||
| 32 | |||||||||||||||||||||||
| 33 | # check and adjust config values if necessary: | ||||||||||||||||||||||
| 34 | 0 | $self->check_config_paramters(); | |||||||||||||||||||||
| 35 | |||||||||||||||||||||||
| 36 | # init mandatory parameters: | ||||||||||||||||||||||
| 37 | 0 | $self->{DataFile_counter} = 0; | |||||||||||||||||||||
| 38 | 0 | $self->{DataFiles} = (); | |||||||||||||||||||||
| 39 | |||||||||||||||||||||||
| 40 | 0 | return $self; | |||||||||||||||||||||
| 41 | } | ||||||||||||||||||||||
| 42 | |||||||||||||||||||||||
| 43 | sub check_config_paramters { | ||||||||||||||||||||||
| 44 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||
|
Subroutine
check_config_paramters: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||
| 45 | |||||||||||||||||||||||
| 46 | # No Backsweep allowed; adjust number of Repetitions if Backsweep is 1: | ||||||||||||||||||||||
| 47 | 0 | ▶ | if ( $self->{config}->{backsweep} == 1 ) { | ||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||
| 48 | 0 | $self->{config}->{repetitions} /= 2; | |||||||||||||||||||||
| 49 | 0 | $self->{config}->{backsweep} = 0; | |||||||||||||||||||||
| 50 | } | ||||||||||||||||||||||
| 51 | |||||||||||||||||||||||
| 52 | # Set loop-Interval to Measurement-Interval: | ||||||||||||||||||||||
| 53 | 0 | $self->{loop}->{interval} = $self->{config}->{interval}; | |||||||||||||||||||||
| 54 | |||||||||||||||||||||||
| 55 | } | ||||||||||||||||||||||
| 56 | |||||||||||||||||||||||
| 57 | sub exit_loop { | ||||||||||||||||||||||
| 58 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||
|
Subroutine
exit_loop: not called CC=11 SCAR=48.8
Pod
undocumented
| |||||||||||||||||||||||
| 59 | |||||||||||||||||||||||
| 60 | 0 | my $T_Probe = $self->{config}->{instrument}->get_value(3); | |||||||||||||||||||||
| 61 | |||||||||||||||||||||||
| 62 | 0 | ▶ | if ( $self->{sequence} == 0 ) { | ||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||
| 63 | |||||||||||||||||||||||
| 64 | 0 | ▶ | if ( $T_Probe >= @{ $self->{config}->{points} }[1] ) { | ||||||||||||||||||||
|
Branch: 4 branches
| |||||||||||||||||||||||
| 65 | 0 | $self->{config}->{instrument}->set_heateroutput(0); | |||||||||||||||||||||
| 66 | 0 | $self->{sequence}++; | |||||||||||||||||||||
| 67 | 0 | foreach my $file ( @{ $self->{DataFiles} } ) { | |||||||||||||||||||||
| 68 | 0 | $file->start_block(); | |||||||||||||||||||||
| 69 | } | ||||||||||||||||||||||
| 70 | 0 | $self->skip_LOG(); | |||||||||||||||||||||
| 71 | } | ||||||||||||||||||||||
| 72 | elsif ( $T_Probe < 15 ) { | ||||||||||||||||||||||
| 73 | 0 | $self->{config}->{instrument}->set_heateroutput(33) | |||||||||||||||||||||
| 74 | ; # 0..99% of heaterlimit | ||||||||||||||||||||||
| 75 | } | ||||||||||||||||||||||
| 76 | ▶ | elsif ( $T_Probe >= 15 and $T_Probe <= 40 ) { | |||||||||||||||||||||
|
Condition0%0/3
$T_Probe >= 15 and $T_Probe <= 40
MC/DC0%0/2
$T_Probe >= 15 and $T_Probe <= 40
$T_Probe >= 15
$T_Probe <= 40
Truth table0%0/3
A and B
A= $T_Probe >= 15B= $T_Probe <= 40
| |||||||||||||||||||||||
| 77 | 0 | $self->{config}->{instrument}->set_heateroutput(56) | |||||||||||||||||||||
| 78 | ; # 0..99% of heaterlimit | ||||||||||||||||||||||
| 79 | } | ||||||||||||||||||||||
| 80 | elsif ( $T_Probe > 40 ) { | ||||||||||||||||||||||
| 81 | 0 | $self->{config}->{instrument}->set_heateroutput(70) | |||||||||||||||||||||
| 82 | ; # 0..99% of heaterlimit | ||||||||||||||||||||||
| 83 | } | ||||||||||||||||||||||
| 84 | |||||||||||||||||||||||
| 85 | } | ||||||||||||||||||||||
| 86 | elsif ( $self->{sequence} == 1 ) { | ||||||||||||||||||||||
| 87 | 0 | ▶ | if ( $T_Probe > @{ $self->{config}->{points} }[1] ) { | ||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||
| 88 | 0 | $self->skip_LOG(); | |||||||||||||||||||||
| 89 | } | ||||||||||||||||||||||
| 90 | 0 | elsif ( $T_Probe <= @{ $self->{config}->{points} }[0] ) { | |||||||||||||||||||||
| 91 | 0 | return 1; | |||||||||||||||||||||
| 92 | } | ||||||||||||||||||||||
| 93 | } | ||||||||||||||||||||||
| 94 | |||||||||||||||||||||||
| 95 | 0 | return 0; | |||||||||||||||||||||
| 96 | |||||||||||||||||||||||
| 97 | } | ||||||||||||||||||||||
| 98 | |||||||||||||||||||||||
| 99 | sub get_value { | ||||||||||||||||||||||
| 100 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||
|
Subroutine
get_value: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||
| 101 | 0 | return $self->{config}->{instrument}->get_value(3); | |||||||||||||||||||||
| 102 | } | ||||||||||||||||||||||
| 103 | |||||||||||||||||||||||
| 104 | sub halt { | ||||||||||||||||||||||
| 105 | 0 | ▶ | return shift; | ||||||||||||||||||||
|
Subroutine
halt: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||
| 106 | } | ||||||||||||||||||||||
| 107 | |||||||||||||||||||||||
| 108 | 1 | 1; | |||||||||||||||||||||
| 109 | |||||||||||||||||||||||
| 110 | __END__ | ||||||||||||||||||||||
| 111 | |||||||||||||||||||||||
| 112 | =pod | ||||||||||||||||||||||
| 113 | |||||||||||||||||||||||
| 114 | =encoding UTF-8 | ||||||||||||||||||||||
| 115 | |||||||||||||||||||||||
| 116 | =head1 NAME | ||||||||||||||||||||||
| 117 | |||||||||||||||||||||||
| 118 | Lab::XPRESS::Sweep::DietersCrazyTempSweep - Dieter's crazy temperature sweep | ||||||||||||||||||||||
| 119 | |||||||||||||||||||||||
| 120 | =head1 VERSION | ||||||||||||||||||||||
| 121 | |||||||||||||||||||||||
| 122 | version 3.881 | ||||||||||||||||||||||
| 123 | |||||||||||||||||||||||
| 124 | =head1 COPYRIGHT AND LICENSE | ||||||||||||||||||||||
| 125 | |||||||||||||||||||||||
| 126 | This software is copyright (c) 2023 by the Lab::Measurement team; in detail: | ||||||||||||||||||||||
| 127 | |||||||||||||||||||||||
| 128 | Copyright 2013 Andreas K. Huettel, Christian Butschkow | ||||||||||||||||||||||
| 129 | 2016 Simon Reinhardt | ||||||||||||||||||||||
| 130 | 2017 Andreas K. Huettel | ||||||||||||||||||||||
| 131 | 2020 Andreas K. Huettel | ||||||||||||||||||||||
| 132 | |||||||||||||||||||||||
| 133 | |||||||||||||||||||||||
| 134 | This is free software; you can redistribute it and/or modify it under | ||||||||||||||||||||||
| 135 | the same terms as the Perl 5 programming language system itself. | ||||||||||||||||||||||
| 136 | |||||||||||||||||||||||
| 137 | =cut | ||||||||||||||||||||||