line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lab::Instrument::HP83732A; |
2
|
|
|
|
|
|
|
#ABSTRACT: HP 83732A Series Synthesized Signal Generator |
3
|
|
|
|
|
|
|
$Lab::Instrument::HP83732A::VERSION = '3.880'; |
4
|
1
|
|
|
1
|
|
1668
|
use v5.20; |
|
1
|
|
|
|
|
3
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
20
|
|
7
|
1
|
|
|
1
|
|
5
|
use Lab::Instrument; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
21
|
|
8
|
1
|
|
|
1
|
|
4
|
use Time::HiRes qw (usleep); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
8
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our @ISA = ("Lab::Instrument"); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our %fields = ( |
13
|
|
|
|
|
|
|
supported_connections => ['GPIB'], |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# default settings for the supported connections |
16
|
|
|
|
|
|
|
connection_settings => { |
17
|
|
|
|
|
|
|
gpib_board => 0, |
18
|
|
|
|
|
|
|
gpib_address => undef, |
19
|
|
|
|
|
|
|
}, |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
device_settings => {}, |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub new { |
26
|
0
|
|
|
0
|
1
|
|
my $proto = shift; |
27
|
0
|
|
0
|
|
|
|
my $class = ref($proto) || $proto; |
28
|
0
|
|
|
|
|
|
my $self = $class->SUPER::new(@_); |
29
|
0
|
|
|
|
|
|
$self->${ \( __PACKAGE__ . '::_construct' ) }(__PACKAGE__); |
|
0
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
return $self; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub id { |
34
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
35
|
0
|
|
|
|
|
|
return $self->query('*IDN?'); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub reset { |
39
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
40
|
0
|
|
|
|
|
|
$self->write('*RST'); |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub set_frq { |
44
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
45
|
0
|
|
|
|
|
|
my ($freq) = $self->_check_args( \@_, ['value'] ); |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
#my $freq = shift; |
48
|
0
|
|
|
|
|
|
$self->set_cw($freq); |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub set_cw { |
53
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
54
|
0
|
|
|
|
|
|
my $freq = shift; |
55
|
|
|
|
|
|
|
|
56
|
0
|
|
|
|
|
|
$self->write("FREQuency:CW $freq Hz"); |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub get_frq { |
60
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
61
|
|
|
|
|
|
|
|
62
|
0
|
|
|
|
|
|
my $freq = $self->query("FREQuency:CW?"); |
63
|
|
|
|
|
|
|
|
64
|
0
|
|
|
|
|
|
return $freq; |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
sub set_power { |
69
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
70
|
0
|
|
|
|
|
|
my ($power) = $self->_check_args( \@_, ['value'] ); |
71
|
|
|
|
|
|
|
|
72
|
0
|
|
|
|
|
|
$self->write("POWer:LEVel $power DBM"); |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
sub get_power { |
76
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
77
|
|
|
|
|
|
|
|
78
|
0
|
|
|
|
|
|
return $self->query("POWer:LEVel?"); |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
sub power_on { |
82
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
83
|
0
|
|
|
|
|
|
$self->write('OUTP:STATe ON'); |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
sub power_off { |
87
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
88
|
0
|
|
|
|
|
|
$self->write('OUTP:STATe OFF'); |
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
sub selftest { |
92
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
93
|
0
|
|
|
|
|
|
return $self->query("*TST?"); |
94
|
|
|
|
|
|
|
} |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
sub display_on { |
97
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
98
|
0
|
|
|
|
|
|
$self->write("DISPlay ON"); |
99
|
|
|
|
|
|
|
} |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
sub display_off { |
102
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
103
|
0
|
|
|
|
|
|
$self->write("DISPlay OFF"); |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
sub enable_external_am { |
107
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
108
|
0
|
|
|
|
|
|
$self->write("AM:DEPTh MAX"); |
109
|
0
|
|
|
|
|
|
$self->write("AM:SENSitivity 70PCT/VOLT"); |
110
|
0
|
|
|
|
|
|
$self->write("AM:TYPE LINear"); |
111
|
0
|
|
|
|
|
|
$self->write("AM:STATe ON"); |
112
|
|
|
|
|
|
|
} |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
sub disable_external_am { |
115
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
116
|
0
|
|
|
|
|
|
$self->write("AM:STATe OFF"); |
117
|
|
|
|
|
|
|
} |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
1; |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
__END__ |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=pod |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=encoding utf-8 |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=head1 NAME |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
Lab::Instrument::HP83732A - HP 83732A Series Synthesized Signal Generator |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=head1 VERSION |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
version 3.880 |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=head1 CAVEATS/BUGS |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
probably many |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=head1 SEE ALSO |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=over 4 |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=item * Lab::Instrument |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
=back |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
This software is copyright (c) 2023 by the Lab::Measurement team; in detail: |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
Copyright 2011 Andreas K. Huettel, Florian Olbrich |
152
|
|
|
|
|
|
|
2012 Hermann Kraus |
153
|
|
|
|
|
|
|
2013 Alois Dirnaichner, Andreas K. Huettel |
154
|
|
|
|
|
|
|
2016 Simon Reinhardt |
155
|
|
|
|
|
|
|
2017 Andreas K. Huettel |
156
|
|
|
|
|
|
|
2020 Andreas K. Huettel |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
160
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
=cut |