Back: 6.3 Handling of several instances of fsc2 Forward: 6.5 Gaussmeter Functions   FastBack: 6. Device Functions Up: 6. Device Functions FastForward: 7. Other Modules         Top: fsc2 Contents: Table of Contents Index: Index About: About This Document

6.4 Magnet Functions

The following modules for control the field of a magnet currently exist:

aeg_x_band

Home-built controller for AEG magnet, X-band, Berlin

aeg_s_band

Home-built controller for AEG magnet, S-band

bh15_fc

Bruker BF15 Field Controller

er032m

Bruker ER032M Field Controller

keithley228a

Keithley 228A, W-band magnet sweep power supply, Berlin

ips20_4

Oxford Instruments IPS20_4, 360 GHz spectrometer, Berlin magnet sweep power supply, Berlin

ips120_10

Oxford Instruments IPS120_10, J-band spectrometer, Leiden

ips120_10_mod

Oxford Instruments IPS120_10 with modification for additional modulation input, W-band spectrometer, Leiden

s_band_magnet_broad

Home-built controller using a DAC for broad field range, S-band magnet, Frankfurt/Main

s_band_magnet_narrow

Home-built controller using a DAC for narrow field range, S-band magnet. Frankfurt/Main

hjs_sfc

Pseudo-device for magnet control (without field measurement), Osnabrück

hjs_fc

Pseudo-device for magnet control, Osnabrück

fsps25

Home-built Sweep Power Supply, Frankfurt/Main

To use a module in an experiment put its name into the DEVICES section of the EDL script.

Since it is not possible for the AEG magnets to measure the field using just the magnet power supply it is necessary also to specify a gaussmeter to enable fsc2 to control the magnet. The module name of the gaussmeter has to appear before the magnet module entry in the DEVICES section. See the next section for the implemented gaussmeter and the related functions.

All magnet power supplies (except the ones used with the Oxford Instruments magnets) don't do continuous sweeps but the field current is stepped. Thus many of the functions discussed in the following don't expect sweep rates but field (or current, see below) step sizes for defining a sweep. The only exception are the power supplies for the Oxford magnets, here only continuous sweeps can be done and sweep rates must be specified.

If an AEG magnet module is listed in the DEVICES section the program will try to calibrate the field sweep parameters at the start of the experiment, i.e. it will sweep the field up and down for some time, so please be patient. Also see below on how to reduce the amount of time spent for field calibration. If during the calibration procedure the program finds that the sweep speed isn't set to the highest speed it will stop and ask you to do so. When running in batch mode having the sweep speed not set to the highest possible one this will make fsc2 skip the EDL script.

The Keithley 228A power supply is used for the sweep coil of the Berlin W-band magnet. Because there is no well-defined relationship between the current produced by the power supply and the magnetic field and because the magnetic field can't be measured directly during measurements, for this device the following functions expect arguments in current units (i.e. Ampere) instead of field units (i.e. Gauss) as for the other devices.

Similarly, the Frankfurt Sweep Power Supply controls the extra current through a sweep coil of a superconducting magnet. And for the same reason as for the Keithley 228A power supply the functions expect their arguments in currents and not field units.

It's similar for the magnet used for the 360 GHz spectrometer: there's also no fixed relation between the current and the field, so also for this module all values have to be given in current instead of field units.

Because the normal current resolution of the Keithley power supply is not sufficient an additional device is needed supplying DC voltages in the range between -10 V and +10 V to the modulation input of the power supply. Currently the DAC ports of one of the Stanford Research lock-in amplifiers (SR510, sr530, SR810 or SR830) are used for this purpose. Which of the lock-ins is used can be specified during compilation by an entry in the configuration file for the Keithley driver, usually it's the SR510 lock-in amplifier. Alternatively, if no lock-in has been set in the configuration file the Keithley 228A module will assume that the very first lock-in listed in the devices section is to be used.

In the configuration file it also can be defined which of the DAC ports of the lock-in amplifiers is to be used. If not defined, port 6 will be used for the SR510 and SR530 and port 4 for the SR810 and SR830 lock-in amplifier. But there exists also a function to directly select the DAC port to be used, see below.

