The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Lab::Moose::Instrument::ZI_MFLI - Zurich Instruments MFLI Lock-in Amplifier

VERSION

version 3.740

SYNOPSIS

 use Lab::Moose;

 my $mfli = instrument(
     type => 'ZI_MFLI',
     connection_type => 'Zhinst',
     oscillator => 1, # 0 is default
     connection_options => {
         host => '132.188.12.13',
         port => 8004, # Note: The HF2LI uses port 8005.
     });

 $mfli->set_frequency(value => 10000);

 # Set time constants of first two demodulators to 0.5 sec:
 $mfli->set_tc(demod => 0, value => 0.5);
 $mfli->set_tc(demod => 1, value => 0.5);

 # Read out demodulators:
 my $xy_0 = $mfli->get_xy(demod => 0);
 my $xy_1 = $mfli->get_xy(demod => 1);
 say "x_0, y_0: ", $xy_0->{x}, ", ", $xy_0->{y};

METHODS

If the MFLI has the Impedance Analyzer option, calling some of the following setter options might be without effect. E.g. if the Bandwith Control option of the Impedance Analyzer module is set, manipulating the time constant with set_tc will not work.

get_frequency

 # Get oscillator frequency of default oscillator.
 my $freq = $mfli->get_frequency();


 my $freq = $mfli->get_frequency(oscillator => ...);

get_frq

Alias for "get_frequency".

set_frequency

 $mfli->set_frequency(value => 10000);

Set oscillator frequency.

set_frq

Alias for "set_frequency".

get_voltage_sens

 my $sens = $mfli->get_voltage_sens(sigin => 0);

Get sensitivity (range) of voltage input.

set_voltage_sens

 $mfli->set_voltage_sens(value => 1, sigin => 0);

Set sensitivity (range) of voltage input.

set_sigin_diff, set_sigin_ac, set_sigin_imp50, set_sigin_float, set_sigin_autorange, set_sigin_on

These all take either 0 or 1 as value:

 $mfli->set_sigin_ac(sigin => 0, value => 0); # No AC coupling for first input
 $mfli->set_sigin_imp50(sigin => 0, value => 1); # Use 50 Ohm input impedance for first input

get_sigin_diff, get_sigin_ac, get_sigin_imp50, get_sigin_float, get_sigin_autorange, get_sigin_on

These all return either 0 or 1 as value:

 say $mfli->get_sigin_ac(sigin => 0); # Does the first input use AC coupling?
 $mfli->get_sigin_imp50(sigin => 0); # Is the impedance of the first input 50 Ohms?

get_current_sens

 my $sens = $mfli->get_current_sens();

Get sensitivity (range) of current input.

set_current_sens

 $mfli->set_current_sens(value => 100e-6);

Set sensitivity (range) of current input.

get_amplitude_range

 my $amplitude_range = $mfli->get_amplitude_range();

Get range of voltage output.

set_amplitude_range

 $mfli->set_amplitude_range(value => 1);

Set amplitude of voltage output.

set_output_status

 $mfli->set_output_status(value => 1); # Enable output
 $mfli->set_output_status(value => 0); # Disable output

get_offset_voltage

 my $offset = $mfli->get_offset_voltage();

Get DC offset.

set_offset_voltage

 $mfli->set_offset_voltage(value => 1e-3);

Set DC offset.

set_offset_status

 $mfli->set_offset_status(value => 1); # Enable offset voltage
 $mfli->set_offset_status(value => 0); # Disable offset voltage

set_input/get_input

 $mfli->set_input(demod => 0, value => 'CurrIn1');
 my $signal = $mfli->get_input(demod => 0);

Valid inputs: currin1, trigger1, trigger2, auxout1, auxout2, auxout3, auxout4, auxin1, auxin2, constant_input

t

get_phase

 my $phase = $mfli->get_phase(demod => 0);

Get demodulator phase shift.

set_phase

 $mfli->set_phase(demod => 0, value => 10);

Set demodulator phase.

get_tc

 my $tc = $mfli->get_tc(demod => 0);

Get demodulator time constant.

set_tc

 $mfli->set_tc(demod => 0, value => 0.5);

Set demodulator time constant.

get_order

 my $order = $mfli->get_order(demod => 0);

Get demodulator filter order.

set_order

 $mfli->set_order(demod => 0, order => 4);

Set demodulator filter order.

get_amplitude

 # set amplitude for default oscillator
 my $amplitude = $mfli->get_amplitude(demod => ...);

Get peak amplitude of voltage output.

set_amplitude

 $mfli->set_amplitude(value => ..., demod => ...);

Set peak amplitude of voltage output.

get_amplitude_rms/set_amplitude_rms

Get/Set root mean square value of amplitude. These are wrappers around get_amplitude/set_amplitude and divide/multiply the peak amplitude with sqrt(2).

get_xy

 my $xy_0 = $mfli->get_xy(demod => 0);
 my $xy_1 = $mfli->get_xy(demod => 1);
 
 printf("x: %g, y: %g\n", $xy_0->{x}, $xy_0->{y});

Get demodulator X and Y output measurement values.

COPYRIGHT AND LICENSE

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

  Copyright 2017       Andreas K. Huettel, Simon Reinhardt
            2019       Simon Reinhardt
            2020       Andreas K. Huettel, 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.