NAME
Lab::Instrument::Source - Base class for voltage source instruments
SYNOPSIS
DESCRIPTION
This class implements a general voltage source. It is meant to be inherited by instrument classes (virtual instruments), that implement real voltage sources (e.g. the Lab::Instrument::Yokogawa7651 class).
The class provides a unified user interface for those virtual voltage sources to support the exchangeability of instruments.
Additionally, this class provides a safety mechanism called gate_protect
to protect delicate samples. It includes automatic limitations of sweep rates, voltage step sizes, minimal and maximal voltages.
CONSTRUCTORS
$self=new Lab::Instrument::SafeSource(\%default_config,\%config);
The constructor will only be used by instrument driver that inherit this class, not by the user.
METHODS
configure
$self->configure(\%config);
Supported configure options are all related to the included safety mechanism:
- gate_protect
- gp_max_volt_per_second
- gp_max_volt_per_step
- gp_max_step_per_second
- gp_min_volt
- gp_max_volt
set_voltage
$new_volt=$self->set_voltage($voltage);
Sets the output to $voltage (in Volt). If the configure option gate_protect
is set to a true value, the safety mechanism takes into account the gp_max_volt_per_step
, gp_max_volt_per_second
etc. settings, by employing the sweep_to_voltage() method.
Returns the actually set output voltage. This can be different from $voltage
, due to the gp_max_volt
, gp_min_volt
settings.
step_to_voltage
$new_volt=$self->step_to_voltage($voltage);
Makes one safe step in direction to $voltage
. The output voltage is not changed by more than gp_max_volt_per_step
. Before the voltage is changed, the methods waits if not enough times has passed since the last voltage change. For step voltage and waiting time calculation, the larger of gp_max_volt_per_second
or gp_max_step_per_second
is ignored (see code).
Returns the actually set output voltage. This can be different from $voltage
, due to the gp_max_volt
, gp_min_volt
settings.
sweep_to_voltage
$new_volt=$self->sweep_to_voltage($voltage);
This method sweeps the output voltage to the desired value and only returns then. Uses the "step_to_voltage" method internally, so all discussions of config options from there apply too.
Returns the actually set output voltage. This can be different from $voltage
, due to the gp_max_volt
, gp_min_volt
settings.
CAVEATS/BUGS
Probably many.
SEE ALSO
AUTHOR/COPYRIGHT
This is $Id: Source.pm 268 2005-12-11 02:41:24Z schroeer $
Copyright 2004 Daniel Schröer (http://www.danielschroeer.de)
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 260:
Non-ASCII character seen before =encoding in 'Schröer'. Assuming CP1252