How to read the Module.

The SIS 3820 can be readout either as a latching scaler or it can be read out on the fly. This section describes:

On the Fly Readout

Two functions CSIS3820::ReadChannel and CSIS3820::ReadAllChannels can be used to read the module out `on the fly'. On the fly readout is probably not suitable if a very precised synchronized readout of several channels is desired. In that case, it's better to use Latching Readout.

The code sample below shows a sample readscl() function that reads out 32 channels of a scaler whose object is stored in pScaler.

        readscl (UINT32* buffer,int numscalers)
        {
          ...
          pScaler->ReadAllChannels(buffer);
          buffer+= 32;                    // The buffer pointer must advance.
          ...

Alternatively, a channel at a time:

        readscl (UINT32* buffer,int numscalers)
        {
          ...
           for(int i = 0; i < 32; i++) {
             *buffer++ = pScaler->ReadChannel(i);
          }
          ...

Latching Readout.

The scaler can be latched either programmatically, via the CSIS3820::Latch function, or via a hardware latch signal if the input mode has been programmed as one of:

These modes are described in sis3820InputModes.

In either event, it is important not to use CSIS3820::ReadChannel or CSIS3820::ReadAllChannels as these functions read the incrementing counter registers rather than the latched shadow registers. The correct functions to call to read the shadow registers are either CSIS3820::ReadLatchedChannel or CSIS3820::ReadAllLatchedChannels. To force a latch, the CSIS3820::Latch function can be called. If you want to latch and read all channels, the convenience function CSIS3820::LatchAndRead is available.


Generated on Wed Sep 17 08:38:10 2008 for NSCL Device support. by  doxygen 1.5.1