The vmusb command can be used in the daqconfig configuration file to control the internal reasources of the VM-USB as well as to enable the readout of its pair of scalers. The VM-USB provides two outputs named O1 and O2 as well as a pair of gate and delay generators (DGGA and DGGB), and scalers A and B. Four LEDs round out the resources controlled by this command.
In order to use a vmusb module to configure the controller, you must include it in a stack, even if you are not using reading the scalers in the VM-USB. This is because it is the inclusion of a module in a stack that causes its initialization methods to be invoked, and it is there that teh vmusb module configures its resources.
More information about the VM-USB and its resources can be found in sections 3.4.4 through 3.4.8 and section 1 of the VM-USB manual.
The configuration options are described in the OPTIONS section below.
-nimo1
Determines, along with the options
-inverto1
and
-latcho1
the behavior of NIM
output O1. This can be any of the following values:
busy, trigger, busrequest, eventdatatobuvffer,
dgga, endevent or usbtrigger.
-inverto1
Inverts the sense of the O1 nim output.
-latcho1
Latches the O1 asserted when the condition that asserts it is met.
-nimo2
Along with the options
-inverto2
and
-latcho2
, controls when the NIM
O2 output is asserted. This can be any of:
usbtrigger, vmecommand, vmeas,
eventdataobuffer, dgga, dggb, or
endevent.
-inverto2
Inverts the sense of the NIM O2 output.
-latcho2
Latches the state of the O2 NIM output when the condition that would assert it is met.
-topyellow
Together with -inverttopyellow
and -latchtopyellow
determines
when the top Yellow LED of the VM-USB is lit.
This can be any of the following values:
ofifonotempty, infifonotempy, scaler
infifofull, berr, vmebr, or
vmebg.
-inverttopyellow
Inverts the sense of the top yellow LED.
-latchtopyellow
Latches the top yellow LED in the on state when the condition is met that would light it.
-red
Together with the -invertred
and
-latchred
options controls the
when the red LED on the VM-USB front panel is lit.
This can be one of the following value:
trigger, nimi1, nimi2, busy, dtack, berr, vmebr
or vmebg.
-invertred
Inverts the state of the red LED.
-latchred
Latches the red led on when the condition to light it has been met.
-green
Together with the -invertgreen
and -latchgreen
, determines when
the green LED is lit. This can be one of the following
values:
acquire, stacknotempty, eventready,
trigger, dtack, berr, vmebr or
vmebg.
-invertgreen
Inverts the condition that lights the green LED.
-latchgreen
If true, the green LED is latched in the on state once the condition that would light it is met.
-bottomyellow
Together with -invertbottomyellow
and -latchbottomyellow
determines
when the bottom yellow LED is lit. The value of this
option can be any of the following values:
notslot1, usbtrigger, usbreset, berr, dtack, vmebr
or vmebg.
-invertbottomyellow
Inverts the condition that lights the bottom yellow LED.
-latchbottomyellow
Latches the bottom yellow LED in the lit state once the condition is met to light it.
-readscalers
If this is true the two scalers A and B will
be read by the stack in which the vmusb is
module is put. The A scaler is read first followed
by the B scaler. See -scalera
and -scalerb
below which define
when each scaler increments.
-incremental
This option is ignored unless -readscalers
is true. If -incremental
is true,
scalers are cleared after they are read.
Note that since the VM-USB has no mechanism to
atomically read and clear scalers, counts can be lost
between the read and clear.
-scalera
Determines the condition that increments scaler A. This can be one of the following values: dgga, nimi1, nimi2 or event.
-scalerb
Determines the condition that increments scaler B.
This can be one of the following values:
carry,, nimi1, nimi2 or
event.
The carry value means that
scaler B is incremented when scaler A overflows.
This allows both scalers to be combined into a single
64 bit scaler that is incremented by the condition
defined in the -scalera
option.
-dgga
Determines the condition that causes the signal to be generated by the DGGA device. Options are: off, nimi1, nimi2,trigger, endofevent,usbtrigger, and pulser. The default option is pulser.
-dggb
Determines the condition that causes the signal to be generated by the DGGB device. Options are: off, nimi1, nimi2,trigger, endofevent,usbtrigger, and pulser. The default option is nimi2.
-widtha
Determines the width of the gate produced by dgga in units of 12.5 ns.
-delaya
Determines the amount of time in units of 12.5 ns to delay the gate output of dgga once it has been triggered.
-widthb
Determines the width of the gate produced by dggb in units of 12.5 ns.
-delayb
Determines the amount of time in units of 12.5 ns to delay the gate output of dggb once it has been triggered.
-mixedbuffers
Sets whether scaler and event data can coexist in the same buffer. The default is false.
-spanbuffers
Sets whether event data can span buffer boundaries. Default is false.
-forcescalerdump
If set to true, the VM-USB will immediately output scaler data once a scaler stack is executed. Default is false.
-busreqlevel
Determines the bus request level that the VMUSB will use for itself when it requests ownership of the bus. The valid values are any in the range [0,7] and the default value is 4.
-optionalheader
Determines whether a second optional header word will follow the first buffer header word. When present, this extra header specifies the number of words in the buffer. The default value is false.
-bufferlength
Determines size of the internal buffer used by the VMUSB in units of words. The VMUSB fills the buffer before outputting data on a usb_bulk_read so a smaller buffer size is useful for low data rates. The optional values are: 13k, 8k, 4k, 2k, 1k, 512, 256, 128, 64, and evtcount. The evtcount option depends on the value of the -eventsperbuffer option. The default value is 13k.
-eventsperbuffer
If the -bufferlength option is set to evtcount, this determines how many events must occur before transferring data to the FIFO for readout. The values can be any in the range [1,4095]. The default value is 1.