-
Notifications
You must be signed in to change notification settings - Fork 0
/
RSSMB100A.pm
79 lines (60 loc) · 1.43 KB
/
RSSMB100A.pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package Lab::Instrument::RSSMB100A;
our $VERSION = '3.40';
use strict;
use Lab::Instrument;
use Time::HiRes qw (usleep);
# inherit the generic code
our @ISA = ("Lab::Instrument");
our %fields = (
supported_connections => [ 'GPIB', 'TCPraw' ],
# default settings for the supported connections
connection_settings => {
gpib_board => 0,
gpib_address => undef,
},
# default device settings
device_settings => {
},
);
# [...]
sub set_power {
my $self=shift;
my ($power) = $self->_check_args( \@_, ['value'] );
$self->write("POWer:LEVel $power DBM");
}
sub get_power {
my $self = shift;
return $self->query("POWer:LEVel?");
}
sub set_pulselength {
my $self = shift;
my ($length) = $self->_check_args( \@_, ['value'] );
$self->write("PULM:WIDT $length s");
}
sub get_pulselength {
my $self = shift;
my $length = $self->query("PULM:WIDT?");
return $length;
}
# [...]
sub power_on {
my $self=shift;
$self->write('OUTP:STATe ON');
}
sub power_off {
my $self=shift;
$self->write('OUTP:STATe OFF');
}
1;
# the documentation, will be converted to HTML
=pod
=encoding utf-8
=head1 NAME
Lab::Instrument::RSSMB100A - Rohde & Schwarz SMB100A Signal Generator
=head1 AUTHOR/COPYRIGHT
Copyright 2005 Daniel Schroeer (<schroeer@cpan.org>)
2011 Andreas K. Huettel
2014 Andreas K. Huettel
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
=cut