spec

Software for Diffraction

c400

FMB Oxford C400

DESCRIPTION

The C400 Quad Pulse Counter/Detector Controller is four-channel counter/timer made by Pyramid Technical Consultants and distributed by FMB Oxford. spec uses the ASCII communication protocol available currently only on the serial interface and requires the controller have recent firmware (7.27.84 or later).

The C400 can be used with spec as counters gated by an external master timer or as a master timer when counting to a time preset. The hardware does not currently support counting to a monitor preset.

In addition, spec allows programming of the C400 parameters for the high voltage output, the analog voltage output and the input discriminator levels associated with each of the four channels.

CONFIGURATION

The C400 is configured on the Devices screen along the following lines.

SCALERS       DEVICE  ADDR  <>MODE  NUM                      <>TYPE
    YES   /dev/ttyS0    <>  115200    5 C400 Counter/Timer (Serial)
    YES /dev/ttyUSB0    <>  115200    5 C400 Counters Only (Serial)

The default baud rate for the C400 is 115200. The number of channels is set to five, as in addition to the four counter channels, there is a channel allocated for the elapsed time. When selected as "Counters Only", the C400 should have the external gate enabled and be hardware gated by another timer.

On the Scaler screen, choose C400 as the device type.

Scaler (Counter) Configuration

Num      Name  Mne  <>Device Unit Chan  <>Use As  Scale Factor
  0   Seconds  sec      C400    0    0  timebase             1
  1     Chan1   c1      C400    0    1   counter             1
  2     Chan2   c2      C400    0    2   counter             1
  3     Chan3   c3      C400    0    3   counter             1
  4     Chan4   c4      C400    0    4   counter             1

The timebase channel should be assigned channel number zero. The remaining channels are 1 through 4. The scale factor for the timebase is ignored, as it is fixed in the C code.

FUNCTIONS

The following counter_par() options are available. The first group are associated with the entire controller. The mne argument identifies the controller.

counter_par(mne, "send", message)
Sends the string message to the C400 associated with the counter mne. If the message generates a response, use the "read" option below.
counter_par(mne, "read", message)
Sends the string message to the C400 associated with the counter mne and returns the response.
counter_par(mne, "dump")

Displays the raw responses for all the queryable parameters for the C400 associated with mne in a format as follows:

      CONF:ACCUM = 1
        CONF:DAC = 0.0000e+00 V,0.0000e+00 V,0.0000e+00 V,0.0000e+00 V
       CONF:DEAD = 0
        CONF:DHI = 2.0000e+00 V,2.0000e+00 V,5.0000e+00 V,2.0000e+00 V
        CONF:DLO = 5.0000e-02 V,5.0000e-02 V,2.0000e+00 V,5.0000e-02 V
   CONF:HIVO:SUP = -2000 V,-2000 V,-2000 V,-2000 V
   CONF:HIVO:VOL = -1.0000e+00 V,-2.0000e+00 V,-3.0000e+00 V,-4.0000e+00 V
    CONF:HIVO:EN = 0,0,0,0
        CONF:PER = 1.0000e-04 S
        CONF:POL = P,P,P,P
       CONF:PULS = 100000 ns,30 ns
        TRIG:BUF = 10000
        TRIG:BUR = 0
       TRIG:MODE = INTernal
        TRIG:POL = 0
 TRIG:SOUR:START = INTernal
  TRIG:SOUR:STOP = INTernal
 TRIG:SOUR:PAUSE = INTernal
SYST:COMM:IPMODE = DHCP
    SYST:COMM:IP = 192.168.100.20
   SYST:COMM:NET = 255.255.255.0
  SYST:COMM:GATE = 192.168.100.1
   SYST:COMM:LOG = 0.0.0.0
  SYST:ERR:COUNT = 2
     SYST:SERIAL = 0000001773
       SYST:VERS = 1999.0

Values for any of these parameters can be queried or set using the command pass through options "read" and "send" above. Changing the "TRIG" parameters or the "CONF:ACCUM" or "CONF:PER" parameters can interfere with spec's operation of the counter. Other parameters of interest can be changed using the following commands.

counter_par(mne, "deadtime" [, value])
Sets or returns the deadtime correction to be applied to the incoming counts for all four channels on the C400 associated with the counter mne. The units are nanoseconds.
counter_par(mne, "gate_enable" [, 1|0])
Sets or returns whether or not to use an external gate for the C400 associated with counter mne. The external gate feature is only available when the controller is configured as "Counters Only" (as opposed to "Counter/Timer") in the configuration editor. When enabled, TRIG:MODE is set to EXTERNAL_START_STOP. TRIG:SOUR:START and TRIG:SOUR:STOP are set to BNC.
counter_par(mne, "gate_polarity" [, 1|0])
Sets or returns the gate polarity for the C400 associated with counter mne. A value of 0 gates on the rising edge. A value of 1 gates on the falling edge. The setting is only meaningful when the external-gate mode is enabled.
counter_par(mne, "dac" [, value])
Sets or returns the value for the analog output associated with channel mne. The units are volts.
counter_par(mne, "disc_high" [, value])
Sets or returns the discriminator high level in volts for the channel associated with mne. The sign is configured with "disc_polarity" below and ignored here. Note, the value set must be higher than the current "disc_low" setting. The units are in volts.
counter_par(mne, "disc_low" [, value])
Sets or returns the discriminator low level in volts for the channel associated with mne. The sign is configured with "disc_polarity" below and ignored here. Note, the value set must be lower than the current "disc_high" setting. The units are in volts.
counter_par(mne, "disc_polarity" [, value])
Sets or returns the discriminator polarity for the channel associated with counter mne. Return values are the strings negative or positive.
counter_par(mne, "HV_enable" [, 1|0])
Sets or returns whether the high voltage output is enabled for the channel associated with counter mne. Units are in volts.
counter_par(mne, "HV_max" [, value])
Sets or returns the maximum high voltage value setting allowed by the C400 firmware. Units are in volts.
counter_par(mne, "HV" [, value])
Sets or returns the current high voltage setting. Units are in volts.