WIENER, Plein & Baus GmbH
24
www.wiener-d.com
(iii)
BLT and multi-BLT READ is valid only for A32 offsets of 0x100, 0x200, and
0x300 (the waveform FIFOs).
Sample command stacks are illustrated in Appendix X.
5.3.2
Using libxxusb.dll dynamic link library functions
VM-DBA recognizes only USB packets declaring in their header interactive stack execution.
These are generated by two library functions, xxusb_stack_execute and
xxusb_longstack_execute.
xxusb_stack_execute function
The xxusb_stack_execute function first, sends a buffer to XX-USB, causing the latter to
interprete its content as a series of simple and complex VME commands and to actually
execute these commands and to write the returned VME data to the USB port FIFO. Then,
xxusb_stack_execute reads a buffer from XX-USB, containing the desired VME data.
In the case of VM-DBA passes WRITE data to the registers or utility FIFO or returns the
READ data from the registers or the waveform FIFOs to the USB interface.
WORD xxusb_stack_execute{
HANDLE hDevice,
LPDWORD lpData,
};
Parameters
hDevice
[in] Handle to the XX-USB device.
lpData
[in] Pointer to a dual-use variable array. When calling the function, the array contains
the data encoding the sequence of desired commands (VME commands for VM-USB
and VME commands for VM-USB) to be performed by XX-USB. The first element of
the array is the number of bytes. The following command has to be defined similar to
the VME / VME command stack (see paragraph 4.5). Upon return, the array contains
the VME (VM-USB) or VME (VM-USB) data, respectively.
Return Values
On success, the function returns the number of bytes read from XX-USB. The valid value is
twice the number of 16-bit data words returned plus 2 (CC-USB) or 4(VM-USB). The latter
“overhead” bytes contain event terminator word (0xFF for VM-USB, and 0xFFFF for VM-
USB).
Function returns a negative number on a failure.