NAME

Lab::Moose::Instrument::Rigol_DG5000 - Rigol DG5000 series Function/Arbitrary Waveform Generator

VERSION

version 3.822

SYNOPSIS

use Lab::Moose;

my $rigol = instrument(
   type => 'Rigol_DG5000',
   connection_type => 'USB', # For NT-VISA use 'VISA::USB'
   instrument_nselect => 2,
   );

All source_*, set_* and get_* commands accept a channel argument, which can be 1 or 2. On initalization an argument instrument_nselect can be passed to specify a default channel, though if instrument_nselect is not passed the default channel is 1:

$rigol->source_function_shape(value => 'SIN'); # Channel 1
$rigol->source_function_shape(value => 'SQU', channel => 2); # Channel 2

METHODS

Used roles:

Lab::Moose::Instrument::Common

gen_arb_step

$rigol->gen_arb_step(channel => 1, sequence => [
  0.2,  0.00002,
  0.5,  0.0001,
  0.35, 0.0001
  ], bdelay => 0, bcycles => 1
);

Generate an arbitrary voltage step function. With sequence an array referrence is passed to the function, containing data pairs of an amplitude and time value. The example above repeatedly outputs a constant 200mV for 20µs, 500mV for 100µs and 350mV for 100µs.

WORK IN PROGRESS: With bdelay and bcycles a delay between a specified amount of cycles is enabled using the Rigols burst mode.

bdelay = 0 by default disabling burst mode.

arb_mode

$rigol->arb_mode(value => 'INTernal');

Allowed values: INT, INTernal, PLAY. In normal or internal mode he output frequency ranges from 1 μHz to 50 MHz, and the sample rate is fixed at 1G Sa/s, while the number of points is 16Mpts. Play mode is used once the number of points of the arbitrary waveform to be output is greater than 16 Mpts, ranging up to 128Mpts. See the Rigols user manual page 3-4 and following for more information.

play_coefficient

$rigol->play_coefficient(value => 10);

When using the arbitrary waveform in play mode, a frequency division coefficient N can be used to reduce the sample rate fs via the relations

  • fs = 1G/2^N, When N≤2

  • fs = 1G/((N-2)*8), when N>2

The range of N is from 0 to 268435456 (2^28). See the Rigol user manual page 3-4 and following for more information.

phase_align

$rigol->phase_align();

Phase-align the two output channels, only available if the output function is either Sine, Square, Ramp or Arbitrary.

output_on/output_off

$rigol->output_on(channel => 1);
$rigol->output_off(channel => 2);

Turn output channels on or off.

set_pulsewidth/get_pulsewidth

$rigol->set_pulsewidth(channel => 1, value => 0.0000001, constant_delay => 1);
$rigol->get_pulsewidth();

When the output functon is PULSE these subroutines set/get the pulses width in s. This reduces the pulse delay however, since the pulse period stays the same. An optional parameter constant_delay can be passed to adapt the waveform period and keep the delay constant.

set_pulsedelay/get_pulsedelay

$rigol->set_pulsedelay(channel => 1, value => 0.0000003, constant_width => 1);
$rigol->get_pulsedelay();

When the output functon is PULSE these subroutines set/get the pulses width in s. This reduces the pulse delay however, since the pulse period stays the same. As with the delay an optional parameter constant_width can be passed to adapt the waveform period and keep the width constant.

set_period/get_period

$rigol->set_period(channel => 1, value => 0.00000045);
$rigol->get_period();

Set/query the current waveforms period in s.

set_frq/get_frq

$rigol->set_frq(channel => 1, value => 10000000);
$rigol->get_frq();

Set/query the current waveforms frequency in Hz. This subroutine is used for frequency sweeps.

set_voltage/get_voltage

$rigol->set_voltage(channel => 1, value => 1);
$rigol->get_voltage();

Set/query the current waveforms peak-to-peak amplitude in volts.

set_level/get_level

$rigol->set_level(channel => 1, value => 1);
$rigol->get_level();

Set/query the current waveforms maximum amplitude amplitude in volts. This subroutine is used for voltage sweeps.

set_level_low/get_level_low

$rigol->set_level_low(channel => 1, value => 1);
$rigol->get_level_low();

Set/query the current waveforms minimum amplitude amplitude in volts.

set_offset/get_offset

$rigol->set_offset(channel => 1, value => 0.5);
$rigol->get_offset();

Set/query the current waveforms dc offset in volts.

source_apply_pulse

$rigol->source_apply_ramp(
    freq => ...,
    amp => ...,
    offset => ...,
    delay => ...
);

Apply a pulse function with the given parameters,

  • freq = frequency in Hz

  • amp = amplitude in Volts

  • offset = DC offset in Volts

  • delay = pulse delay in seconds