Both the modules for the controlling the magnets in the group of H.-J. Steinhoff in Osnabrueck are not for real devices but instead they use further modules to achieve field control. The first of the two modules can set the field only according to a previous calibration because it does not have any access to a gaussmeter while the second uses the Bruker BNM12 gaussmeter. Both modules require the DA converter of the home-built DA and AD converter (module hjs_daadc, see below). The hjs_fc module also depends on the module for the the Bruker BNM12 gaussmeter and the Wasco WITIO-48 DIO card, also see below) for reading values from the Bruker BNM12 gaussmeter. These required modules have to be listed before the module itself, so in the DEVICES section they would appear as

 
hjs_daadc;
hjs_sfc;

and

 
hjs_daadc;
witio_48;
bnm12;
hjs_fc;

List of magnet functions:

`magnet_name()'
`magnet_setup()'
`magnet_fast_init()'
`magnet_field()'
`magnet_field_step_size()'
`magnet_sweep_up()'
`magnet_sweep_down()'
`magnet_reset_field()'
`magnet_use_correction()'
`magnet_use_dac_port()'
`magnet_sweep()'
`magnet_sweep_rate()'
`magnet_goto_field_on_end()'
`magnet_B0()'
`magnet_slope()'
`magnet_calibration_file()'
`set_field() (deprecated)'
`get_field() (deprecated)'
`sweep_up() (deprecated)'
`sweep_down() (deprecated)'
`reset_field() (deprecated)'
`magnet_max_current()'
`magnet_max_sweep_rate()'
`magnet_act_current()'
`magnet_coil_current()'
`magnet_heater_state()'
`magnet_request_expert_mode()'
`magnet_shutdown()'

Descriptions of magnet functions:

`magnet_name()'

Returns a string with the name of the magnet that is being used.

`magnet_setup()'

The function can be called in the PREPARATIONS section to set the start field and the field step size used in sweeps. The function expects two floating point parameters, the start field or current, e.g. 0.345 T, and, in most cases, the step size, e.g. 0.35 G.

Use current instead of field units for the Keithley 228A power supply (keithley228a). This function does not exist for the Frankfurt Sweep Power supply (fsps25).

Because the Oxford Instruments IPS20-4 magnet sweep power supply does continuous sweeps (instead of simulating a sweep by stepping the current) the second argument isn't the sweep step size but must be the sweep rate in units of A/s.

Similarly, for the Oxford Instruments IPS120-10 power supply the second argument is the sweep rate in G/s.

For the Bruker BH15 and Bruker ER032M field controllers for some combinations of the start field and field step size deviations between the requested field and the real field may result of up to 25 mG. If the maximum field deviation was larger than 5 mG at the end of the test run as well as the experiment the maximum field deviation is printed out. To minimize these deviations use a start field that is a multiple of 50 mG and avoid sweeps with more than about 2000 steps away from the start field.

Please note:

With at least with some of the drivers it is not possible to specify a negative field step size or sweep rate. Therefore it is probably prudent never to try this and use in all cases the functions for sweeping down if a sweep to lower field values is required.

`magnet_fast_init()'

Calling this functions in the PREPARATIONS section will shorten the time used for the calibration of the field sweep at the start of the experiment for the AEG magnet power supplies. Unfortunately, this also reduces the precision of the field sweep. Whenever an experiment is restarted (i.e. if no new EDL file has been loaded in between) this shortened calibration is done anyways to check that the parameters didn't change significantly since the last run.

This function does not exist for the modules hjs_sfc, hjs_fc and fsps25.

`magnet_field()'

This functions allows to either query the current magnetic field or set a new field value.

If called with no arguments it returns the current magnetic field. For the AEG magnets this is only a convenience function that just calls a function supplied by the gaussmeter used together with the magnet power supply to determine the current field. In contrast, for the Bruker BH15 and Bruker ER032M field controllers this function returns the current field setting in Gauss. For both the Berlin W-band magnet (keithley228a) and the 360 GHz spectrometer magnet (ips20_4) the actual current through the magnets sweep coil is returned instead of the field.

