APCI-3660 API  1719
xPCI3660 Sequence functions

Functions

int i_APCI3660_InitAndStartSequenceAcquisition (uint8_t boardId, uint32_t dw_SequenceMode, uint32_t dw_Mask, uint32_t dw_TriggerMask, uint32_t dw_GateMask, uint32_t dw_BufferSize, uint32_t dw_SizeToTransfer, uint32_t dw_CompareSize)
 
int i_APCI3660_GetFirmwareVersion (uint8_t boardId, uint32_t *version)
 
int i_APCI3660_GetEPCSIdentifier (uint8_t boardId, uint32_t *identifier)
 
int i_APCI3660_EraseEPCS (uint8_t boardId)
 
int i_APCI3660_ReloadEPCS (uint8_t boardId)
 
int i_APCI3660_EnableEPCSWrite (uint8_t boardId, uint8_t enable)
 
int i_APCI3660_EnableEPCSRead (uint8_t boardId, uint8_t enable)
 
int i_APCI3660_GetEPCSStatus (uint8_t boardId, uint8_t *status)
 
int i_APCI3660_WriteEPCSByte (uint8_t boardId, uint8_t data)
 
int i_APCI3660_ReadEPCSByte (uint8_t boardId, uint8_t *data)
 

Detailed Description

Function Documentation

◆ i_APCI3660_InitAndStartSequenceAcquisition()

int i_APCI3660_InitAndStartSequenceAcquisition ( uint8_t  boardId,
uint32_t  dw_SequenceMode,
uint32_t  dw_Mask,
uint32_t  dw_TriggerMask,
uint32_t  dw_GateMask,
uint32_t  dw_BufferSize,
uint32_t  dw_SizeToTransfer,
uint32_t  dw_CompareSize 
)

Init and Start sequence acquisition

Parameters
[in]boardIdTarget board index
[in]dw_SequenceModeSequence mode :
  • Bit 0 (Compatibility old drivers) : 0 -> Disabled, 1 -> Enabled
    • 0 -> Disabled, means that a word is present at the begining of each packet to tell which data are in the packet, this allows to only get Chronometer for example
    • 1 -> Enabled, means that the data are coming related to an ADC.
  • Bit 1 (Start/Stop gate) (The bit 31 is set to tell if gate is high or low)
    • 0 -> Disabled, data are stored with gate but when the gate becomes low no interrupt are generated with the last data,
    • 1 -> Enabled, data are stored with gate but when the gate becomes low an interrupt will be generated with the last data
[in]dw_MaskMask of channels to acquire
  • Bit 0 : ADC0 Left
  • Bit 1 : ADC0 Right
  • Bit 2 : Chrono / Incremental counter 0
  • Bit 3 : ADC1 Left
  • Bit 4 : ADC1 Right
  • Bit 5 : Chrono / Incremental counter 1
  • Bit 6 : ADC2 Left
  • Bit 7 : ADC2 Right
  • Bit 8 : Chrono 2
  • Bit 9 : ADC3 Left
  • Bit 10 : ADC3 Right
  • Bit 11 : Chrono 3
  • Bit 12 : Digital inputs/outputs
  • Bit 13 : Additional data (see SetAdditionalData function)
[in]dw_TriggerMask(only one bit is selectable)
  • Bit 0 : ADC0
  • Bit 1 : ADC1
  • Bit 2 : ADC2
  • Bit 3 : ADC3
  • Bit 4 ->11 : Rising edge digital inputs
  • Bit 12->19 : Falling edge digital inputs
[in]dw_GateMask
  • Bit 0 : Digital input 4
  • Bit 1 : Digital input 5
  • Bit 2 : Digital input 6
  • Bit 3 : Digital input 7
  • Bit 4 : Chrono / Incremental counter 0
  • Bit 5 : Chrono / Incremental counter 1
  • Bit 6 : Chrono 2
  • Bit 7 : Chrono 3
[in]dw_BufferSizeRAM buffer size on the board, must be a multiple of 4 (in Bytes)
[in]dw_SizeToTransferSequence size to transfer (in Bytes)
[in]dw_CompareSizeEach time dw_CompareSize is acquired an interrupt is generated to read the data (in Bytes)
Return values
0No error
-1The boardId parameter is wrong
-2The dw_SequenceMode parameter is wrong
-3The dw_Mask parameter is wrong
-4The dw_TriggerMask parameter is wrong
-5Only one trigger can be selected at once
-6The dw_GateMask parameter is wrong
-7The dw_CompareSize cannot be greater than or equal to the bufferSize
-8Cannot find a buffer on the board <<<<<<<
-9Cannot abort ongoing DMA (need to restart the computer)
Sequence data layout
Header (8bits) Data (24bit)
Gate(31 - 28) ADC Info (27-24)
Gate 3 Gate 2 Gate 1 Gate 0 ADC0 Left:000; ADC0 right:001; ADC1 Left:010; ADC1 right:011; ADC2 Left:100; ADC2 right:101; ADC3 Left:110; ADC3 right:111; ADC Overflow

data

>>>>>>>

◆ i_APCI3660_GetFirmwareVersion()

int i_APCI3660_GetFirmwareVersion ( uint8_t  boardId,
uint32_t *  version 
)

i_APCI3660_GetEPCSIdentifier function to get the identifier of the firmware.

Parameters
[out]Version: D4-31 : Firmware Revision D4 to D10 : Low Version (ASC) D11 to D17 : High Version (ASC) D18 to D24 : Version Type low (ASC) for standard (ā€œVā€) D25 to D31 : Version Type high (ASC) for standard (ā€œSā€)
Return values
0No error
-1The boardId parameter is wrong

◆ i_APCI3660_GetEPCSIdentifier()

int i_APCI3660_GetEPCSIdentifier ( uint8_t  boardId,
uint32_t *  identifier 
)

◆ i_APCI3660_EraseEPCS()

int i_APCI3660_EraseEPCS ( uint8_t  boardId)

◆ i_APCI3660_ReloadEPCS()

int i_APCI3660_ReloadEPCS ( uint8_t  boardId)

◆ i_APCI3660_EnableEPCSWrite()

int i_APCI3660_EnableEPCSWrite ( uint8_t  boardId,
uint8_t  enable 
)

◆ i_APCI3660_EnableEPCSRead()

int i_APCI3660_EnableEPCSRead ( uint8_t  boardId,
uint8_t  enable 
)

◆ i_APCI3660_GetEPCSStatus()

int i_APCI3660_GetEPCSStatus ( uint8_t  boardId,
uint8_t *  status 
)

◆ i_APCI3660_WriteEPCSByte()

int i_APCI3660_WriteEPCSByte ( uint8_t  boardId,
uint8_t  data 
)

◆ i_APCI3660_ReadEPCSByte()

int i_APCI3660_ReadEPCSByte ( uint8_t  boardId,
uint8_t *  data 
)