BNMR: EPICS: Difference between revisions

From DaqWiki
Jump to navigation Jump to search
en>Suz
No edit summary
en>Suz
mNo edit summary
Line 10: Line 10:


== Introduction ==
== Introduction ==
The [http://www.aps.anl.gov/epics/ EPICS] system is used at TRIUMF for the control system for beamlines etc.
Experimenters will need to display the Epics Control Pages in order to run the {{bnmqr|join=or}} experiments. They must also ensure that ''BNMR'' has been granted write access to the required Epics parameters as described [[#Write access to Epics Parameters|below]], or they will not be able to change the relevant beamline controls.
Experimenters will need to display the Epics Control Pages in order to run the {{bnmqr|join=or}} experiments. They must also ensure that ''BNMR'' has been granted write access to the required Epics parameters as described [[#Write access to Epics Parameters|below]], or they will not be able to change the relevant beamline controls.



Revision as of 18:11, 25 November 2016

Links

Introduction

The EPICS system is used at TRIUMF for the control system for beamlines etc. Experimenters will need to display the Epics Control Pages in order to run the bnmr or bnqr experiments. They must also ensure that BNMR has been granted write access to the required Epics parameters as described below, or they will not be able to change the relevant beamline controls.

Display ISAC Epics Control Pages

Switch onto a different desktop on linux box isdaq01 (or isdaq06) so the Epics Control page does not clutter the desktop used for running the experiment. Access the epics control pages on isacepics1 with ssh from an xterm window, as follows (if you don't know the password, ask a group member).

ssh bnmr@isacepics1
( Type in the password )

You should see the main ISAC EPICS control page come up after a few seconds.

Note
There is no bnqr user account on isacepics1. The bnmr account is used for both experiments and the same EPICS access permission (i.e. BNMR) applies to both.


Write access to Epics Parameters

Most Epics parameters can be read by anyone, but write access has to be granted by the Controls Group. On the main EPICS Control Page there is a button labelled "Access". Click on this button. This will show the current "Access". For the bnmr and bnqr experiments, "Access" must be set to BNMR, or it will not be possible to run in any #Experimental Mode that requires write access to one of the required IOCs. Testing the DAQ can be done in Single Channel Mode using frequency scans, but running a NaCell scan or Dual Channel Mode will not be possible without "Access" set to BNMR. If access is granted to BNMR, this includes BNQR.

Therefore, at the beginning of the bnmr / bnqr beam period, ensure that the "Access" parameter on the main ISAC Epics controls page is set to BNMR '. If "Access" is NOT set to BNMR, telephone the Control Room and ask them to change the Access.

Even when "Access" is granted to BNMR, only those EPICS IOCs to which BNMR has been granted write access can be changed by the experimenters from the EPICS Control pages, e.g. Helicity, NaCell Voltage, and all BNMR/BNQR parameters for single/dual channel mode control.

Some of these parameters are also writable by the bnmr and bnqr BNMR and BNQR VMICs (lxbnmr,lxbnqr). They have been granted write access by the Controls Group to allow the frontend programs to flip helicity and turn the beam on/off via PPG signals. The frontends use EPICS Channel Access software to scan the NaCell voltage, for example.

The names of the IOCs accessed for read or write by the frontend are listed in the file bnmr_epics.c.

WARNING

There is NO protection against users changing Epics parameters via the Epics Control pages or the frontend programs while an experimental run is in progress on either bnmr or bnqr DAQs. When running in Single Channel Mode, there is also no protection against each experiment interfering with each other by both flipping the helicity. Users must ensure that they know what they are doing!

EPICS monitor program fe_epics

Independent of the above, a MIDAS client fe_epics is also running. It is used to send experiment-specific information into the EPICs system for the operators to see. In the case of bnmr or bnqr experiments, this information is the cycle scalers (see the ODB epics equipment /Equipment/epics/settings). There is also a watchdog that is updated every so often to indicate that the connection is alive.

EPICS Logging

When EPICS variables are in use, it is desirable to log their values during a run, in the same way that CAMP variables are logged. An equipment is defined in the frontend /Equipment/Epicslog and used to send out data banks with the names of the EPICS variables to be logged at begin and end of run, and to send out their values periodically during the run.


EPICS Alive

A frontend equipment (see ODB path /Equipment/EpicsAlive) runs periodically to keep the Epics Channel Access channels open for the frontend. This prevents them timing out during a run. The Epics channels that must be kept open are usually the Helicity and the Epics scan variable(s), e.g. NaCell voltage and readback.

EPICS Checking

EPICS checks are done by various clients. They are enabled in the ODB under /Equipment/FIFO_Acq/Frontend/Hardware/ and should be enabled when taking data. The key /Enable all hel checks enables checking that the helicity set value and readback agree. This check was previously done by reading back the EPICS value. This only worked for Single Channel Mode and was not particularly reliable. For Dual Channel Mode, the readback has to be of the latched value of the helicity at the time when beam is sent to that channel. This is done using a specially programmed VME IO Register. The key Enable epics switch checks checks that the EPICS switches for selecting Dual or Single Channel Mode match the value of the key Enable dual channel mode. The actual check is done by the client rf_config so the run may be prevented from starting if the EPICS switches are set in the wrong position.