lemAutoRun  1.0
LEM Auto Run Sequence Description

Overview

How to start a LEM Autorun Sequence (LARS)

nemu_main.png
Nemu Experiment - Web Interface

For the moment, there is a very primitive (but simple) user interface for the LEM Autorun Sequence (LARS) foreseen. On the main Nemu Experiment web page, you will find a button called "AutoRun" marked by a red box in the figure above. When pressing it, you will find the LEM Autorun Status web-page which looks like this

nemu_main_autorun.png
LEM Autorun Web-Page

The autorun sequence script has to be saved in the directory /mnt/home/nemu/autoRun. In the field. If the file name's extension is .lar, a high-light plugin for the editor kate is available. This plugin helps to write autorun sequences by high-lighting autorun commands, though it is NOT a syntax are semantic checker!

Lumps and Bumps - How to prevent major traps with the LEM setup

Here some of the major difficulties, concerning lemAutoRun, are described and it is explained how to prevent them.

An autoRun was started, but doesn't execute its first command

In case you have started a run manually, and this run is still active, the autoRun is starting but just waiting (expect the first command is a STOP command see Stop an Ongoing Run and Note of LEM Auto Run User Script Interface) until the current run is stopped.

How to stop an ongoing autoRun, and what are the potential problems arising from stopping it?

To stop an active autoRun see How to start a LEM Autorun Sequence (LARS) Fig. "LEM Autorun Parameter Page". However one has to be aware of the following facts: if the autoRun is stopped during a TEMP command (see Set Sample Temperature (Cryos and Oven)) it might be that the valves BPVX and/or BPVY are closed. Furthermore it might be that the sample HV is set to zero so that is needs to be ramped back by the user.

How to prevent firing the HV interlock while increasing the temperatue?

When increasing the sample temperature with the TEMP command, one needs to be aware of the following problem: while heating, very often the pressure in the sample chamber is increasing. When it is reaching the value of 1e-6mbar, the HV interlock is firing which means that somebody has to reset manually in the area. This pressure can easily being reached while increasing the sample temperature. To prevent this it is wise to use the ramping feature of the TEMP command (see Set Sample Temperature (Cryos and Oven)). Typically a ramping of 1K/min for T<45K, and 2K/min for T>45K is working. This depends not only on the temperature history, but also to some degree on the sample.

LEM Auto Run User Script Interface

The LEM Auto Run User Script Interface consists of a set of simple commands allowing the user to run the LEM experiment for some time, especially during the night. Since the LEM experiment is a rather complicated setup, it should be used circumspectly only. Here the description of the available commands, where the following conventions are used. Anything in squared brackets [] is an option. The syntax is case sensitive.

NOTE:If a run is already underway when starting lemAutoRun, and the first command of the LEM auto run user script is not a STOP command, lemAutoRun will wait until the run is stopped. This is done because it is considered as nonsense to change HV's or temperatures, etc. while a run is underway. Still, the WARMUP command will be executed if the date/time is reached.

Comment

% This is a comment line

Lines starting with the '' character are comment lines which will be ignored. Furthermore empty lines are ignored.

Set Needle Valve of the Sample Cryo Transferline

TFL pos, mode

with

If the mode is set differently than '1', the positional value will be ignored.

Example:
TLF 6.5, 1

Set Sample Temperature (Cryos and Oven)

TEMP T, dT, StabilityTimeout [, Ramp, HeaterRange, P, I, D, Flow]

with

Examples:
TEMP 100, 0.1, 1200
TEMP 100, 0.1, 1200, 2.0
TEMP 100, 0.1, 3600, 0.0, , , , , 3200
TEMP 100, 0.1, 3600, 0.0, , 500, 20, 2, 3200

For details concerning the temperature controller flags see the LakeShore 340 Manual.

Description: The Set Sample Temperature takes care of all those adjustments that have to be made, such as closing the vacuumvalves, switching the high voltage, feeding the LakeShore340 with a new setpoint, adjusting the He-flow via the Bronkhorst flow controller and setting the needlevalve in the transferline. Note that the last two items are only possible for the Konti cryostats. The command must give at least the first three parameters. In that case autorun will try to set the new temperature as quickly as possible. With the parameter Ramp the speed of the heating or cooling can be set. If a reasonable rate is demanded (like 1-2 K/minute) no over- or undershoot will occur. WARINING: do not use large rampings while increasing the temperature: there may be problems with the vacuum and thus the high voltage interlock may switch off.

