PEARL Procedures Igor procedures for the analysis of PEARL data

- Main Page
- Related Pages
- Packages
- Namespaces
- Files

- File List
- Globals

Namespaces | Functions | Variables
pearl-anneal.ipf File Reference

ramp generator for sample annealing More...

`#include "pearl-epics"`

Go to the source code of this file.

## Namespaces
| PearlAnneal
| ramp generator for sample annealing

## Functions
static variable | AfterCompiledHook ()
static variable | init_package ()
| initialize the package data folder More...
static variable | save_prefs ()
static variable | load_prefs ()
static variable | save_ramp ()
| save current ramp table More...
static variable | IgorQuitHook (string app)
| Igor sometimes crashes if the PVs are not disconnected when it quits. More...
static variable | epics_connect ()
| connect to all required EPICS devices. More...
static variable | epics_connect_psu ()
| connect to the power supply unit More...
static variable | epics_connect_ls ()
| connect to the lakeshore temperature controller More...
static variable | epics_connect_vac ()
| connect to the vacuum gauge More...
static variable | epics_connect_pyro ()
| connect to the pyrometer More...
static variable | epics_disconnect_chid (string chid_var_name)
static variable | epics_disconnect ()
| disconnect from all EPICS devices. More...
static variable | epics_disconnect_psu ()
| disconnect from the power supply unit More...
static variable | epics_disconnect_ls ()
| disconnect from the lakeshore controller More...
static variable | epics_disconnect_vac ()
| disconnect from the vacuum gauge More...
static variable | epics_disconnect_pyro ()
| disconnect from the pyrometer More...
variable | ann_new_ramp_table (variable edit_table=defaultValue)
| create a new ramp table and open it in a table window. More...
variable | ann_init_bg ()
| initialize the background tasks More...
static variable | ann_record_bg (WMBackgroundStruct *s)
| background task of the recorder More...
static variable | ann_ramp_bg (WMBackgroundStruct *s)
| background task of the ramp More...
variable | ann_ramp_step ()
| prepare and execute the next ramp step More...
static variable | ann_ramp_update (variable phase)
| update control panel variables More...
static variable | ann_ramp_step_exec (variable minutes_now)
| execute the next ramp step More...
static variable | ann_ramp_trip (variable phase)
| check trip conditions More...
static variable | ann_ramp_hold (variable phase)
| check hold conditions More...
static variable | ann_ramp_target (variable phase)
| check target conditions More...
variable | ann_ramp_start ()
| start an annealing ramp More...
variable | ann_ramp_pause ()
variable | ann_ramp_resume ()
variable | ann_ramp_stop (variable reset_psu)
| stop a running annealing ramp More...
variable | ann_display_ramp ()
void | panel_ramp_gen ()
static variable | bp_ramp_start (WMButtonAction *ba)
static variable | bp_ramp_pause (WMButtonAction *ba)
static variable | bp_ramp_stop (WMButtonAction *ba)
static variable | bp_ramp_edit (WMButtonAction *ba)

## Variables
static const string | package_name = "pearl_anneal"
static const string | package_path = "root:packages:pearl_anneal:"
static const string | prefs_objects = ""

## Detailed Description

ramp generator for sample annealing

the ramp generator increases/decreases the heating power according to piecewise target function defined by the user in a set of waves. each row of these waves describes one ramp phase. the rows are processed sequentially.

target waves define when a ramp phase ends. when a target is reached, the generator starts to process the next one. the end point of the current phase will become the start point of the next phase.

the power target is interpolated linearly between the start and end points of a phase. the ramp speed is given by the difference of the target values of the previous and current phases, and the duration of the phase. the power target values must be filled and be greater or equal to zero.

the temperature targets are kept constant. once a temperature target has been reached, the phase ends. temperature targets are not enforced. the phase will end unconditionally when the power target is reached. if you need to reach a temperature target, make sure that the power target is high enough, and that the ramp is slow enough so that the temperature is reached before the phase ends. temperature targets can be disabled by entering NaN.

limits are not enforced. if a limit is exceeded, the ramp will pause (while the power remains at its last setting). the ramp resumes when the value falls below the limit. limit checking can be disabled by entering NaN. limits remain constant during the phase.

trips cause the ramp to stop, and the power to be turned off. trip checking can be disabled by entering NaN. trip values remain constant during the phase. caution: do not rely on these trips for protection of equipment or the sample! there may be a considerable lag between the occurrence of a trip condition and the execution of a power reset! either use a suitable hardware trip mechanism, or include an appropriate safety margin.

