Difference between revisions of "JLab discriminator"
m (→Scalers readout preliminary driver) |
m (Text replacement - "http://argus.phys.uregina.ca/cgi-bin/public" to "https://halldweb.jlab.org/doc-public") |
||
(5 intermediate revisions by one other user not shown) | |||
Line 11: | Line 11: | ||
[https://clonwiki.jlab.org/wiki/clondocs/Docs/VME16Chan_DiscScaler_Manual_RevC.pdf (pdf)] | [https://clonwiki.jlab.org/wiki/clondocs/Docs/VME16Chan_DiscScaler_Manual_RevC.pdf (pdf)] | ||
− | == | + | == Linux VME support == |
+ | |||
+ | Brian Moffit from CODA group has setup a directory for software for Intel based VME controllers running Linux. README there is a good introduction to the subject. | ||
+ | /site/coda/2.6.1/extensions/linuxvme | ||
+ | RPMs for VME controllers running Linux located in the directory | ||
+ | /site/coda/2.6.1/extensions/linuxvme/RPMS | ||
+ | Available files are: | ||
+ | gefvme-kmod-common-4.1-0.i386.rpm (Development files) | ||
+ | kmod-gefvme-PAE*.rpm (Kernel module) | ||
+ | |||
+ | To install the development RPM without kernel module will require the --nodeps option | ||
+ | rpm -i --nodeps gefvme-kmod-common-4.1-0.i386.rpm | ||
+ | |||
+ | == A simple example program using driver by Brian Moffit == | ||
#include "dsc2.h" | #include "dsc2.h" | ||
Line 25: | Line 38: | ||
} | } | ||
− | == | + | == Installation and usage == |
− | + | The software is part of Hall-D epics configuration. | |
− | + | It could be downloaded using the following command: | |
− | + | svn co https://halldsvn.jlab.org/repos/trunk/controls/epics | |
− | / | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | From there make sure You have these 2 directories. | |
− | + | ||
+ | https://halldsvn.jlab.org/repos/trunk/controls/epics/app/JLabDiscr_subApp | ||
+ | https://halldsvn.jlab.org/repos/trunk/controls/epics/app/iocBoot/iocJLabDiscr_sub | ||
+ | |||
+ | Of course it is better to download the whole epics directory and You'll have the environment configuration and EPICS | ||
+ | If You don't have those directories use svn to check them out (i.e. '''svn co <URL>'''). | ||
+ | Then You should compile using '''make''' command. | ||
== Scalers readout preliminary driver == | == Scalers readout preliminary driver == | ||
+ | |||
+ | There is also document in the DocDB which complements the information here. | ||
+ | It might be downloaded from https://halldweb.jlab.org/doc-public/DocDB/ShowDocument?docid=1877 | ||
=== The current scheme of data flow is the following (from top to down): === | === The current scheme of data flow is the following (from top to down): === | ||
Line 75: | Line 93: | ||
The VALE is a signle scalers of gated reference clock. | The VALE is a signle scalers of gated reference clock. | ||
The VALF is a signle scalers of ungated reference clock. | The VALF is a signle scalers of ungated reference clock. | ||
+ | |||
+ | === Instalation === | ||
+ | |||
+ | <span style="color:red">NOTE: The location of files and installation instructions are subject to change. Check back frequently to check the most up-to-date information.</span> | ||
+ | |||
+ | Files are in the directory and subsequent directories: | ||
+ | /group/halld/Online/controls/epics/app_nerses | ||
+ | ;configure | ||
+ | :place for include make files | ||
+ | ;iocBoot | ||
+ | :Boot configurations for IOC-es | ||
+ | ;iocBoot/iocJLabDiscr_sub | ||
+ | :Boot configuration directory for JLab Discriminator. The boot configuration is in the file st.cmd | ||
+ | ;db | ||
+ | :Installed DB files directory. Original files are from *App/Db directory. | ||
+ | ;dbd | ||
+ | :Installed DBD files directory. Original files are from *App/src directory. | ||
+ | ;bin/linux-x86 | ||
+ | :Installed binaries | ||
+ | ;lib/linux-x86 | ||
+ | :Installed libraries | ||
+ | ;JLabDiscr_subApp/src | ||
+ | :Development source files | ||
+ | ;JLabDiscr_subApp/Db | ||
+ | :Original DB files directory |
Latest revision as of 16:44, 24 February 2017
There is a Hall-B page for JLab discriminator
Contents
Manuals
Manual for 16-Channel Discriminator/Scaler VME Module (by J.Proffit), 20-Nov-2002, in
(pdf)
Manual for New 16-Channel Discriminator/Scaler VME Module (draft by Ben Raydo), 6-Mar-2009, in
(pdf)
Manual for New 16-Channel Discriminator/Scaler VME Module (rev.B by Ben Raydo), 28-May-2010, in
(pdf)
Manual for New 16-Channel Discriminator/Scaler VME Module (rev.C by Ben Raydo), 11-Feb-2011, in
(pdf)
Linux VME support
Brian Moffit from CODA group has setup a directory for software for Intel based VME controllers running Linux. README there is a good introduction to the subject.
/site/coda/2.6.1/extensions/linuxvme
RPMs for VME controllers running Linux located in the directory
/site/coda/2.6.1/extensions/linuxvme/RPMS
Available files are:
gefvme-kmod-common-4.1-0.i386.rpm (Development files) kmod-gefvme-PAE*.rpm (Kernel module)
To install the development RPM without kernel module will require the --nodeps option
rpm -i --nodeps gefvme-kmod-common-4.1-0.i386.rpm
A simple example program using driver by Brian Moffit
#include "dsc2.h" int main(){ vmeOpenDefaultWindows(); /* Map the VME bus memory (For Linux only.). */ dsc2Init(0xe00000,0,1); /* Base memory: Only last 2 HW switches are relevant, the rest are lost due to shift of address. */ /* Memory size per board. */ /* Number of boards. */ dsc2Status(0,0); /* Board number and flag which is not used. */ dsc2PrintScalers(0,0xff);/* Board number and printing option */ return(0); }
Installation and usage
The software is part of Hall-D epics configuration. It could be downloaded using the following command:
svn co https://halldsvn.jlab.org/repos/trunk/controls/epics
From there make sure You have these 2 directories.
https://halldsvn.jlab.org/repos/trunk/controls/epics/app/JLabDiscr_subApp https://halldsvn.jlab.org/repos/trunk/controls/epics/app/iocBoot/iocJLabDiscr_sub
Of course it is better to download the whole epics directory and You'll have the environment configuration and EPICS If You don't have those directories use svn to check them out (i.e. svn co <URL>). Then You should compile using make command.
Scalers readout preliminary driver
There is also document in the DocDB which complements the information here. It might be downloaded from https://halldweb.jlab.org/doc-public/DocDB/ShowDocument?docid=1877
The current scheme of data flow is the following (from top to down):
VME bus |
dsc2.c mutex-ed access to the hardware |
JLabDiscr.c::JLabDiscrReadTask() a separate thread to poll scalers every second and stores them in the memory |
EPICS Scan Task will periodically start a record processing |
JLabDiscr_subrecord.c will copy from memory and push to CA server |
EPICS CA Server will broardcast |
Other supplemental files are:
- JLabDiscr_subMain.cpp -- The standard main program
- JLabDiscr_subConfig.c -- hooks for EPICS
- JLabDiscr_subConfig.dbd, JLabDiscr_subrecord.dbd -- DBD files
- dbJLabDiscr.db -- DB file
The output
The output is accessible via PV hallddisc1:JLabDiscr. It has a type of aSubRecord.
Its INPA field setups the card number (Will be configured once during IOC initilaztion). The VALA is an array of 16 contains scalers of gated triggers. The VALB is an array of 16 contains scalers of gated TDC values. The VALC is an array of 16 contains scalers of ungated triggers. The VALD is an array of 16 contains scalers of ungated TDC values. The VALE is a signle scalers of gated reference clock. The VALF is a signle scalers of ungated reference clock.
Instalation
NOTE: The location of files and installation instructions are subject to change. Check back frequently to check the most up-to-date information.
Files are in the directory and subsequent directories: /group/halld/Online/controls/epics/app_nerses
- configure
- place for include make files
- iocBoot
- Boot configurations for IOC-es
- iocBoot/iocJLabDiscr_sub
- Boot configuration directory for JLab Discriminator. The boot configuration is in the file st.cmd
- db
- Installed DB files directory. Original files are from *App/Db directory.
- dbd
- Installed DBD files directory. Original files are from *App/src directory.
- bin/linux-x86
- Installed binaries
- lib/linux-x86
- Installed libraries
- JLabDiscr_subApp/src
- Development source files
- JLabDiscr_subApp/Db
- Original DB files directory