Comments concerning ramping: the ramping rates should not exceed 5K/min, both for cooling are warming up. If you use ramping for cooling the StabilityTimeout constant should be

StabilityTimeout > 120 (Tstart - Tend) / Ramp.

All further parameters inhibit autoRun's automatic adjustments for that parameter. Use of the these options is at the user's discretion and responsibility.

WARNING: Even though lemAutoRun tries to adjust the He flow as good as it can (assuming a closed bypass, so that the Bronkhorst can work), for the lowest temperatures (T < 7K) it might be that you end up with a slightly too high flow when arriving from high temperature. The reason is that the some parts of the cryo are still cooling down at the beginning leading to an increased He flow. When everything is in dynamic equilibrium, lemAutoRun tries to gradually reduce the flow. This process is sometimes too slow and hence the heater might reach its limit. Therefore one should check these temperature range and, if necessary adjust the flow manually with the Bronkhorst flow meter. It is on the To-Do list to fix this little annoyance but we are not there yet :-(

Note: The LS_HeaterMode (name will be changed soon to LS_ControlMode) setting of the device driver has the following meaning (see also the LakeShore 340 Manual chapter 6 p.6-1, and p. 9-28):

By default the value is set to 2, i.e. the Zone Setting Mode. If you do not understand this parameter, set it to 2 if it is not already set to this value.

If LS_HeaterMode = 2, lemAutoRun will, when starting up, overwrite PID's and the heater range to the ZONE setting values. If the TEMP command is explicitly setting PID's and/or heater range, of course this explicit values will be taken. As long as following up temperatures will stay in the same ZONE this PID's and heater range will be taken, except PID's and heater range will be given in the following up TEMP command!

Oven: The TEMP for the Oven is currently a bit limited. It only accepts the following syntax:

TEMP T, dT, StabilityTimeout

with the temperature given in Kelvin!

Set Sample High Voltage

SAMPLE_HV value

with

Examples:
SAMPLE_HV -7.23

Description: Sets the high voltage of the sample. At the moment it is not foreseen to set the sample guard and grid high voltage.

Set Ring Anode High Voltage

RA_HV left, right[, top, bottom]

Example:
RA_HV 11.2, 10.8, 11.0, 11.0
RA_HV 11.2, 10.8

Description: Sets the high voltage of the ring anode. Left and right are defined in beam propagation direction.

Load and set a HV transport setting file

TRANSPORT_HV hv_setting_file_name

with

Example:
TRANSPORT_HV fug_07-5kv_2-6ug_SRoff_protons.xml

Description: Loads a HV setting file and sets the found values. Currently only FUG's, i.e. transport HV's can be loaded. The command looks, if the setting file is found in the default location.

Switches off all the HV's of a chamber

HV_OFF chamber

with

Example:
HV_OFF SC

Description: switches off the transport and detector HV's of the given chamber.

Open/close BPVX/Y gate valves

BPV(X|Y) open | close | 1 | 0

Examples:
BPVX open
BPVY 1
BPVY close

Description: allows to open/close the BPVX/Y gate valves. The vaccum control units will prevent this command to work if the pressure on one side is too high, e.g. if the sample chamber would be vented.

Set Field of the WEW Magnet with the WEWL Magnet Power Supply

FIELD_WEWL value [G | A]

with

Examples:
FIELD_WEWL 17.35
FIELD_WEWL 100.0 G
FIELD_WEWL 13.0 A

Description: Sets the field of the WEW magnet, using the high-precision, "low-current" WEWL power supply

Set Field of the WEW Magnet with the WEWH Magnet Power Supply

FIELD_WEWH value [G | A]

with

Examples:
FIELD_WEWH 17.35
FIELD_WEWH 1500.0 G
FIELD_WEWH 260.3 A

Description: Sets the field of the WEW magnet, using the "high-current" WEWH power supply

Set Field of the Bpar Magnet with the Danfysik Magnet Power Supply

FIELD_DANFYSIK value [G | A]

with

Examples:
FIELD_DANFYSIK 17.2
FIELD_DANFYSIK 100.0 G
FIELD_DANFYSIK 5.3 A

Description: Sets the current for the Danfysik magnet power supply. At the moment you have to give a current but in the near future this will be changed so that the user will enter a field value.

Set the field of the sample magnet (WEW or Bpar)

FIELD value [G | A]

with

Example:
FIELD 100 G

Note: The WEW magnet can be operated by either the WEWL or WEWH power supply. The current ranges for these power supplies are: WEWL (+-50A) and WEWH (+-600A). The FIELD command will chose which power supply to be used. For up to +-50A WEWL will be chosen, above 50A the WEWH will be used. There is a potential stumbling block here: in a field scan when crossing the 50A boundary, i.e. switching over from WEWL to WEWH, WEWL will be set to zero, the power supply switched off, WEWH switched on and ramped to the needed current. This means if you have something like

FIELD 45.0 A
do something here*
FIELD 55.0 A

what will happen is 45.0A -> 0.0A -> 55.0A. This could potentially spoil your experiment.

Set the Spin Rotator Parameters for a given Spin Angle

SPIN_ROT angle [ndg] | off

with

Both commands include always an intial degauss procedure of the spin rotator magnet. This way, the user doesn't need to think about the history of the spin rotator magnet.

Examples:
% Separator Mode
SPIN_ROT -10
...
SPIN_ROT off

Degauss with Danfysik magnet power supply

DEGAUSS_DANFYSIK

Description: Degauss procedure for the Danfysik magnet power supply. It is first setting -8A, waits 10sec, then set +8A, wait again 10sec, afterward it is cycling the current to -1/2 of its previous value, back and forth. Eventually, if the current value is dropping below 0.1A it will be set to zero.

Degauss the WEW

DEGAUSS_WEW

Description: The degaussing for the WEW (Bperp) setup is doing the following:

  1. shut down the ring anode (RA) high voltages (HV). This is necessary since for B>110 G (>19 A) a Penning trap forms at the RA which is leading to discharges.
  2. do the following current cycle of the WEWH: +600/-40/0A, followed by WEWL:+50/-8/0A.
  3. ramp the RA HV's back to its previous values.

Degauss the sample magnet in place (either WEW or Bpar)

DEGAUSS_MAGNET

Description: Will call the apropriate degauss routine depending on the sample magnet currently in use (either WEW or Bpar). For details see Degauss with Danfysik magnet power supply and Degauss the WEW .

Degauss the Spin Rotator

DEGAUSS_SPIN_ROT

Description: Degauss the Spin Rotator. This is done the following way:

  1. Shut down the spin rotator HV's.
  2. Set current of the spin rotator magnet to 0A, and wait 10sec.
  3. Set current of the spin rotator magnet to +12.0A, and wait 30sec.
  4. Set current of the spin rotator magnet to -1.3A, and wait 30sec.
  5. Set current of the spin rotator magnet to 0A.

Run Title

TITLE string

with

The run title can contain some special tags, in order to extract some useful information directly form the ODB.

Furthermore, the user can define his/her own ODB tags via the autorun command ODB_TAG (see Define an ODB tag for substitution in the run title).

Examples:
TITLE Proximity Al-Nb
TITLE Proximity ODB_SAMPLE
TITLE Proximity ODB_SAMPLE T=ODB_TEMP (K)
TITLE Proximity ODB_SAMPLE T=ODB_TEMP (K), ODB_TRANSP (kV), RAL-RAR=ODB_RA_DIFF_LR (kV), B_par ~ ODB_FIELD, Sample = ODB_HV_SAMP (kV)

Description: Sets the run title. Midas handles run titles with a maximal length of 132 characters. If the given run title is longer than this 132 characters, the run title will be truncated to the allowed length.

Set the Time of Flight Window

TOF start, stop

with:

Examples:
TOF 1350, 1785

Description: Used to set the muon time of flight cut.

Set Moderator Info

MODERATOR mod, date

with,

Examples:
MODERATOR N2, 19-Dec-2005, 18:00

Description: Sets the moderator information.

Set LEM Setup Info

LEM_SETUP string

with,

Examples:
LEM_SETUP B_par

Description: Sets the information about the experiment setup. It is not necessary to enter which cryostat is used since this is already set in the ODB.

Set Waiting Time

WAIT waittime

with,

Examples:
WAIT 240

Description: Sets a waiting time. This wait time command is an approximate timing since it checks various things while waiting (flow, system state, etc.), hence the time accuracy is about 3 secs only.

Run Start Command

START [no_events | time sec]

with,

Examples:
START 1e7
START 1000000
START 120 sec

Description: Starts a run and will collect no_events data. It is taking the title from the ODB at run start, hence preceding to the START command there should be (in almost all cases) the TITLE command.

The second option starts a run and collects data for time seconds. This is typically needed for beam calibration measurements, etc. Currently the only units supported is 'sec'.

Stop an Ongoing Run

STOP [no_events | time sec]

with,

Description: This command makes only sense as the first statement of an autorun sequence. It's purpose is that often one is encountering the situation where everything is setup. One has started a run to see if everything is fine, yet one is very tired and the necessary statistics is not achieved. Instead of stopping the run and starting an auto-run sequence, one can use this command, i.e. starting the auto-run sequence with the STOP command. It just accumulates the necessary statistics of the current run before going over to the next command.

The second option will stop the ongoing run after time seconds. Currently the only units supported is 'sec'.

Note: In case an autorun starts accidentally with a STOP command and there is NO ongoing run, lemAutoRun will automatically change the STOP into a START command.

Warm-Up Command

WARMUP date, time

with,

Example:
WARMUP 2007-01-01, 05:00:00

Note: This command can occur in the autorun sequence wherever you want to place it, at the beginning, the end ... The autorun handler checks as a first thing if this command is present and sets it up, hence it is independent of the sequence structure. If it occurs more than once (which is quite stupid by the way) it will take only the first occurring one ignoring the others.

WARNING: This commmand will NOT work properly when the He bypass is open (meaning the bronkhorst He flow controller is bypassed), since in this situation there is no way to reduce the flow by software. So PLEASE, keep this in mind.

Description: Imaging the following situation: You want the change a sample at around 7:30AM. Without this command it would mean that you have to stop any autorun at around 6:00AM, shutdown the HV's, close the BPVX/Y, and start warming up the sample cryostat. Since sleep is precious, this command has been introduced. It does the warming up of the sample cryo according to the just described procedure. A few comments are necessary though: (i) The date-time given in the command is an approximate one in the sense that it will only execute after the current command has been carried out, except for an ongoing run which will be stopped. (ii) What is not under computer controll is the venting procedure for the sample chamber, i.e. it is not possible to let any exchange gas into the sample chamber automatically (and perhaps it is better that way).

Loops for Temperature, Sample HV, or Field

It is possible to set some primitive loops for setting the sample temperature, high voltage or field. The syntax is

LOOP_START
LOOP_LIST [v1, v2, ..., vn] | LOOP_ITERATOR [start, stop, step]
LOOP_TEMP LOOP_ELEMENT, dT, StabilityTimeout [, Ramp] |
LOOP_SAMPLE_HV LOOP_ELEMENT |
LOOP_FIELD_WEWL LOOP_ELEMENT [A|G] |
LOOP_FIELD_WEWH LOOP_ELEMENT [A|G] |
LOOP_FIELD_DANFYSIK LOOP_ELEMENT [A|G] |
LOOP_FIELD LOOP_ELEMENT [A|G]
% do something
LOOP_END

The loop MUST consist of at least the following elements in the order given in the code example:

  1. LOOP_START, loop start tag
  2. LOOP_LIST or LOOP_ITER, this gives the elements over which to loop
  3. LOOP_TEMP LOOP_ELEMENT or LOOP_SAMPLE_HV LOOP_ELEMENT or LOOP_FIELD_WEWL LOOP_ELEMENT or LOOP_FIELD_WEWH LOOP_ELEMENT or LOOP_FIELD_DANFYSIK LOOP_ELEMENT or LOOP_FIELD, this is the main loop command. They cannot be combined within the same loop.
  4. LOOP_END, loop end tag

It is possible to loop over a list of elements (LOOP_LIST). The elements v1, v2 etc. is just a list of elements.

It is also possible to have equidistant sampling points, like in an ordinary for-loop with the LOOP_ITERATOR.

Description: The implementation of loops is there for convenience, allowing one to write more compact autorun sequences. Internally the loops are expanded into a sequence of commands.

Dump of Raw Sample LakeShore 340 Sensor Data (FOR INTERNAL USE ONLY)

DUMP no_dumps

with,

Description: The dump command writes (appends) 10 time with intervals of about 6 seconds the time, temperature, pressure, heater value and range, setpoint, flow and the 10 raw voltages of the LakeShore340 channels to a file, named: .RawVoltageOutput.dat. This command is useful for thermometer calibrations.

Once per run, a header is added (needed by the calibration software and also useful such that the file is self-explanatory) which will look similar like this

%--------------------------------------------------------------------------
% Number of Entries : 23
% Number of Raw Data Reading   : 10
% First Raw Data Reading Entry : 14
% Entry  1 : month
% Entry  2 : day
% Entry  3 : year
% Entry  4 : hour
% Entry  5 : minutes
% Entry  6 : seconds
% Entry  7 : msec
% Entry  8 : measured temperature of control channel = A
% Entry  9 : pressure
% Entry 10 : heater output
% Entry 11 : setpoint temperature
% Entry 12 : heater range
% Entry 13 : BH1 flow measured
% Entry 14 : Raw Data Reading Entry 0 : Channel A : Sensor Type 1
% Entry 15 : Raw Data Reading Entry 1 : Channel B : Sensor Type 1
% Entry 16 : Raw Data Reading Entry 2 : Channel C1 : Sensor Type 2
% Entry 17 : Raw Data Reading Entry 3 : Channel D1 : Sensor Type 1
% Entry 18 : Raw Data Reading Entry 4 : Channel D2 : Sensor Type 1
% Entry 19 : Raw Data Reading Entry 5 : Channel D3 : Sensor Type 1
% Entry 20 : Raw Data Reading Entry 6 : Channel D4 : Sensor Type 1
% Entry 21 : Raw Data Reading Entry 7 : Channel C2 : Sensor Type 1
% Entry 22 : Raw Data Reading Entry 8 : Channel C3 : Sensor Type 1
% Entry 23 : Raw Data Reading Entry 9 : Channel C4 : Sensor Type 1
%--------------------------------------------------------------------------

Floating Ohm Meter (FOM -- FOR INTERNAL USE ONLY)

FOM current

with,

Examples:
FOM +10.0
FOM -3.25

Description: The FOM is a device built at electronic department of the University of Fribourg (after initial input from Alan Drew (Uni Fribourg) and Andreas Suter (PSI)) and currently not always available.

Define an alias for the autorun

ALIAS key, value

where key is the alias key, and value the corresponding value.

Examples:
ALIAS LED_IN /Equipment/K2400/Variables/Input
ALIAS LED_OUT_ONOFF /Equipment/K2400/Variables/Output[1]
ALIAS LED_OUT /Equipment/K2400/Variables/Output
ALIAS Leff "/Info/t0_Parameter/Leff RAon (mm)"

Description: Alias has been introduced to ease the writting autorun scripts when using ODB_SET_DATA or ODB_SET_DATA_ARRAY commands. It allows to introduce alias tags which at run-time will be replaced by its values. For instance the aliases defined in the examples could hence be us in a command like:
ODB_SET_DATA LED_IN[5], 1e-6, LED_OUT[3], 60, 1e-7
i.e. less sources of typo errors.

Enable/disable autorun midas alarm handling (FOR INTERNAL USE ONLY)

IGNORE_ALARMS tag

where tag is one of the following: yes | no | true | false | 1 | 0

Description: allows to temporarily ignore midas alarms from within the autorun. The default behavior of the autorun is that the autorun stops as soon as there is a midas alarm. When setting IGNORE_ALARM to 'yes' in the autorun, autorun will just proceed even if an alarm has been encountered.

Examples:
IGNORE_ALARMS no
IGNORE_ALARMS 1

Enable/disable autorun midas client checking (FOR INTERNAL USE ONLY)

IGNORE_CLIENTS tag

where tag is one of the following: yes | no | true | false | 1 | 0

Description: allows to temporarily suppress autorun to check if the necessary clients are running. The default behavior of the autorun is that the autorun stops if not all necessary clients for uSR experiments are running. When set to 'yes' no client checks are performed. This can be useful for some specific tests.

Examples:
IGNORE_CLIENTS yes
IGNORE_CLIENTS 0

Define an ODB tag for substitution in the run title

ODB_TAG odb_path[\[index\]]

with,

Description: allows to define tags which will be substiuted in the run title at run time. See also the run title command Run Title.

Examples:
ODB_TAG ODB_P /Equipment/LEMVAC/Variables/Input[11]
TITLE ODB_SAMPLE, T=ODB_TEMP K, E=ODB_ENERGY keV, B=ODB_FIELD, Tr/Sa=ODB_TRANSP/ODB_HV_SAMP kV, SR=ODB_SPIN_ROT, pSC=ODB_P (mbar)
ODB_TAG ODB_LHe /Equipment/LHeLevelMeter/Variables/Input
TITLE ODB_SAMPLE, T=ODB_TEMP K, E=ODB_ENERGY keV, B=ODB_FIELD, Tr/Sa=ODB_TRANSP/ODB_HV_SAMP kV, SR=ODB_SPIN_ROT, LHe=ODB_LHe (%)

Set ODB values (FOR INTERNAL USE ONLY)

ODB_SET_DATA odb_set_key_path[\[set_key_index\]], set_key_value, [odb_readback_key_path[\[readback_key_index\]], timeout, tolerance]

with,

Examples:
ODB_SET_DATA /Equipment/LED_Test/Variables/Output[1], 1
ODB_SET_DATA /Equipment/LED_Test/Variables/Output[0], 20.0, /Equipment/LED_Test/Variables/Input[1], 60, 0.05
ODB_SET_DATA "/Info/t0_Parameter/Leff RAon (mm)", 726
ODB_SET_DATA "/Info/Somthing Important", "string value of something important"

Description: With this command, ODB values can be manipulated directly. Since this is rather dangerous you should really understand what you are doing before using this command!

Comments: String based values must not contain any of the following signs: quotes, i.e. "", '<', and '>'

Set ODB arrays (FOR INTERNAL USE ONLY)

ODB_SET_DATA_ARRAY odb_set_key_path, value1, value2, ..., valueN

where value has to be of type 'float'.

Examples:
ODB_SET_DATA_ARRAY /Equipment/K2400/Variables/Output, 0, 1, 10, 1, 1, 1e-5, 1.5, 0, 1

Description: With this command, ODB arrays of type float can be set. It directly manipulates the online data base of the instrument and hence this is rather dangerous command you really should understand what you are doing before using it!

LEM Auto Run Sequence Example

Here follows a syntactically correct example:

LEM_SETUP B_par, Danfysik
MODERATOR Ar/N2, 2006-03-16 18:00
TOF 1250, 1750
FIELD_DANFYSIK 12.3
TEMP 8.0, 0.05, 3600, 0.0, 3, 200, 50, 2, 17320
WAIT 120
LOOP_START
LOOP_LIST [9.0, 9.5, 9.7, 9.8, 9.9, 15.0]
LOOP_TEMP LOOP_ELEMENT, 0.02, 3600, 1.0
WAIT 120
LOOP_START
LOOP_ITERATOR [-12.5, 12.5, 2.5]
LOOP_SAMPLE_HV LOOP_ELEMENT
TITLE Test T=ODB_TEMP (K), ODB_TRANSP (kV), RAL-RAR=ODB_RA_DIFF_LR (kV), B_par ~ ODB_FIELD, Sample = ODB_HV_SAMP (kV)
START 1e7
LOOP_END
LOOP_END
SAMPLE_HV 0.0

Implementation Details of the LEM Auto Run Sequence

The LEM Auto Run Sequence (LARS) is set up the following way:

  1. The user script is translated into a XML output-file (lets call it lar_seq.xml) without any consistency checks.
  2. lar_seq.xml is than parsed back with a validating schema parser (XERCES). Here any errors the user might have entered will be detected and fed back.
  3. If the parsing was successful the whole user sequence is sequentialized and handed over to the autorun sequence loop.

The applied schema for the parsing process is given in the file lemAutoRun.xsd. The mapping between the above described user auto run commands and the corresponding xml-tags should be obvious.

Most of the routines are implemented in a straight forward fashion, however there are some which some additional background information will be given.

Implementation of Set Field

First it is verified that the corresponding client is indeed running, if not, it will stop the autorun sequence. This is a measure of precaution. In a next step the new field value is sent to the ODB, followed by a verification that the new field value is indeed reached. If it is not reached within a timeout given in the lemAutoRun.xml start-up file, an error is emitted and the autorun sequence stopped.

Implementation of Set Sample HV and Set Ring Anode HV

First it is verified that the corresponding client is indeed running, if not, it will stop the autorun sequence. This is a measure of precaution. In a next step the new HV value is sent to the ODB, followed by a verification that the value is indeed reached. If it is not reached within a timeout given in the lemAutoRun.xml start-up file, an error is emitted and the autorun sequence stopped.

Implementation of Set Sample Temperature and the Temperature Monitoring during a Run

There are 3 different regimes for the temperature change/monitoring:

  1. stable temperature
  2. increasing temperature
  3. decreasing temperature

They will be discussed separately in the following. It is worth mentioning that the TEMP command (see Set Sample Temperature (Cryos and Oven) ) is always either following the increasing- or decreasing temperature procedure and stable temperature is only check by itself during uSR data taking.

An important note: As you will read the set temperature command will try to operate the sliding valves between the chambers (BPVX/BPVY). However, it only operates these valves if they are initially open! The reason is that you might want to use the autorun sequence also for initial cooling of the sample, while growing a new moderator. In this case it would be fatal if the set temperature command would open the BPVX, etc. Therefore it is important that the user checks the valve states before starting any autorun and makes sure that the valves are in the state he/she wants. Anyway, to start a uSR run with a closed BPVX or BPVY will lead to a VERY low slow muon rate at the sample ;-)

