EPICS: Software IOC for CAEN HV

From CLONWiki
Revision as of 22:11, 24 January 2009 by Boiarino (talk | contribs) (→‎SY527)
Jump to navigation Jump to search

Term software IOC is used to distinguish UNIX-based IOC from VXWORKS-based one. In case of CAEN HV that classification is not quite accurate. Originally EPICS support in CLAS was provided for new CAEN SY1527 mainframes, it was UNIX-based IOC talking to mainframes over TCP connection. Later that software was ported to VxWorks and adopted to control old CAEN SY527 mainframes over VME V288 CAENET controller.

SY527

Old CAEN SY527 HV system is used in Drift Chamber (3 mainframes, IOC in dccntrl VME crate) and in Large Angle Calorimater (4 mainframes, IOC in camac2 VME crate). IOC source code is located in $BASEB/src/iocsy527App/, boot scripts in $IOC/dccntrl and $IOC/camac2.

Drift Chamber HV system originally was not under EPICS, it was controlled by dchv software (UNIX and VxWorks components) written by Vardan Gurjyan. New system deployed in January 2009 includes both original dchv and new EPICS functionality. Dchv UNIX components are located in $CLON/src/dchv/. Dchv VxWorks components were moved to $BASEB/src/iocsy527App/src, modified and placed into two files: v288.c contains low level hardware-controlling functions and CAEN SY1527 HV wrapper-like calls, while dchv.c contains support for dchv UNIX components. Main difference between old and new dchv is that old dchv software controlled HV hardware directly, while in new scheme it talks to the EPICS driver.

EPICS driver file is sy527.c. It is very similar to the UNIX-based SY1527 driver, with small VxWorks-related modifications. It is constantly scans all mainframes on CAENET bus reading all parameters and changing them if requested by EPICS or dchv.

Dchv controlled by configuration files located in $CLON_PARMS/dchv/, and some data files produced during monitoring process are located there. .............................

EPICS database source files for DC and LAC are located in standard directory $APP/hvca/db/. To generate EPICS DB's, medm's and alarms use standard procedure described in [[]].

SY1527

To start IOC:

 cd $BASEB/src/CAEN_HV/IocShell/
 ./startup.all

Contents of 'startup.all' for references:

 #!/usr/local/clas/devel/R3.14.8.2/EPICS/baseB/bin/linux-x86/ioccaen
 #
 #  startup.all test for linux ioc
 #
 < envPaths
 #
 cd ${TOP}
 #
 dbLoadDatabase("src/CAEN_HV/IocShell/O.Common/ioccaen.dbd",0,0)
 ioccaen_registerRecordDeviceDriver(pdbbase)
 Init_CAEN()
 Start_CAEN(1,"129.57.69.101")
 #
 dbLoadRecords("src/CAEN_HV/IocShell/caen_01.db")
 #
 iocInit()
 #
 # end of linux ioc startup script

Contents of 'envPaths' (for references):

 epicsEnvSet(ARCH,"linux-x86")
 epicsEnvSet(IOC,"CAEN_HV")
 epicsEnvSet(TOP,"/usr/local/clas/devel/R3.14.8.2/EPICS/baseB")