6.23 Powermeter Functions
A single module for a power/energy meter exists:
-
gentec_maestro
Gentec Maestro power/energy meter
To use the module in an experiment put its name into the DEVICES
section of the EDL
script.
List of powermeter functions:
- `powermeter_name()'
- `powermeter_detector_name()'
- `powermeter_scale()'
- `powermeter_get_scale_limits()'
- `powermeter_autoscale()'
- `powermeter_trigger_level()'
- `powermeter_wavelength()'
- `powermeter_attenuator()'
- `powermeter_get_wavelength_limits()'
- `powermeter_get_reading()'
- `powermeter_anticipation()'
- `powermeter_zero_offset()'
- `powermeter_multiplier()'
- `powermeter_offset()'
- `powermeter_get_laser_repetition_frequency()'
- `powermeter_analog_output()'
- `powermeter_statistics()'
Descriptions of powermeter functions:
- `powermeter_name()'
Returns a string with the name of the powermeter being used.
- `powermeter_detector_name()'
Returns a string with the name of the detector connected to the device (the correct name can only be returned once the experiment has been started, during the test run
"QE12LP-S-MB"
is always returned).- `powermeter_scale()'
Allows to query or set the scale (or range) in
J
orW
. If called with no argument the cuurent scale setting is returned. If called with a valid scale setting the device gets switched to it. Note that the range of possible scale settings depends on the connected detector, the limits for the detector can be determined by callingpowermeter_get_scale_limits()
. If called with a scale value that's within these limits but not fitting any of the possible values the next higer scale is set and a warning is printed out. Note that setting a scale will unset autoscaling,- `powermeter_get_scale_limits()'
This function takes no arguments and returns an array with two elements, the first one being the minimum scale setting for the currently connected connector (in
J
orW
), and the second being the upper limit.- `powermeter_autoscale()'
allows to query if autoscaling is on or off or switch it on or off. If called with no argument it returns
1
if autoscaling is on, otherwise0
. If called with a boolean argument, either the strings"OFF"
or"ON
or the0
or a non-zero value, autoscaling is switched on or off accordingly.- `powermeter_trigger_level()'
This function is used to query or set the trigger level.Trigger levels can be between
0.1%
and99.9%
. If the function is called without an argument it returns the currently used trigger level (in percent). If called with an argument the trigger level is set to that value (which should be a number between0.1
and99.9
- values between0
and100
get accepted and automatically corrected to either0.1
or99.9
, values outside this range result in an error).- `powermeter_wavelength()'
Allows to query or set the wavelength the device uses to apply corrections to the readings, taking into account wavelength-dependencies of the detector. Calling he function without an argument returns the currently used wavelength (in
m
). Calling it wit an argument (the wavelength inm
) sets a new wavelength. The range of wavelengths that can be set depends on the detector in use and also if an attenuator (if available) is on or off. To find out about the allowed range of wavelengths use the functionpowermeter_get_wavelength_limits()
.- `powermeter_attenuator()'
This function allows to query if there's a attenuator available and if its on or off or, if an attenuator is available, to switch it on or off. If called without an argument the function returns
-1
if no attenuator is available, otherwise0
or1
, indicating that it's on or off. If an attenuator is available it can be also called with a boolean argument, either the strings"OFF"
or"ON
or0
or a non-zero value, to switch the attenuator off or on. Trying to switch the attenuator on when none is available will result in the experiment being aborted.Keep in mind that the range for wavelength settings may depend on the attenuator being on or off. Thus switching the attenuator on or off while a wavelength is set which is not allowed for the requested new state of the attenuator will result in an error. See the function
powermeter_get_wavelength_limits()
for finding out which wavelength ranges are allowed with the attenuator on or off.- `powermeter_get_wavelength_limits()'
Function allows to determine the limits of the wavelengths that can be set for the currently connected detector. If called with no argument or a false boolean argument (
"OFF"
or0
) an array with two elements is returned, with the first element holding the lower wavelength limit (inm
) and the second the upper limit. If called with a true boolean argument ("ON"
or a non-zero value) the limits with the attenuator switched on are returned in the same way. Note that the function will produce an error if the limits with the attenutor switched on are requested but no attenutator is available.- `powermeter_get_reading()'
If called with no argument the function immediately returns the current reading of the powermeter as shown on the display. Note that calling this function at a higher rate than new data become available will result in the same data value getting returned more than once.
To wait for a newly measured data value call the function with a floating point argument. This will instruct the function to inquire from the device if new data are available and wait until one becomes available. If the value passed to the function is
0
or negative, the function will only return once a new value has become available. If the value is positive and non-zero it interpreted as an upper limit (in seconds) the function is to wait for a new data point - when this limit is exeeded the function aborts the experiment. Note though that a check for new data being available requires (with USB/serial port communication) in the order of 10 ms.- `powermeter_anticipation()'
Function allows to query if "anticipation processing" is on or off or to switch it on or off. If called with no argument the function returns
0
or1
depending on anticipation being switched off or on. If called with a boolean argument, either the strings"OFF"
or"ON
or the0
or a non-zero value, anticipation processing is switched off or on.- `powermeter_zero_offset()'
Allows to query if a zero offset is being used or to switch if it on or off. If called with no argument the function return
1
or0
, depending in a zer-offset being aplied or not. If called with a true boolean argument (i.e. a non-zero-value or"ON"
, the device is instructed to automatically subtract the currently measured value from all further measurements. Calling the function with a false boolean argument (0
or"OFF"
switches this preprocessing step off.- `powermeter_multiplier()'
Allows to qery or set a multiplier that is applied to each measured value. If called without an argument the function returns the currently set multiplier, if called with a (numeric) value this is set as the new multiplier.
- `powermeter_offset()'
Allows to qery or set an offset that is added (after multiplying it with the multiplier to be queried r set with
powermeter_multiplier()
) to each measured value. If called without an argument the function returns the currently set offset, if called with a (numeric) value this is set as the new offset.- `powermeter_get_laser_repetition_frequency()'
This function accepts no arguments and returns the repetition rate of the laser (in
Hz
.- `powermeter_analog_output()'
The device has an analog output for the measured power or energy whcih can be enabled or disabled. This function allows to query if analog output is enabled or disabled and to switch it on or off. If called with no argument the function returns
1
or0
, depending on the analog outpu being enabled or not. Calling it with a boolean argument, either the strings"OFF"
or"ON
or the0
or a non-zero value, disables or enables the analog output.- `powermeter_statistics()'
The device can calculate statisitcs on the pulses it measured. This function, which accepts no arguments, returns these statistics as a floating point array with 12 elements. The elements (as given by their indices into the returned array) have the following meaning:
-
1
Current value
-
2
Maximum
-
3
Minimum
-
4
Average
-
5
Standard Deviation
-
6
RMS stability
-
7
PTP stability
-
8
Pulse Number
-
9
Total Pulses
-
10
Average Power
-
11
Rep Rate
-
12
Uncorrected Value
-
This document was generated by Jens Thoms Toerring on September 6, 2017 using texi2html 1.82.