| 1 | package Lab::Moose::Instrument::Keysight33600; | ||
| 2 | 1 | $Lab::Moose::Instrument::Keysight33600::VERSION = '3.881'; | |
| 3 | #ABSTRACT: Keysight 33500/33600 series Function/Arbitrary Waveform Generator (work in progress) | ||
| 4 | |||
| 5 | 1 | ▶ | use v5.20; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 1 | ▶ | use MooseX::Params::Validate; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 1 | ▶ | use Moose::Util::TypeConstraints qw/enum/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 1 | ▶ | use List::Util qw/sum/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 1 | ▶ | use List::MoreUtils qw/minmax/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | use Lab::Moose::Instrument | ||
| 13 | 1 | ▶ | qw/validated_channel_getter validated_channel_setter validated_getter validated_setter/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | 1 | ▶ | use Lab::Moose::Instrument::Cache; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | 1 | ▶ | use Carp 'croak'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 16 | 1 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | |||
| 18 | 1 | extends 'Lab::Moose::Instrument'; | |
| 19 | |||
| 20 | around default_connection_options => sub { | ||
| 21 | 0 | ▶ | my $orig = shift; |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 22 | 0 | my $self = shift; | |
| 23 | 0 | my $options = $self->$orig(); | |
| 24 | 0 | my $usb_opts = { vid => 0x0957, pid => 0x2b07 }; | |
| 25 | 0 | $options->{USB} = $usb_opts; | |
| 26 | 0 | $options->{'VISA::USB'} = $usb_opts; | |
| 27 | 0 | return $options; | |
| 28 | 1 | }; | |
| 29 | |||
| 30 | sub BUILD { | ||
| 31 | 0 | ▶ | my $self = shift; |
|
Subroutine
BUILD: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 32 | 0 | $self->clear(); | |
| 33 | 0 | $self->cls(); | |
| 34 | } | ||
| 35 | |||
| 36 | |||
| 37 | # | ||
| 38 | # MY FUNCTIONS | ||
| 39 | # | ||
| 40 | |||
| 41 | |||
| 42 | 1 | with qw( | |
| 43 | Lab::Moose::Instrument::Common | ||
| 44 | ); | ||
| 45 | |||
| 46 | 1 | __PACKAGE__->meta()->make_immutable(); | |
| 47 | |||
| 48 | 1 | 1; | |
| 49 | |||
| 50 | __END__ | ||
| 51 | |||
| 52 | =pod | ||
| 53 | |||
| 54 | =encoding UTF-8 | ||
| 55 | |||
| 56 | =head1 NAME | ||
| 57 | |||
| 58 | Lab::Moose::Instrument::Keysight33600 - Keysight 33500/33600 series Function/Arbitrary Waveform Generator (work in progress) | ||
| 59 | |||
| 60 | =head1 VERSION | ||
| 61 | |||
| 62 | version 3.881 | ||
| 63 | |||
| 64 | =head1 SYNOPSIS | ||
| 65 | |||
| 66 | use Lab::Moose; | ||
| 67 | my $trueform = instrument( | ||
| 68 | type => 'Keysight33600', | ||
| 69 | connection_type => '...', | ||
| 70 | connection_options => {...} | ||
| 71 | ); | ||
| 72 | |||
| 73 | ### Setup waveform ### | ||
| 74 | |||
| 75 | # Clear volatile memory | ||
| 76 | $trueform->write(command => 'DATA:VOL:CLE'); | ||
| 77 | # write new waveform into volatile memory | ||
| 78 | $trueform->write(command => 'DATA:ARB myarb, 0, 0, 0.1, ...,1, ...'); | ||
| 79 | # load the new waveform | ||
| 80 | $trueform->write(command => 'SOUR:FUNC:ARB myarb'); | ||
| 81 | # set parameters | ||
| 82 | $trueform->write(command => 'SOUR:VOLT 1'); # amplitude | ||
| 83 | $trueform->write(command => 'FUNC:ARB:SRAT 100000'); # samples/points per second | ||
| 84 | $trueform->write(command => 'FUNC:ARB:FILT STEP'); # interpolation type | ||
| 85 | |||
| 86 | $trueform->write(command => 'OUTP:POL INV'); # invert output polarity | ||
| 87 | |||
| 88 | # Setup trigger input | ||
| 89 | $trueform->write(command => 'BURS:MODE TRIG'); | ||
| 90 | $trueform->write(command => 'BURS:NCYC 1'); # one ramp per trigger | ||
| 91 | $trueform->write(command => 'TRIG:SOUR BUS'}; # use *TRG command as trigger | ||
| 92 | |||
| 93 | |||
| 94 | # Setup trigger output | ||
| 95 | $trueform->write(command => 'OUTP:TRIG 1'); | ||
| 96 | $trueform->write(command => 'OUTP:TRIG:SLOP NEG'); | ||
| 97 | |||
| 98 | |||
| 99 | # Turn output on | ||
| 100 | $trueform->write(command => 'OUTP ON'); | ||
| 101 | |||
| 102 | =head1 METHODS | ||
| 103 | |||
| 104 | Used roles: | ||
| 105 | |||
| 106 | =over | ||
| 107 | |||
| 108 | =item L<Lab::Moose::Instrument::Common> | ||
| 109 | |||
| 110 | =back | ||
| 111 | |||
| 112 | =head2 | ||
| 113 | |||
| 114 | =head1 COPYRIGHT AND LICENSE | ||
| 115 | |||
| 116 | This software is copyright (c) 2023 by the Lab::Measurement team; in detail: | ||
| 117 | |||
| 118 | Copyright 2022 Simon Reinhardt | ||
| 119 | |||
| 120 | |||
| 121 | This is free software; you can redistribute it and/or modify it under | ||
| 122 | the same terms as the Perl 5 programming language system itself. | ||
| 123 | |||
| 124 | =cut | ||