source_apply_ramp/square/arb

$rigol->source_apply_ramp(
    freq => ...,
    amp => ...,
    offset => ...,
    phase => ...
);

Apply a ramp, sine, square function or arbitrary waveform with the given parameters,

  • freq = frequency in Hz

  • amp = amplitude in Volts

  • offset = DC offset in Volts

  • phase = phase in degrees (0 to 360)

source_burst_mode/source_burst_mode_query

$rigol->source_burst_mode(value => 'TRIG');
say $rigol->source_burst_mode_query();

Allowed values: TRIG, GAT, INF. For more information see the Rigols user manual page 7-3.

source_burst_ncycles/source_burst_ncycles_query

$rigol->source_burst_ncycles(value => 1);
say $rigol->source_burst_ncycles_query();

Output a specified amount of full wave cycles, with a delay between them. See source_burst_tdelay/source_burst_tdelay_query for more information.

source_burst_state/source_burst_state_query

$rigol->source_burst_state(value => 'ON');
say $rigol_source_burst_state_query();

Allowed values: ON, OFF Turns the burst mode on or off.

source_burst_tdelay/source_burst_tdelay_query

$rigol->source_burst_tdelay(value => 1e-3);
say $rigol->source_burst_tdelay_query();

Specify/query the delay between bursts in seconds.

source_burst_trigger

$rigol->source_burst_trigger();

Trigger a burst via program.

source_burst_trigger_slope/source_burst_trigger_slope_query

$rigol->source_burst_trigger_slope(value => 'POS');
say $rigol->source_burst_trigger_slope_query();

Allowed values: POS, NEG. In Gated mode, the generator will output burst at specified polarity of the gated signal received from the [ExtTrig] connector at the rear panel.

source_burst_trigger_trigout/source_burst_trigger_trigout_query

$rigol->source_burst_trigger_trigout(value => 'POS');
$rigol->source_burst_trigger_trigout_query();

Allowed values: POS, NEG, OFF. In Burst mode, when “Internal” or “Manual” trigger source is selected, the generator will output a TTL compatible signal with specified polarity from the [ExtTrig] connector at the rear panel. For more information see the Rigols user manual page 7-7.

source_burst_trigger_source/source_burst_trigger_source_query

$rigol->source_burst_trigger_source(value => 'INT');
$rigol->source_burst_trigger_source_query();

Allowed values: INT, EXT. Specify whether the trigger signal for a burst is controlled internally or externally via the [ExtTrig] connector. For more information see the Rigols user manual page 7-6.

source_burst_period

$rigol->source_burst_period(value => 0.00001);

Defined as the time from the beginning of the N cycle burst to the beginning of the next burst. Only for N cycle burst in internal trigger mode.

source_function_shape/source_function_shape_query

$rigol->source_function_shape(value => 'SIN');
say $rigol->source_function_shape_query();

Allowed values: SIN, SQU, RAMP, PULSE, NOISE, USER, DC, SINC, EXPR, EXPF, CARD, GAUS, HAV, LOR, ARBPULSE, DUA.

source_function_ramp_symmetry/source_function_ramp_symmetry_query

$rigol->source_function_ramp_symmetry(value => 100);
say $rigol->source_function_ramp_symmetry_query();

source_period_fixed/source_period_fixed_query

$rigol->source_period_fixed(value => 1e-3);
say $rigol->source_period_fixed_query();

trace_data_data

my $values = [-0.6,-0.5,-0.4,-0.3,-0.2,-0.1,0,0.1,0.2,0.3,0.4,0.5,0.6];
$rigol->trace_data_data(data => $values);

trace_data_value/trace_data_value_query

$rigol->trace_data_value(point => 2, data => 8192);

Modify the second point to the decimal number 8192.

$rigol->trace_data_value_query(point => 2);

trace_data_points/trace_data_points_query

$rigol->trace_data_points(value => 3);
say $rigol->trace_data_points_query();

trace_data_points_interpolate/trace_data_points_interpolate_query

$rigol->trace_data_points_interpolate(value => 'LIN');
say $rigol->trace_data_points_interpolate_query();

Allowed values: LIN, SINC, OFF.

trace_data_dac

$rigol->trace_data_dac(value => '16383,8192,0,0,8192,8192,6345,0');

Input a string of comma-seperated integers ranging from 0 to 16383 (14Bit). If there are less than 16384 data points given, the Rigol will automatically interpolate.

COPYRIGHT AND LICENSE

This software is copyright (c) 2022 by the Lab::Measurement team; in detail:

Copyright 2020       Simon Reinhardt
          2021       Andreas K. Huettel, Fabian Weinelt, Simon Reinhardt
          2022       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.