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.
Determines, along with the options
-latcho1 the behavior of NIM
output O1. This can be any of the following values:
busy, trigger, busrequest, eventdatatobuvffer,
dgga, endevent or usbtrigger.
If not explicitly programmed, this defaults to busy.
Inverts the sense of the O1 nim output. By default this is false.
Latches the O1 asserted when the condition that asserts it is met. By default this is false.
Along with the options
-latcho2, controls when the NIM
O2 output is asserted. This can be any of:
usbtrigger, vmecommand, vmeas,
eventdataobuffer, dgga, dggb, or
By default this is vmeas which reflects the VME address strobe line.
Inverts the sense of the NIM O2 output. This is false by default.
Latches the state of the O2 NIM output when the condition that would assert it is met. This is false if not explicitly programmed.
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
If not explicitly programmed, this will default to ofifonotempty, that is lit when there is data in the output fifo.
Inverts the sense of the top yellow LED. Defaults to false.
Latches the top yellow LED in the on state when the condition is met that would light it. Defaults to false.
Together with the
-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
If not explicitly programmed, this defaults to busy, and is therefore lit when the VMUSB is busy.
Inverts the state of the red LED. Defaults to false
Latches the red led on when the condition to light it has been met. Default value is false.
Together with the
-latchgreen, determines when
the green LED is lit. This can be one of the following
acquire, stacknotempty, eventready,
trigger, dtack, berr, vmebr or
If not explicitly configured, this defaults to acquire.
Inverts the condition that lights the green LED. Defaults to false
If true, the green LED is latched in the on state once the condition that would light it is met. If not configured defaults to false.
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
If not explicitly configured, defaults to dtack. This is the VME bus Data Transfer Acknowledge signal that target modules use to indicate that a transfer operation is complete.
Inverts the condition that lights the bottom yellow LED. Defaults to false if ot explicitly configured.
Latches the bottom yellow LED in the lit state once the condition is met to light it. Defaults to false.
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
-scalerb below which define
when each scaler increments.
By default, the value of this option is false, meaning the scalers will not be read.
This option is ignored unless
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.
By default this is true. If you plan to use the VMUSB scaler(s) as a timestamp, you must set this to false.
Determines the condition that increments scaler A. This can be one of the following values: dgga, nimi1, nimi2 or event.
By default, this value is nimi2, causing this scaler to be incremented on an external pulse plugged into the IN2 input.
Determines the condition that increments scaler B.
This can be one of the following values:
carry,, nimi1, nimi2 or
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
By default this option is carry making Scaler B the high order bits of a 64 bit scaler with Scaler A the low order bits.
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.
By default, the value of this option is pulser, starting DGGA on the internal pulser.
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.
By default, this option is nimi2 starting DGGB when an input pulse is received on the IN2 input.
Determines the width of the gate produced by dgga in units of 12.5 ns. This defaults to 1 giving a 12.5ns gate width.
Determines the amount of time in units of 12.5 ns to delay the gate output of dgga once it has been triggered. Defaults to 0, no delay between the start and the gate output.
Determines the width of the gate produced by dggb in units of 12.5 ns. This defaults to 1 resulting in a 12.5ns output pulse.
Determines the amount of time in units of 12.5 ns to delay the gate output of dggb once it has been triggered. By default this is 0; no delay between start and gate output.
Sets whether scaler and event data can coexist in the same buffer. The default is false.
false by default.
Sets whether event data can span buffer boundaries. Default is false.
If set to true, the VM-USB will immediately output scaler data once a scaler stack is executed. Default is false. By default this is false
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.
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. This is false by default.
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.
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.