EPICS: Software IOC for CAEN HV: Difference between revisions
Line 13: | Line 13: | ||
''DCHV'' is controlled by configuration files located in ''$CLON_PARMS/dchv/'', and some data files produced during monitoring process are placed there. ............................. | ''DCHV'' is controlled by configuration files located in ''$CLON_PARMS/dchv/'', and some data files produced during monitoring process are placed 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 [[EPICS: generation of DBs and GUIs for HV]]. | EPICS database source files for DC and LAC are located in standard directory ''$APP/hvca/db/''. LAC files are ''lac1.dat'' and ''lac2.dat'', DC files are ''dc1.dat'', ''dc3.dat'' and ''dc4.dat''. To generate EPICS DB's, medm's and alarms use standard procedure described in [[EPICS: generation of DBs and GUIs for HV]]. | ||
== SY1527 == | == SY1527 == |
Revision as of 22:39, 24 January 2009
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.
LAC EPICS control was implemented in September 2007 and works since then. Some errors were observed from CAENET transactions, and our software is able to recover those errors successfully. At some time in future we may have a chance to discuss and probably debug those errors with CAEN experts.
Drift Chamber HV system originally was not under EPICS, it was (and still is) 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/ directory. DCHV VxWorks components were moved to $BASEB/src/iocsy527App/src, modified and placed into two files: v288.c which contains low level hardware-controlling functions and CAEN HV wrapper-like calls, and dchv.c which contains support for DCHV UNIX components. Main difference between old and new DCHV is that old software talked to 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 is controlled by configuration files located in $CLON_PARMS/dchv/, and some data files produced during monitoring process are placed there. .............................
EPICS database source files for DC and LAC are located in standard directory $APP/hvca/db/. LAC files are lac1.dat and lac2.dat, DC files are dc1.dat, dc3.dat and dc4.dat. To generate EPICS DB's, medm's and alarms use standard procedure described in EPICS: generation of DBs and GUIs for HV.
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")