6.20 Microwave Attenuator Functions
A module for a single computer controllable microwave attenuator exists:
-
hjs_attenuator
Stepper motor controlled attenuator, home-built in the group of the group of H.-J. Steinhoff, Osnabrück
To use the module in an experiment put its name into the DEVICES
section of the EDL
script.
To load the device module a default calibration file is required that states which attenuation gets set for the settings of the stepper motor. The name of the file can be set in the configuration file for the module.
List of microwave attenuator functions:
- `mw_attenuator_name()'
- `mw_attenuator_load_calibration()'
- `mw_attenuator_initial_attenuation()'
- `mw_attenuator_attenuation()'
Descriptions of microwave attenuator functions:
- `mw_attenuator_name()'
Returns a string with the name of the power supply being used.
- `mw_attenuator_load_calibration()'
This function can be used to load a calibration table file different from the one read in when the module is loaded. It expects a single argument, a (string) variable with the name of the table file. If no argument is given a default table file is reloaded (typically this is `/usr/local/lib/fsc2/hjs_attenuator.calib', but this may depend on the installation of
fsc2
).If this function is used it must be called before the functions mw_attenuator_initial_attenuation() or mw_attenuator_attenuation() are invoked. Once an attenuation has been set calibrations can't be loaded in anymore.
The calibration file must consist of pairs of entries, an attenuation (in dB) and a stepper motor position. Attenuations values may be followed by an unit of
dB
ordB
. The attenuation entries in the file don't have to be sorted in any way and don't have to be equidistant. The only requirement is that the stepper motor settings are a monotonuously decreasing function of the attenuation.The items in the table file can be separated by spaces, commas, semicolons, colons, tabs or any combination of these characters (a unit will also work as a separator). Thus all the following entries would be valid:
1.2 dB 2135 1.4, 2087 10.7 db786
Blank lines don't matter. Finally, all lines starting with a hash character, `
#
', are treated as comments.If an attenuation is used that isn't in the table read in from the file the stepper motor setting to be used is linearly interpolated from the next neighboring values. as long as the attenuation isn't smaller or larger than the minimum or maximum attenuation in the table.
The function can only be used in the
PREPARATIONS
section of anEDL
script.- `mw_attenuator_initial_attenuation()'
The module has no way to find out to find out the setting of the attenuation at the start of the experiment but this information is obviously required to change the attenuation to a new value. Thus this function must be called before setting a new attenuation. It expects a single argument, the current attenuation setting, which has to be within the range of attenuations covered by the calibration file. The function may not be called again (until a new experiment is started).
- `mw_attenuator_attenuation()'
Thsi function can be used to query the current attenuation or set a new one. If called with no argument it returns the currently attenuation. If it is called with an argument the attenuation is set to this new value. The new value has to be within the range of attenuations covered by the calibration file either read in when the module was loaded or by a later invocation of the function mw_attenuator_load_calibration(). Attenuation values within this range but not listed in the table are handled by linear interpolation of the nearest neighboring values.
- Please note:
The function mw_attenuator_initial_attenuation() must be called before the first invocation of this function to make the module aware about the setting of the attenuation when the experiment was started.
The function can only be used in the
EXPERIMENT
section of anEDL
script.
This document was generated by Jens Thoms Toerring on September 6, 2017 using texi2html 1.82.