This command provides support for the Hytec NADC2530. The NADC2530 is an 8 channel multi-event peak sensing adc. While the module is capable of autonomously creating histograms, this software does not support that capability as it's much easier to treat that module differently if used in that way.
Beginning with the VM-USB readout program verssion 3.2-001, the software tags the ADC data with a user defined virtual slot number, and the module provides a 48 bit timetamp with each event if its firmware revision is 2530V305 or later.
As for all VM-USB module support commands, hytec is a command ensemble with the subcommands
Which creates an object for an NADC2530 adc
which can be referred to by the name name
.
Additional options can provide device configuration.
Which configures the existing device object
name
Which returns the module name
's
configuration as an item list of name value pairs.
Configuration options are described in the OPTIONS section below.
-csr
addressThis option must appear somewhere in the module configuration. It establishes the base address of the module's register space. The NADC 2530 has two address spaces, register space, used to configure and control the module, and memory space where events get stored.
The address
is an A24 address.
this means it must be in the range
0x000000 through 0xffffff.
Each module must have a unique base address, and the address
configured in the software must match the address configured
in the module's address jumpers.
-memory
addressThis option must appear somewhere in the module configuration. It establishes the base address of the module's event buffer memory. Each module's event memory must carve out a unique slice of A32 address space (values between 0x00000000 and 0xffffffff).
The buffer memory address space is software programmable. See the NADC2530 manual for the size of this address space as any overlap can cause corrupted data to be read from the modules.
-ipl
irqlevel
If you are using the module's interrupt to trigger
a stack execution, irqlevel
must
be a nonzero value between 1 and
7, and will be the interrupt priority
level on which the module will generate an iterrupt request.
The value of this parameter defaults to 0
which disables module interrupts. See also the
-vector
option below.
-vector
statusid
If the module is being used to trigger a stack,
statusid
should be the value the
module will use to reply to the interrupt acknowledge cycle's
request for a status/id from the module.
The NADC2530 has a status/id 16 bits wide (between 1 and 65535 where zero disables the interrupt). The VM-USB, however only triggers on the bottom 8 bits of the status id field. therefore you should use values between 1 and 255 unless you are directing the interrupt at other modules in the VME crate.
-lld
millivolts
Provides the low level threshold value in millivolts
.
Due to the resolution of the threshold DAQ, the actual threshold
value programmed may be slightly different than the one requested.
See the manual for the relationship between
millivolts
and threshold DAC values.
-hld
volts
Provides the high level discriminator value in floating
point volts
. Due to the
Due to the resolution of the threshold DAQ, the actual threshold
value programmed may be slightly different than the one requested.
See the manual for the relationship between
volts
and threshold DAC values.
-events
count
Indicates that count
events must
be in the event buffer before an interrupt will be
signalled on the VME backplane. This item also configures
how many events are required for the module to indicate
that it has data. Therefore, if not being used with interrupts,
this value should be programmed to its default value of
1
-id
value
Provides a 16 bit id (virtual slot number) that will be
used to tag the data. The NADC2530 is not capable
of providing a hardware virtual slot number as of firmware
2530V305, therefore the value
is
inserted as a marker word prior to the data from the ADC.
-zerosuppress
on|off
If the value of this parameter is a true boolean, the channels that are outside the high and low level discriminators are not present in the data from the device. If the value is a boolean true, all 8 channels are present in the data.
The example below configures an NADC 2530 with a register base address of 0x400000, and a buffer address of 0x10000000. It leaves the thresholds wide open and does not enable module interrupts. A marker word 0xadc1 is inserted prior to the data, and, if the discriminator levels are later set, data outside of them will be supressed from the data stream.:
Readout prepends the data from the ADC with three additional data words. This section describes what to expect in the event file for this module.
The first word of data from this module will be the value of
the -id
optin. This defaults to zero if
not supplied. This is followed by a mask word, and then a
count word. These two words allow you to determine the number
of longwords of ADC data that follow.
Suppose the mask word is mask and the count word is count. mask & count computes the number of longwords of ADC data that follow in the data packet from this module.
Following these three words, the data from the ADC as shown in section 4.3.1 of the manual is inserted in the event. Note that:
The ADC may convert serveral times for a single channel if multiple signal peaks are detected within the gate time. SpecTcl will only pay attention to the largest of these conversions for a specific channel.
When the system starts up, or if the busy lock out logic is not perfect, and allows gates to go to the ADC when the system is busy, you may see additional events or event fragments. SpecTcl will only pay attention to the data from the first event (it will stop processing channels after the first) trailer word or after the longword count described above is exhausted.
When the system initially starts, there may be a large number of gates prior to the VM-USB completing intialization... depending on when it actually asserts busy. Once more SpecTcl will only histogram the first of these events from the ADC. As subsequent data from the ADC should be synchronized to the IN1 trigger, this should at most affect the first event.
When setting up the SpecTcl parameters for this module, remember that the module provides 9 parameters. The first of these is a 48 bit timestamp. The remaining 8 are the adc parameters. SpecTcl is not able to guess how you want to set up the timestamp spectrum. In general this is not a problem as usuall you will be using the timestamp to generate rate stripchart spectra rather than looking at the timestamp itself.
When looking at SpecTcl timestamp based spectra you may see significant gaps in the time online. This happens because of the way data are sampled to SpecTcl from the online system. SpecTcl may miss complete buffers of data online if it is not able to keep up with the data rate. If you process the event file for that run offline, these gaps disappear.