NAME
Lab::Moose::Instrument::RS_RTB2000 - Rohde & Schwarz RTB 2000 oscilloscope (work in progress)
VERSION
version 3.831
SYNOPSIS
use Lab::Moose;
my $rtb = instrument(
type => 'RS_RTB2000',
connection_type => '...',
connection_options => {...}
);
$rtb->write(command => 'CHAN:TYPE HRES'); # set high-resolution mode
$rtb->write(command => 'ACQ:POIN 10000'); # record 10k points per waveform
$rtb->write(command => 'ACQ:TYPE AVER');
$rtb->write(command => 'ACQ:AVER:COUN 100'); # average over 100 waveforms
# vertical setup
$rtb->write(command => 'CHAN1:RANG 10'); # set 0 to 10V range
$rtb->write(command => 'CHAN1:POS -5');
$rtb->write(command => 'CHAN1:COUP DCLimit');
$rtb->write(command => 'CHAN1:BAND B20'); # 20MHz Bandwith
# horizontal setup
# set measurement time of 1ms, i.e. 1/12 ms per division
$rtb->write(command => 'TIM:RANG 1e-3');
$rtb->write(command => 'TIM:REF 50'); # reference point in the middle
# set trigger position at start of measurement time
$rtb->write(command => 'TIM:POS 0.5e-3');
$rtb->write(command => 'FORM REAL');
$rtb->write(command => 'FORM:BORD LSBF'); # little-endian data format
# trigger
$rtb->write(command => 'TRIG:A:MODE NORM');
$rtb->write(command => 'TRIG:A:SOUR CH1');
$rtb->write(command => 'TRIG:A:TYPE EDGE');
$rtb->write(command => 'TRIG:A:EDGE:SLOP NEG');
$rtb->write(command => 'TRIG:A:LEV1 10e-3');
$rtb->write(command => 'TRIG:A:EDGE:FILT:HFR ON'); # 5kHz filter
# output signal (option R&S RTB-B6)
$rtb->write(command => 'WGEN:OUTP ON');
$rtb->write(command => 'WGEN:FUNC RAMP');
$rtb->write(command => 'WGEN:FUNC:RAMP:POL POS');
$rtb->write(command => 'WGEN:VOLT 5');
$rtb->write(command => 'WGEN:VOLT:OFFS 2.5');
$rtb->write(command => 'WGEN:FREQ 100');
# burst setup
$rtb->write(command => 'WGEN:BURS ON');
$rtb->write(command => 'WGEN:BURS:NCYC 50'); # 50 ramps
$rtb->write(command => 'WGEN:BURS:TRIG SING');
# record single measurement
$rtb->write(command => 'ACQ:AVER:RESET'); # reset average calculation
$rtb->write(command => 'SING');
$rtb->write(command => 'WGEN:BURS:TRIG:SING'); # start output signal
$rtb->query(command => '*OPC?'); # wait until acquisiton is complete
# transfer data
my $header = $rtb->query(command => 'CHAN1:DATA:HEAD?');
my ($x_start, $x_stop, $samples, $vals_per_sample) = split(',', $header);
my $data = $rtb->query(command => 'CHAN:DATA?', read_length => '...');
# returns binary data #520000>??[>??[>??[>??[>??[>??...
my @points = $rtb->block_to_array($data, precision => 'single');
METHODS
Used roles:
COPYRIGHT AND LICENSE
This software is copyright (c) 2022 by the Lab::Measurement team; in detail:
Copyright 2022 Andreas K. Huettel, Erik Fabrizzi, Simon Reinhardt
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.