If called with arguments the function expects a floating point argument for the field value and will set the magnetic field to this value. Please note that for the Keithley 228A power supply, the Oxford Instruments IPS20-4 and the Frankfurt Sweep Power Supply a current value instead of a field must be specified.

The function then returns the new value of the field (which, in some cases might differ a bit from the requested value due to the properties of the device, i.e. restrictions of the resolution).

For the AEG magnets and the hjs_fc module the function also accepts a second optional parameter, the maximum acceptable deviation of the field from the value to be set. For example by the call

 
set_field( 3421.5 G, 0.2 G );

the field will be set to a value between 3421.3 G and 3421.7 G.

If in the case of AEG magnets (or the hjs_fc module) this second parameter is missing the precision of the gaussmeter used for measuring the field is used. If the maximum deviation parameter is smaller than the precision of the gaussmeter the precision of the gaussmeter is used instead. The function can only be called in the EXPERIMENT section.

For both the Oxford Instruments magnet sweep power supplies (ips20_4 and ips120_10) this function will automatically stop a running sweep.

For the Bruker BH15 and Bruker ER032M field controllers setting a field with this function while also having initialized the magnet using magnet_setup() may result in deviations between the requested field and the real field of up to 25 mG. If the maximum field deviation was larger than 5 mG at the end of the test run as well as the experiment the maximum field deviation is printed out.

For the module bh15_fc requesting the current value of the field is only possible when either the function magnet_setup() has been called or a field already as been set.

The function can only be used in the EXPERIMENT section. .

`magnet_field_step_size()'

This function exists for the modules aeg_s_band, aeg_x_band, bh15_fc, er032m, ips120_10 and ips120_10_mod. It can be used from all sections of an EDL script except for aeg_s_band and aeg_x_band, where it's use is restricted to the EXPERIMENT section.

The function allows to determine the exact value of field steps that can be done when the field resolution is taken into account. If called with no argument it returns the minimum possible field step size. If, on the other hand, called with a proposed (positive) field step size it returns the nearest possible field step size.

`magnet_sweep_up()'

The function can be called in the EXPERIMENT section, but only if the function magnet_setup() (see above) has been called before. It doesn't take an argument and will sweep up the magnet by the field step size value set in the magnet_setup() function. For magnets where the field is controlled via a gaussmeter the actual size of the step is not tested using the gaussmeter and can thus faster than e.g. magnet_field().

The function returns the new field value.

For the AEG magnets the precision of the field sweep depends on the step size. While the precision is usually quite good for step sizes of up to 1 G, with much larger step sizes it may deteriorate quite significantly. It sometimes helps to add a short waiting time (use function wait()) after a sweep step to allow the field to settle at the new point. On the other hand, it then might be faster (and more reliable) not to use the sweep functions at all but the magnet_field() function (which always checks and if necessary re-adjusts the field if necessray) in these cases instead.

This function is not available for the Oxford Instruments power supplies (modules ips20_4 and ips120_10). Use the function magnet_sweep() for these instead. It also doesn't exist for the Frankfurt Sweep Power Suppply (fsps25).

The function can only be called in the EXPERIMENT section.

`magnet_sweep_down()'

This is the exact analog to the function magnet_sweep_up() but will sweep the magnetic field down instead of up by the field step size defined in magnet_setup().

The function returns the new field value.

This function is not available for the Oxford Instruments magnet power supplies (modules ips20_4 and ips120_10). Use the function magnet_sweep() for these instead. It also doesn't exist for the Frankfurt Sweep Power Suppply (fsps25).

`magnet_reset_field()'

This function resets the magnetic field to the start field value defined in a previous call of the function magnet_setup().

The function returns the new field value.

Please note that for the Oxford Instruments magnet power supplies (ips20_4 and ips120_10) calling this function also automatically stops a running sweep.

This function doesn't exist for the Frankfurt Sweep Power Suppply (fsps25).

The function can only be used in the EXPERIMENT section.

