Struck STR7201 Device Device Support for the MCA Record

Mark Rivers

Contents

Overview

This device support works with both the Struck STR7201 and the SIS3801 VME modules. The STR7201 is a module previously manufactured by Struck, and now by Bastian, which bought out Struck. The SIS modules are manufactured by SIS, which is a new company run by former Struck employees. Both are a VME modules with 32 (Struck 7201 and SIS3801) or 8 (SIS3808)) scaler input channels. In this document the term STR7201 includes all of the above modules, except where explicitly noted. Each input can count at 100MHz or 200MHz depending on model. It has an external channel advance input (called Next) which causes the the current scaler values to be copied to a FIFO, clears the scalers and resumes counting. The scalers are implemented in a dual-bank design, so that the switching time is less than 4 nsec.

The device support for the MCA record is written to support the use of the STR7201 as a multichannel scaler. Up to 32 records can be connected to each unit, each record corresponding to one of the signal inputs.

The STR7201 hardware itself is not a multichannel scaler in the conventional sense, since it simply contains a FIFO of scaler counts, rather than an array of memory locations which hold the counts for each dwell cycle. The device support for the STR7201 simulates a conventional MCS by allocating a memory buffer which contains the counts in each dwell period. The device support copies the counts from the FIFO to this memory buffer.

Each FIFO word contains the counts for one input signal for one dwell period. Available FIFO chips can hold from 2K to 32K words. The FIFO can thus buffer anywhere from 64 dwell cycles (32 active inputs, 2K FIFO) to 32,768 dwell cycles (1 active input, 32K FIFO). The minimum dwell time is in the range .5-4 microseconds, depending upon the number of active inputs.  VME interrupts are implemented, so that FIFO readout is done automatically when the FIFO is half full. Even with interrupts there is a possibility of FIFO overflow with very short dwell times and small FIFO sizes. Users whose applications require short dwell times and a large number of active inputs should purchase large FIFO chips to prevent this. The FIFO chip can be replaced in the field. The device support determines the FIFO size automatically.

Hardware Configuration

Jumper J600 on the board must be set to select LCA file 2 (STR7201 Design 1) or LCA file 3 (STR7201 Design 2). With Design 1 selected the scalers are 32 bits wide. With Design 2 selected the scalers are 24 bits wide, and the upper 8 bits of each data word contain information on the channel number, bank, and 2 user bits. The channel number and bank information are redundant since the device support sorts the FIFO output by channel number when copying the data to the buffer and then to the MCA record. However, some applications may want to use the 2 user bits which are latched with each Next cycle, and Design 2 may be selected for those applications.

The device support requires that the board be configured for VME A32 addressing, so jumper EN_A32 must be in place. Address selection is done with jumper J_A11, and switches SW_A32U, SW_A32L, SW_A24 and SW_A16. The software default address is 0xA0000000. Note that the factory-default address of 0x33508000 cannot be used with the APS version of the vxWorks board support package since this part of the VME A32 address space is not accessible. Each board takes up 2K bytes of A32 address space, so systems with multiple cards must configure card N at base address + 2K*N. For example, if using the default base address of 0xA0000000 the second card would be set to address 0xA00000800 (jumper J_A11 removed).

The device support software configures the control inputs in Mode 2, which means:

MCA Record Support

The device support for the STR7201 defines the INP field to be type VME_IO, and uses the normal "card" and "signal" conventions. A card is a single STR7201 module. Each module supports up to 32 signals (0-31), corresponding to the 32 inputs. Each MCA record is connected to one of these signal inputs.

The STRT, STOP and ERAS fields act on all records which are connected to a particular card. Thus it is only necessary to issue these commands to one record in order to start, stop or erase all other records.

Acqusition will be stopped for all records connected to a particular card whenever one or more of the following conditions is satisfied:

The CHAS field allows selecting internal or external channel advance.

The SEQ field is not implemented, since the device inherently has a fast time axis.

The DWEL field allows selecting the dwell time per channel when using internal channel advance.

The PSCL field allows selecting a pre-scale factor when using the external channel advance.

The MODE field is not implemented, since the STR7201 can only operate in MCS mode.

Scaler Record Support

In addition to support for the MCA record, the driver supports the EPICS scaler record. Switching between scaler mode and MCA mode is handled automatically. It is important, however, that when acquiring in one mode that acquisition be allowed to complete before starting acquisition in the other mode. It is also important when acquiring in MCA mode to disable AutoCount in scaler mode, or else the MCA acquisition may be interrupted.

vxWorks Startup Script

The mca/iocBoot/iocVxWorks contains example vxWorks startup scripts for the SIS3801/STR7201.

There are 2 functions which are intended to be called from the vxWorks startup script before iocInit.


Suggestions and comments to: Mark Rivers : (rivers@cars.uchicago.edu)