- minutes: minimum duration of the ramp phase in minutes. determines the ramping speed. the phase may take longer if pressure or temperature limits are reached. required, must be greater than zero except for the first phase.
- target_watts: power setpoint at the end of the phase. required, must be greater or equal to zero.
- target_tempA: temperature target of Lakeshore channel A in Kelvin. optional, specify NaN to disable.
- target_tempB: temperature target of Lakeshore channel B in Kelvin. optional, specify NaN to disable.
- target_tempPy: temperature target of the pyrometer in Kelvin. optional, specify NaN to disable.
- limit_pressure: vacuum pressure limit in mbar. optional, specify NaN to disable.
- trip_tempA: trip temperature of sensor A in Kelvin. optional, specify NaN to disable.
- trip_tempB: trip temperature of sensor B in Kelvin. optional, specify NaN to disable.
- trip_tempPy: trip temperature of pyrometer in Kelvin. optional, specify NaN to disable.
- trip_pressure: trip pressure in mbar. optional, specify NaN to disable.

at the beginning of the table, a row with the current setpoints (normally zero at the beginning of a ramp) and zero duration must be included. note that the power supply will remain at its last setpoint after the ramp. thus, the last row should bring the power supply to a safe end value, e.g. zero.

Precondition
  run-time requirements for online mode at the beamline
  - EPICS.XOP of Paul Scherrer Institut, version 0.3.0 (March 2015) or later, must be loaded.
  - caRepeater.exe program (from EPICS distribution) must be running.

Author
  matthias muntwiler, matth.nosp@m.ias..nosp@m.muntw.nosp@m.iler.nosp@m.@psi..nosp@m.ch

Copyright
  2015 Paul Scherrer Institut
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Definition in file pearl-anneal.ipf.

## Function Documentation

static variable AfterCompiledHook | ( |  | ) |
| static

Definition at line 98 of file pearl-anneal.ipf.

variable ann_display_ramp | ( |  | ) |

Definition at line 1295 of file pearl-anneal.ipf.

variable ann_init_bg | ( |  | ) |

initialize the background tasks

can be called repeatedly. the function exits gracefully if tasks are running.

Definition at line 712 of file pearl-anneal.ipf.

variable ann_new_ramp_table | ( | variable | edit_table = `defaultValue` | ) |

create a new ramp table and open it in a table window.

the waves are created in the current data folder. to be executed, they must be copied into the package folder.

Definition at line 668 of file pearl-anneal.ipf.

static variable ann_ramp_bg | ( | WMBackgroundStruct * | s | ) |
| static

background task of the ramp

Definition at line 800 of file pearl-anneal.ipf.

static variable ann_ramp_hold | ( | variable | phase | ) |
| static

check hold conditions

Returns
  non-zero if a hold condition is detected, zero if everything is okay.

Definition at line 1064 of file pearl-anneal.ipf.

variable ann_ramp_pause | ( |  | ) |

Definition at line 1236 of file pearl-anneal.ipf.

variable ann_ramp_resume | ( |  | ) |

Definition at line 1249 of file pearl-anneal.ipf.

variable ann_ramp_start | ( |  | ) |

start an annealing ramp

Definition at line 1180 of file pearl-anneal.ipf.

variable ann_ramp_step | ( |  | ) |

prepare and execute the next ramp step

check trips and limits before calling ann_ramp_step_exec()

Definition at line 816 of file pearl-anneal.ipf.

static variable ann_ramp_step_exec | ( | variable | minutes_now | ) |
| static

execute the next ramp step

calculate new setpoints and update the power supply setpoints. no trips and limits checked in this function.

Returns
  zero during ramp phase, non-zero at end of ramp phase

Definition at line 916 of file pearl-anneal.ipf.

variable ann_ramp_stop | ( | variable | reset_psu | ) |

stop a running annealing ramp

Parameters

  reset_psu | 1 = turn off the power supply, 0 = do not change the power supply the power supply is also turned off if the current target power is below 1 W.

Definition at line 1266 of file pearl-anneal.ipf.

static variable ann_ramp_target | ( | variable | phase | ) |
| static

check target conditions

Returns
  non-zero if a target reached, zero otherwise.

Definition at line 1087 of file pearl-anneal.ipf.

static variable ann_ramp_trip | ( | variable | phase | ) |
| static

check trip conditions

turn of power and stop the ramp if any of the trip conditions is met.

Returns
  non-zero if a trip condition is detected, zero if everything is okay.

Definition at line 1011 of file pearl-anneal.ipf.

static variable ann_ramp_update | ( | variable | phase | ) |
| static

update control panel variables

Definition at line 868 of file pearl-anneal.ipf.

static variable ann_record_bg | ( | WMBackgroundStruct * | s | ) |
| static

background task of the recorder

Definition at line 723 of file pearl-anneal.ipf.