If you plan to use the demand temperature ramping feature of the LakeShore 340, please read very carefully the following 3 subsections. Here the main reason why it has been introduced: when increasing the temperature, there will be also a pressure increase in the sample chamber due to degassing. This effect is most dramatic below 100K. If no demand temperature ramping is used, the pressure might increase to values > 1e-6 mbar. 1e-6 mbar is the critical pressure to fire the high voltage interlocks, which will stop the autorun sequence immediately! A second reason is that you cannot tolerate temperature overshooting in your experiment. If this is your case it would be wise to test the temperature part of your autorun sequence first to make sure that it really is doing as you expecting.

Stable Temperature

During a run, a temperature value is taken every 5 sec (at the moment hard-wired) and pushed into a ring history buffer. The history buffer is fitted to a parabola model which is used to adjust the He flow if necessary. This procedure should guarantee that the heater stays always in a sensible range. The formula to adjust the flow is

\[ f_n = f_c \cdot \exp(p_H \left[ (h_c - h_p) + d_H h_T \right]) \]

where $f_n$ is the new flow, $f_c$ is the current flow. $p_H$ is

\[ p_H = - p_H^0 - p_H^1 \cdot T_{\rm SP} \]

with $T_{\rm SP}$ the setpoint temperature. $h_c$ is the current heater value. $h_p$ is 50 for the heater range 3, 40 for the heater range 4, and $20 + 0.04 (T_{\rm SP} - 50.0)$ for the heater range 5. $h_T$ is the first derivative of the parabolic model at current time.