`magnet_use_correction()'

This function is only defined for the Keithley 228A power supply and accepts not more than one argument. If it is called with no argument or a non-zero number or the string "ON" corrections are applied to reduce the effects of certain inaccuracies of the power supply. If called with either an argument of 0 or a string "OFF" the use of these corrections is switched off. Per default no corrections are used.

`magnet_use_dac_port()'

This function is only defined for the Keithley 228A power supply and tells the driver which of the DAC ports of the lock-in amplifier is connected (following a voltage divider) to the modulation input of the power supply. The function expects a single integer value, the DAC port number to be used - for the SR510 and SR530 this can be 5 or 6, while for the SR810 and SR830 all values in the range between 1 and 4 may be used.

The function can only be used in the PREPARATIONS section.

`magnet_sweep()'

This function is only available for the Oxford Instruments magnet sweep power supplies (modules ips20_4 and ips120_10) to control their continuous sweep. It can be called with either an integer argument of 1 to start a sweep to higher field and current values, an argument of -1 to start a downward sweep or, finally, an argument of 0 to stop a running sweep.

To be able to do a sweep a sweep rate must have been set. This can be either done by a call of the function magnet_setup() within the PREPARATIONS section or by calling magnet_sweep_rate().

The function can also be called without an argument, in which case either 1, -1 or 0 is returned if the magnet is sweeping up or down or the sweep is stopped.

Sweeps will be automatically stopped when a current limit is reached. By calling this function without an argument you may check if this has happened.

The function can only be used in the EXPERIMENT section.

`magnet_sweep_rate()'

This function is only available for the Oxford Instruments magnet power supplies (modules ips20_4 and ips120_10) to set or query the sweep rate for continuous sweeps. If no argument is passed to the function the currently set sweep rate is returned. Otherwise a (positive) sweep rate in units of either A/s (for the IPS20-4) or G/s (for the IPS120_19) must be passed to the function.