static variable bp_ramp_edit | ( | WMButtonAction * | ba | ) |
| static

Definition at line 1476 of file pearl-anneal.ipf.

static variable bp_ramp_pause | ( | WMButtonAction * | ba | ) |
| static

Definition at line 1440 of file pearl-anneal.ipf.

static variable bp_ramp_start | ( | WMButtonAction * | ba | ) |
| static

Definition at line 1422 of file pearl-anneal.ipf.

static variable bp_ramp_stop | ( | WMButtonAction * | ba | ) |
| static

Definition at line 1462 of file pearl-anneal.ipf.

static variable epics_connect | ( |  | ) |
| static

connect to all required EPICS devices.

can be called repeatedly. the function exits gracefully if connections are existing.

Returns
  zero if successful, non-zero if an error occurred

Definition at line 303 of file pearl-anneal.ipf.

static variable epics_connect_ls | ( |  | ) |
| static

connect to the lakeshore temperature controller

if the EPICS XOP is not loaded, the function does nothing. if channels are not available, the function exits with an error code. the run-time error status is reset.

Returns
  zero if successful, non-zero if an error occurred

Todo:
  the X03DA channel names are hard-coded.

Definition at line 417 of file pearl-anneal.ipf.

static variable epics_connect_psu | ( |  | ) |
| static

connect to the power supply unit

if the EPICS XOP is not loaded, the function does nothing. if channels are not available, the function exits with an error code. the run-time error status is reset.

Returns
  zero if successful, non-zero if an error occurred

Todo:
  the X03DA channel names are hard-coded.

Definition at line 338 of file pearl-anneal.ipf.

static variable epics_connect_pyro | ( |  | ) |
| static

connect to the pyrometer

if the EPICS XOP is not loaded, the function does nothing. if channels are not available, the function exits with an error code. the run-time error status is reset.

Returns
  zero if successful, non-zero if an error occurred

Todo:
  the X03DA channel names are hard-coded.

IOC implemented in LabView X03DA-LV-MAURER:TEMP-1 X03DA-LV-MAURER:TEMP-Q

Definition at line 519 of file pearl-anneal.ipf.

static variable epics_connect_vac | ( |  | ) |
| static

connect to the vacuum gauge

if the EPICS XOP is not loaded, the function does nothing. if channels are not available, the function exits with an error code. the run-time error status is reset.

Returns
  zero if successful, non-zero if an error occurred

Todo:
  the X03DA channel names are hard-coded.

Definition at line 468 of file pearl-anneal.ipf.

static variable epics_disconnect | ( |  | ) |
| static

disconnect from all EPICS devices.

Definition at line 577 of file pearl-anneal.ipf.

static variable epics_disconnect_chid | ( | string | chid_var_name | ) |
| static

Definition at line 561 of file pearl-anneal.ipf.

static variable epics_disconnect_ls | ( |  | ) |
| static

disconnect from the lakeshore controller

Definition at line 615 of file pearl-anneal.ipf.

static variable epics_disconnect_psu | ( |  | ) |
| static

disconnect from the power supply unit

Definition at line 591 of file pearl-anneal.ipf.

static variable epics_disconnect_pyro | ( |  | ) |
| static

disconnect from the pyrometer

Definition at line 648 of file pearl-anneal.ipf.

static variable epics_disconnect_vac | ( |  | ) |
| static

disconnect from the vacuum gauge

Definition at line 632 of file pearl-anneal.ipf.

static variable IgorQuitHook | ( | string | app | ) |
| static

Igor sometimes crashes if the PVs are not disconnected when it quits.

Definition at line 293 of file pearl-anneal.ipf.

static variable init_package | ( |  | ) |
| static

initialize the package data folder

create the package data folder, and all necessary control and data objects. reset all variables.

Definition at line 128 of file pearl-anneal.ipf.

static variable load_prefs | ( |  | ) |
| static

Definition at line 241 of file pearl-anneal.ipf.

void panel_ramp_gen | ( |  | ) |

Definition at line 1311 of file pearl-anneal.ipf.

static variable save_prefs | ( |  | ) |
| static

Definition at line 223 of file pearl-anneal.ipf.

static variable save_ramp | ( |  | ) |
| static

save current ramp table

WORK IN PROGRESS

Definition at line 270 of file pearl-anneal.ipf.

## Variable Documentation

const string package_name = "pearl_anneal"
| static

Definition at line 93 of file pearl-anneal.ipf.

const string package_path = "root:packages:pearl_anneal:"
| static

Definition at line 94 of file pearl-anneal.ipf.

const string prefs_objects = ""
| static

Definition at line 96 of file pearl-anneal.ipf.