The missing parameters are numbers collected with their XML startup file pendant here,

If enabled, the transferline needlevalve will be adjusted according to the following rules:

Increasing Temperature

When the setpoint is increased the following steps are taken:

Decreasing Temperature

Decreasing temperature works the fastest, if demand temperature ramping (in the following called ramping) value is set to zero! It is still possible to use it but than you are on your one, concerning the time constant of the cooling down. Furthermore you need to consider the He flow by yourself since, if not given explicitly, the algorithm will just set the flow of the end demand temperature resulting in the predominant number of cases in cooling rates of < 1 K/min!

Here the following procedure is followed:

Implementation of Set Run Title

As described in Run Title, the user can include some specific tags, which are than replaced by their values from the ODB. The question is: when is this done? It is actually done when the command is executed, i.e. the run title should almost always been placed directly before a run start command (Run Start Command)

Description of the XML Startup Files and the Parameters

The lemAutoRun uses two startup XML files to obtain most of the essential parameter for operation. The first one (lemAutoRun.xml) is a global one, holding all the informations which are independent of the sample cryostat in use, whereas the second one depends on the sample cryo, holding all its necessary parameters. The names for the sample cryo XML files are:

The master XML files, i.e. the ones which are in the repository, are found under $MIDAS_WORK/lemQt/lemAutoRun/src. If a permanent change is needed they should be changed there and the corresponding file(s) should be submitted to the repository. In order that they will be used, they have to be transferred to the XML working directory which is $MIDAS_WORK/bin/.lemXMLs.

In the header of this startup files there is a comment block explaining all the defined variables (except those which are obvious). Here only those variables which might needed to be tweaked are shortly explained.