Difference between revisions of "JLab discriminator"

From GlueXWiki
Jump to: navigation, search
m (Scalers readout preliminary driver)
(Scalers readout preliminary driver)
Line 47: Line 47:
 
| style="border-style: solid; border-width: 1px 1px 1px 1px" | dsc2.c <br/ > mutex-ed access to the hardware
 
| style="border-style: solid; border-width: 1px 1px 1px 1px" | dsc2.c <br/ > mutex-ed access to the hardware
 
|-
 
|-
| style="border-style: solid; border-width: 1px 1px 1px 1px" | JLabDiscr.c::JLabDiscrReadTask() <br/ > a thread to poll scalers every second
+
| style="border-style: solid; border-width: 1px 1px 1px 1px" | JLabDiscr.c::JLabDiscrReadTask() <br/ > a thread to poll scalers every second <br/ > and stores them in the memory
 
|-
 
|-
 
|}
 
|}
 +
 +
 
{| style="color:blue; background-color:#ffffcc;" cellpadding="10" cellspacing="0" border="1px"
 
{| style="color:blue; background-color:#ffffcc;" cellpadding="10" cellspacing="0" border="1px"
 
| style="border-style: solid; border-width: 1px 1px 1px 1px" | EPICS Scan Task <br/ > will periodically start a record processing
 
| style="border-style: solid; border-width: 1px 1px 1px 1px" | EPICS Scan Task <br/ > will periodically start a record processing
Line 57: Line 59:
 
| style="border-style: solid; border-width: 1px 1px 1px 1px" | EPICS CA Server will broardcast
 
| style="border-style: solid; border-width: 1px 1px 1px 1px" | 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

Revision as of 17:46, 5 December 2011

There is a Hall-B page for JLab discriminator

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)

Example Program

#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);
}

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

Scalers readout preliminary driver

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 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