#acl EditorsGroup:read,write,delete,revert All:read #language en = Interlock Systems installed at XFEL = <> == Crate Configuration == The crate configuration of the interlock system for XFEL: Example configuration from XFEL RF1 {{{ slot|classId| rev.| rio type -----+-------+-------+--------------- 0| CTS| d402| NONE 1| DI| d312| RIO_DIGIIO 2| DI| d312| RIO_DIGIIO 3| AI| d30c| RIO_PT100 4| AI| d30c| RIO_PT100 5| AI| d30c| RIO_AICL 6| AI| d30c| RIO_AICL 7| LI| d312| RIO_EXTBOARD 8| ??| d312| RIO_EXTBOARD 9| none| -| - 10| FA| d312| RIO_FLASHADC 11| PM| d312| RIO_PMETER 12| PM| d312| RIO_PMETER }}} == Software Configuration == Each Interlock System has a individual configuration, that consists of several files. The configuration files are stored on each system at a location that is stored in the environment variable ${INTLK_CONFIG}. This variable is setup at system start by the Interlock System identification script at /etc/intlk/config.sh '''which must be manually edited for the first setup'''. Primary system identification is stored in /etc/intlk/config.sh. This script is always included/executed in the software environment in the Interlock System. It is called by the default initialization script in /etc/intlk/setupenv.sh, which itself is executed on system boot up and for each user login. ''For example (RF1)'' {{{#!highlight bash export CVSSERVER=141.34.130.10 export CVSSERVER_PORT=2401 export INTLK_CONFIG=${INTLK}/config/xfel/rf1 export TINE_HOME=${INTLK_CONFIG} }}} '''CVSSERVER''' names the central CVS server that is used to distribute the software release for the interlock system. '''INTLK_CONFIG''' is the path to the folder that contains all files for the ''specific'' Interlock configuration. It is constructed from ${INTLK} which is by default /opt/intlk4 '''TINE_HOME''' is the path for the TINE Server to load and store its configuration files. It is needed for the local TINE server and is by default the same as '''INTLK_CONFIG''' ---- For each system exists an individual configuration location on the filesystem which are all stored at ${INTLK}/config by default. All interlock systems by default contain the configuration of every systems. This is because all systems use the same CVS repository at this moment. It consumes some extra memory on the filesystem but it faciliates the transfer of configurations between the systems (ex.g. analog parameters of a system) and makes it easy to swap controllers for spare replacement. * /opt/intlk/config * hh_amtf1 - '' configurations for the amtf facilities '' * hh_amtf2 * hh_amtf3 * zn_tcombiner - '' configuration for the T-Combiner teststand at Zeuthen '' * default - ''standard configuration for new systems'' * hh_mhfpteststandnord - ''setup for a individual teststand'' * xfel - ''configurations for all rf systems at XFEL'' * rf1 * rf2 * rf3 * rf4 * ... ''Note'': When a new system needs to be added, a corresponding folder with an individual configuration must be created within this folder structure and the initialization script at /etc/intlk/config.sh must point to this new location. === Boot up configure script === At boot up, a initialization script is executed which is configuring the Interlock System, ex.g. loading paramters, filter constants, masks. This script is called '''configSystem.sh''' and is placed under '''${INTLK_CONFIG}'''. The initialization script must do the following actions ''(when the system has rebooted)'': * switch system to '''SAFE MODE''' using '''[[i4mode]]''' * activate the DAQ using '''i4init''' * activate IRQ handling in DAQ driver * activate readout of data (ADC values, ADC Waveforms, Interlock Status) * configure the frontpanel LEDs modes (Interlock Status, Masked or Off) using '''i4init''' * load default paramters from the signal list (filter constants, masks, thresholds) * enable external power supplies using '''i4cmd''' * activate the Interlock System (must be done to switch to INTERLOCK MODE) using '''i4cmd''' * load the last stored parameters (filter constants, masks, thresholds using '''i4cfg''') * select clock source (using '''i4clock''') * switch to '''INTERLOCK MODE''' using '''[[i4mode]]''' which will activate all outputs An example of an configuration script: {{{#!highlight bash #!/bin/sh # Configuration File for Hamburg Interlock 4 # load default parameters from signallist # switch to safe mode (bug in firmware, cannot set masks in interlock_edit) i4mode -s safe i4init -m configureDAQ i4init -m configureLeds i4init -f /opt/intlk4/config/hh_amtf1/hh_amtf1.xml -m configureSignalParameter # Setting Temperatures Parameters on Slot 3 Channel 0 # i4chanparam -s 3.00 -l 15^C -u 45^C # Example Setting Mask for Slot 3 Channel 0 # i4chanparam -s 3.00 -m MASKED # i4chanparam -s 3.00 -m TRUE # Example removing Mask for Slot 3 Channel 0 # i4chanparam -s 3.00 -m NOT_MASKED # i4chanparam -s 3.00 -m FALSE # give software confirmation to enable power supplies (must be replaced by system test later!) i4cmd --enable_ps # give software confirmation , that system fine (must be replaced by system test later!) i4cmd --enable_system # activate interlock system (this allows to change into interlock operational mode, will be replaced by system test later!) i4mode -a i4cfg -l [[i4mode]] -s INTERLOCK }}} The interlock configuration can be executed manually by running the command '''i4configure.sh'''. === Setup of a new System === * Configure IP Address in''' /etc/network/interfaces''' * if software is very old run i4reinstall.sh * if i4reinstall does not exist, try run i4update.sh first * if i4update.sh does not have effect, cd to /opt/intlk4/ and run cvs update * then run i4reinstall.sh, software is reinstalled completly * Create a new location for configuration in /etc/intlk/config/... and commit it to the '''CVS''' * Edit /etc/intlk/config.sh to point to the correct configuration location / folder * logout and login or reboot the Interlock system * update to the desired software release, use''' i4update''' for latest software * copy Signallist to configuration location '''${INTLK_CONFIG}''' * adapt '''config.ini''' to configure TINE Server, i4ds4, i4tcpsrv, etc. * flash correct firmware to all modules, reboot FPGAs is needed * If the existing system has old 200MHz firmware, all modules must be flashed at the same time * adapt configuration script '''${INTLK_CONFIG}/configSystem.sh''' * configure the system parameters via i4chanparam * store the parameters using '''i4cfg''' * check if all services are running * check if all services are providing data to the supoerior systems (DOOCS, TINE, etc...) * make a last reboot and check if everything is working * commit all changes of the configuration to the CVS