This function also exists for the Frankfurt Sweep Power Suppply (fsps25) but has a different meaning. For this device it sets or returns the sweep speed that is used when changing the sweep coil current on a request to set a new current (via the magnet_field() function.

`magnet_goto_field_on_end()'

This function is only available for the Oxford Instruments magnet power supplies (modules ips20_4 and ips120_10) and the S-band field modules s_band_magnet_narrow and s_band_magnet_broad. It allows to set a target current or field that the magnet will be swept to after the experiment has ended (per default the magnet would stay at the last field position for the Oxford Instruments magnet supplies or move to the middle of the allowed field range for the S-band drivers). This function can be called in the PREPARATION as well the EXPERIMENT section and returns for the Oxford IPS20-4 the target current and for the three other modules the target field the magnet will sweept to after the end of the experiment. If called more than once the current or field of the last call will be used.

`magnet_B0()'

This function is only available for the module hjs_sfc. For this module the magnet is controlled via the output voltage of a DAC. The function allows to tell the module about the field at an output voltage of 0 V. The value can't be changed anymore after it has been used (e.g. to calculate an output voltage required to set a certain field).

When called without an argument the current value of what the module assumes to be the field at a DAC output voltage of 0 V.

The function can only be used in the PREPARATIONS section.

`magnet_slope()'

This function is only available for the module hjs_sfc. For this module the magnet is controlled via the output voltage of a DAC. The function allows to tell the module about the field change (in Gauss) for an output voltage change of 1 V. The value can't be changed anymore after the field-to-voltage change ratio has been used (e.g. to calculate an output voltage required to set a certain field).

When called without an argument the current value of what the module assumes to be the field change for a DAC output voltage change of 1 V.

The function can only be used in the PREPARATIONS section.

`magnet_calibration_file()'

This function is only available for the modules hjs_sfc and hjs_fc. For both modules the magnet is controlled via the output voltage of a DAC (currently only module hjs_daadc is supported).

For the hjs_sfc module two data must be read from a calibration file, the field values for the minumum and the maximum DAC output voltage. Normally the name of the calibration file is taken from the configuration file for the module (if it isn't given with an absolute path the default directory where modules etc. get installed, usually `/usr/local/lib/fsc2', is prepended to the file name). Using this function, a different calibration file can be used. The function expects the name of an existent, readable file (if given without an absolute path it's looked up relative to the current working directory, i.e. the directory fsc2 was started from). This file must contain two values, first the field (in Gauss) at the minimum DAC output voltage and second the field at the maximum DAC output voltage. The file may contain C and C++ style comments. Also lines starting with a hash character ('#') are taken to be comments.

The module hjs_fc per default tries to determine the data described above by doing a measurement of the minimum and maximum field position at the start of each experiment. But if in the PREPARATIONS section magnet_calibration_file() is invoked the data from the configuration file are used instead, thus avoiding the lengthy measurement.

The function can only be used in the PREPARATIONS section.

`set_field()'

This function has been deprecated and may not be available, please use magnet_field() instead.

`get_field()'

This function is deprecated and may not be available, please use magnet_field() instead.

`sweep_up()'

This function is deprecated and may not be available, please use magnet_sweep_up() instead.

`sweep_down()'

This function is deprecated and may not be available, please use magnet_sweep_down() instead.

`reset_field()'

This function is deprecated, please use magnet_reset_field() instead.

`magnet_max_current()'

This function only exists for the Frankfurt Sweep Power Supply (fsps25). It allows to set or obtain the maximum current that can be set for the device via the magnet_field() function. The absolute upper limit that can be set is 25 A, but a setting in the configuration file allows to reduce this maximum value further.

`magnet_max_sweep_rate()'

This function only exists for the Frankfurt Sweep Power Supply (fsps25). It allows to set or obtain the maximum sweep rate that can be set for the device when it changes the sweep current on a request via e.g. the magnet_field() function. The absolute upper limit that can be set is 33.333 mA/s.

`magnet_act_current()'

This function only exists for the Frankfurt Sweep Power Supply (fsps25). It can be used to set or query the current the device outputs. This current is not necessarily identical to the current through the magnets sweep coil if the heater switch connecting the power supply to the sweep coil is off.

`magnet_coil_current()'

This function only exists for the Frankfurt Sweep Power Supply (fsps25). It takes no argument and returns the current through the sweep coil. If the heater switch connecting the power suppy to the swep coild is off the value returned is the current that was flowing through the sweep coil before the heater switch was switched off the last time (which is stored in non-volatile RAM of the device).

`magnet_heater_state()'

This function only exists for the Frankfurt Sweep Power Supply (fsps25). It determine the state of the heater switch connecting the power supply to the sweep coil. It returns 1 if the switch is closed (i.e. power supply and sweep coil are connected) and 0 otherwise.

The function can also be used to set the state of the heater switch. This should not done as part of any normal procedure (the heater switch will be closed automatically when the experiment starts). Only in case there was a severe error that led to the power supply become disconnected from the sweep coil in an uncontrolled fashion the function may be used to close the switch. In that case utmost care should be taken to insure that the current output by the power supply (set via the function magnet_act_current()) matches the current through the sweep coil! To make closing the heater switch accidentally less likely the function can be called with an argument only if the the function magnet_request_expert_mode() has been called directly before.

`magnet_request_expert_mode()'

This function only exists for the Frankfurt Sweep Power Supply (fsps25). It takes no arguments and must be invoked directly before the function magnet_heater_state() is called with an argument, otherwise the call will fail. This is meant as a protection against accidentally opeing or closing the heater switch connecting the power supply and the sweep coil.

`magnet_shutdown()'

This function only exists for the Frankfurt Sweep Power Supply (fsps25). It takes no arguments and allows to shut down the power supply. This will switch of the heater switch, disconnecting the power supply from the sweep coil, and then reduce the current output by the power supply to 0 A. The function must be called before switching off the power supply.


Back: 6.3 Handling of several instances of fsc2 Forward: 6.5 Gaussmeter Functions   FastBack: 6. Device Functions Up: 6. Device Functions FastForward: 7. Other Modules

This document was generated by Jens Thoms Toerring on September 6, 2017 using texi2html 1.82.