interface your own acquisition software directly with our USB2 interface,
your acquisition software should make the function calls described
below. The USB2 driver functions are in the library file called
"Labview_DLL.dll". (this library file is included with
ActiView). The functions used in the USB2 handshake are:
BOOL USB_WRITE(HANDLE hdevice, PCHAR data);
BOOL READ_MULTIPLE_SWEEPS(HANDLE hdevice,PCHAR data,DWORD nBytesToRead);
BOOL READ_POINTER(HANDLE hdevice,PDWORD pointer);
BOOL CLOSE_DRIVER_ASYNC(HANDLE hdevice);
the USB2 interface"
function OPEN_DRIVER_ASYNC, the output provides a "handle"
parameter, used as an input for further function calls.
the acquisition with initializing the USB2 interface"
USB_WRITE, inputs are "handle" (from step 1) and "data",
use an array of 64 zero bytes for the "data" input.
READ_MULTIPLE_SWEEPS, inputs are "handle" (from
step 1), "data" and "nBytes to read".
Use an initialized buffer of 32 Mbyte (recommended size) as
input for "data" (this is the ringbuffer), and use
the buffersize as input for "nBytes to read" (33554432
is now set to start with the acquisition, and the only thing to
do is to enable the handshake.
again USB_WRITE, inputs are "handle" (from step
1) and "data", this time use an array of 1 byte
of 255 (FF) followed by 63 zero
bytes for the "data" input.
At this moment the handshake with the USB2 interface starts (green
"USB link" LED on receiver switches on), and the ringbuffer
is filled with incoming data from the ActiveTwo. Your acquisition
program should read the proper data for the ringbuffer.
a file pointer"
READ_POINTER to generate a file pointer. Inputs are "handle"
(from step 1), and "pointer (0). Output is a "pointer".
Use this parameter as a file pointer. In our ActiVIEW software,
we have two counters running continuously: one counter tracks
the total of the buffered words, the other counts the total
of words displayed on screen (or written to file). Every time
the difference in the counters exceeds a set amount of words,
this amount of words is displayed on screen or written to
file. The difference between the two counters is the "backlog"
value, as soon as it exceeds the total ringbuffer size, an
overflow error is generated and the program stops.
stop the acquisition you will have to disable the handshake.
USB_WRITE, inputs are "handle" (from step 1) and
"data", use an array of 64 zero bytes for the "data"
the interface drivers should be closed:
CLOSE_DRIVER_ASYNC, input is "handle" (from step
all goes OK, you will receive the following data format from the
of the currently shipped ActiveTwo systems are of the Mk2 version.
This recent version has the option for 24 extra channels, and consequently
a higher data throughput is used. Please refer to the table below,
and also check http://www.biosemi.com/faq/adjust_samplerate.htm:
ActiveTwo sends the following number of 32-bit words per sample:
Speedmode 0 and 4: 258
Speedmode 1 and 5: 130
Speedmode 2 and 6: 66
Speedmode 3 and 7: 34
Speedmode 8: 290 (2+256+32)
Speedmode 0, 1, 2 and 3: 610 (2+4*152)
Speedmode 4: 282
Speedmode 5: 154
Speedmode 6: 90
Speedmode 7: 58
Speedmode 8: 314 (2+280+32)
current ActiView, your software can be made to recognize whether
a Mk1 or Mk 2 is connected by checking bit 23 (MSB) of the trigger/status
channel (channel 2), see http://www.biosemi.com/faq/trigger_signals.htm
receiver converts every 24-bit word from the AD-box into a 32-bit
Signed Integer, by adding an extra zero Least Significant Byte to
the ADC data. The 24-bit ADC output has an LSB value of 1/32th uV.
The 32-bit Integer received for the USB interface has an LSB value
of 1/32*1/256 = 1/8192th uV
Two extra channels
are leading the ADC data: before: channel 1 = sync (check for FFFFFF00)
and channel 2 = Status (see
http://www.biosemi.com/faq/trigger_signals.htm), channels 3-258