Bank NEMS


                
                NEMS  NCD Event MuxScope Record
                ===============================

    Contact:  N. West, Oxford.

    Revision History:-
    ================

    5.00  N. West      First version
          A. Hallin    Add calibration constants.
          A. Cox       Changed PREAMPCHARGE -> PREAMPRCFACTOR. STARTPOS -> TIMEDELAY.
    5.01  A. Cox       Add SCOPEOFFSET
    5.02  G. Prior     Updated KNEMS_OS information

Description
-----------

This bank contains the Mux - Oscilloscope data and waveform for one channel.

This bank comes from the NCD Multiplexer, Scope Time and Scope records.

This bank maps to QMuxScope.


Reference Links
---------------

    None.


Structural Links
----------------

    None.

Status Bits
-----------

Note: Any status bit parameters are defined to work with bit functions such as
      IAND and BTEST.

Data Words
----------

    Data types: B(bit), I, F, D(double), H(hollerith 4 char)

 +1  I KNEMS_STATUS  3-bit flag.      Meaning if bit set:-  See Note 1.
                                        B0  Is associated with its parent NEMG Global Mux Record
                                        B1  Contains data from the Multiplexer Record 
                                                 => words _MUX .. _BOX are defined.
                                        B2  Contains data from the Scope/Scope Time records
                                                 => words _CLK  .. are defined

	The following come from the  Multiplexer Record

 +2  I KNEMS_MUX_CHAN                 Channels that fired (12-bit hit register)
 +3  I KNEMS_OS                       Oscilloscope Number 
                                        or = -1 if both scopes busy from previous events
 +4  I KNEMS_MUX_BUS                  Mux Controller Board Bus number.          

       The following come from the    NQxx banks.

 +5  I KNEMS_MUX_BOX                  Mux Box number. or:-
                                        -2  Undefined
                                        -1  Multiply defined (hardware error?)
 +6  I KNEMS_NCDSTRING                NCD string number.
                                        -2  Undefined
                                        -1  Multiply defined
 +7  I                                Spare.
 +8  I                                Spare.

         The following come from the  Scope Time Record

 +9  D KNEMS_CLK                      Clock in ticks (first word)
 +10                                  Second word.
 +11 I KNEMS_REG                      Latch register id (0-4).

       The following come from the  Scope Record

 +12 I KNEMS_OS_LEN                   Length of waveform (in bytes)
 +13 I KNEMS_OS_CHAN                  Oscilloscope channel.

       The following come from the NCLA bank. See Note 2.

 +14 F KNEMS_LOGAMPPARAM_A            NCLA calibration constant.
 +15 F KNEMS_LOGAMPPARAM_B              "       "         "
 +16 F KNEMS_LOGAMPPARAM_C              "       "         "
 +17 F KNEMS_LOGAMPPREAMPRCFACTOR       "       "         "
 +18 F KNEMS_LOGAMPTIMEDELAY            "       "         "
 +19 F KNEMS_SCOPEOFFSET                "       "         " 

 +20 F                                 Spare

 +21 I KNEMS_WAVE     Byte packed waveform (4 bytes per word).
...

Notes
-----

1).  The EV bank contains 2 NEMG links:-

   -29 -KEV_NEMG_PAR  NEMG  Partial  -  Not every supported NEMS has KNEMS_STATUS == 7
   -28 -KEV_NEMG      NEMG  Complete -  Every supported NEMS has KNEMS_STATUS == 7.

Normal NCD events will have one entry on -KEV_NEMG and nothing on -KEV_NEMS_PAR. 
In abnormal conditions (i.e. un-matched Mux or Scope records) will there be banks on 
entry -KEV_NEMG_PAR but in this case -KEV_NEMG will be empty i.e only if everything
looks good will there be data on -KEV_NEMG.

2) The Calibration constants are obtained from the NCLA bank. This is a "logical" calibration - we get the calibration constants and store them with the data. We would make calibrated waveforms, but save space by storing the constants that can derive them from the packed waveform.


Go Back to the Snoman Companion Top Page