70
M3i.48xx / M3i.48xx-exp Manual
Commands
Acquisition modes
Acquisition cards status overview
The following drawing gives you an overview of the card commands and card status information. After start of card with
M2CMD_CARD_START the card is acquiring pretrigger data until one time complete pretrigger data has been acquired. Then the status
M2STAT_CARD_PRETRIGGER is set. Either the trigger has been enabled together with the start command or the card now waits for trigger
enable command M2CMD_CARD_ENABLETRIGGER. After receiving this command the trigger engine is enabled and card checks for a trig-
ger event. As soon as the trigger event is received the status changes to M2STAT_CARD_TRIGGER and the card acquires the programmed
posttrigger data. After all post trigger data has been acquired the status changes to M2STAT_CARD_READY and data can be read out:
Generation card status overview
This drawing gives an overview of the card commands and status information for a simple generation mode. After start of card with the
M2CMD_CARD_START the card is armed and waiting. Either the trigger has been enabled together with the start command or the card now
waits for trigger enable command M2CMD_CARD_ENABLETRIGGER. After receiving this command the trigger engine is enabled and card
checks for a trigger event. As soon as the trigger event is received the status changes to M2STAT_CARD_TRIGGER and the card starts with
the data replay. After replay has been finished - depending on the programmed mode - the status changes to M2STAT_CARD_READY and
the card stops.
Data Transfer
Data transfer consists of two parts: the buffer definition and the commands/status information that controls the transfer itself. Data transfer
shares the command and status register with the card control commands and status information. In general the following details on the data
transfer are valid for any data transfer in any direction:
• The memory size register (SPC_MEMSIZE) must be programmed before starting the data transfer.
• Before starting a data transfer the buffer must be defined using the spcm_dwDefTransfer function.
• Each defined buffer is only used once. After transfer has ended the buffer is automatically invalidated.
• If a buffer has to be deleted although the data transfer is in progress or the buffer has at least been defined it is necessary to call the
spcm_dwInvalidateBuf function.
Definition of the transfer buffer
Before any data transfer can start it is necessary to define the transfer buffer with all its details. The definition of the buffer is done with the
spcm_dwDefTransfer function as explained in an earlier chapter.
uint32 _stdcall spcm_dwDefTransfer_i64 (// Defines the transfer buffer by using 64 bit unsigned integer values
drv_handle hDevice, // handle to an already opened device
uint32 dwBufType, // type of the buffer to define as listed below under SPCM_BUF_XXXX
uint32 dwDirection, // the transfer direction as defined below
uint32 dwNotifySize, // number of bytes after which an event is sent (0=end of transfer)
void* pvDataBuffer, // pointer to the data buffer
uint64 qwBrdOffs, // offset for transfer in board memory
uint64 qwTransferLen); // buffer length