xPCI-3009 API
PCI-3009 incremental counter index functions

Functions

_INT_ i_PCI3009_InitIndex (DWORD_ dw_BoardHandle, BYTE_ b_ReferenceAction, BYTE_ b_IndexOperation, BYTE_ b_AutoMode, BYTE_ b_InterruptEnable)
 
_INT_ i_PCI3009_EnableIndex (DWORD_ dw_BoardHandle)
 
_INT_ i_PCI3009_DisableIndex (DWORD_ dw_BoardHandle)
 
_INT_ i_PCI3009_GetIndexStatus (DWORD_ dw_BoardHandle, PBYTE_ pb_IndexStatus)
 
_INT_ i_PCI3009_SetIndexAndReferenceSource (DWORD_ dw_BoardHandle, BYTE_ b_SourceSelection)
 
_INT_ i_PCI3009_InitReference (DWORD_ dw_BoardHandle, BYTE_ b_ReferenceLevel)
 
_INT_ i_PCI3009_GetReferenceStatus (DWORD_ dw_BoardHandle, PBYTE_ pb_ReferenceStatus)
 

Detailed Description

Function Documentation

_INT_ i_PCI3009_InitIndex ( DWORD_  dw_BoardHandle,
BYTE_  b_ReferenceAction,
BYTE_  b_IndexOperation,
BYTE_  b_AutoMode,
BYTE_  b_InterruptEnable 
)

Initialise the index.
If a INDEX flag occur, you have the possibility to clear the 32-Bit counter or to latch
the current 32-Bit value in to the first latch register. The b_IndexOperation parameter
give the possibility to choice the INDEX action. If you have enabled the automatic mode,
each INDEX action is cleared automatically, else you must read the index status
("i_PCI3009_ReadIndexStatus") after each INDEX action.

b_IndexOperation Operation
PCI3009_HIGH_EDGE_CLEAR_COUNTER After a high edge index signal, the counter value is cleared (32-Bit)
PCI3009_HIGH_EDGE_LATCH_COUNTER After a high edge index signal, the counter value (32-Bit) is latched in to the first latch register
PCI3009_LOW_EDGE_CLEAR_COUNTER After a low edge index signal, the counter value is cleared (32-Bit)
PCI3009_LOW_EDGE_LATCH_COUNTER After a low edge index signal, the counter value (32-Bit) is latched in to the first latch register
PCI3009_HIGH_EDGE_LATCH_AND_CLEAR_COUNTER After a high edge index signal, the counter value (32-Bit) is latched in to the first latch register and ceared after this
PCI3009_LOW_EDGE_LATCH_AND_CLEAR_COUNTER After a low edge index signal, the counter value (32-Bit) is latched in to the first latch register and ceared after this
Parameters
[in]dw_BoardHandle: Handle of board PCI-3009
[in]b_ReferenceAction: Determine if the reference must set or no for the acceptance from index
PCI3009_ENABLE : Reference must be set for accepted the index
PCI3009_DISABLE : Reference have not importance
[in]b_IndexOperation: Index operating mode. See table.
[in]b_AutoMode: Enable or disable the automatic index reset.
PCI3009_ENABLE : Enable the automatic mode
PCI3009_DISABLE : Disable the automatic mode
[in]b_InterruptEnable: Enable or disable the interrupt.
PCI3009_ENABLE : Enable the interrupt
PCI3009_DISABLE : Disable the interrupt
Returns
0: No error
-1: The handle parameter of the board is wrong
-2: The module is not a counter module
-3: Counter not initialised see function "i_PCI3009_InitCounter"
-4 The reference action parameter is wrong
-5: The index operating mode parameter is wrong
-6: The auto mode parameter is wrong
-7: Interrupt parameter is wrong
-8: Interrupt function not initialised. See function "i_PCI3009_SetBoardIntRoutineX"
_INT_ i_PCI3009_EnableIndex ( DWORD_  dw_BoardHandle)

Enable the INDEX actions

Parameters
[in]dw_BoardHandle: Handle of board PCI-3009
Returns
0: No error
-1: The handle parameter of the board is wrong
-2: The module is not a counter module
-3: Counter not initialised see function "i_PCI3009_InitCounter"
-4: Index not initialised see function "i_PCI3009_InitIndex"
_INT_ i_PCI3009_DisableIndex ( DWORD_  dw_BoardHandle)

Disable the INDEX actions

Parameters
[in]dw_BoardHandle: Handle of board PCI-3009
Returns
0: No error
-1: The handle parameter of the board is wrong
-2: The module is not a counter module
-3: Counter not initialised see function "i_PCI3009_InitCounter"
-4: Index not initialised see function "i_PCI3009_InitIndex"
_INT_ i_PCI3009_GetIndexStatus ( DWORD_  dw_BoardHandle,
PBYTE_  pb_IndexStatus 
)

Return the index status

Parameters
[in]dw_BoardHandle: Handle of board PCI-3009
[out]pb_IndexStatus: 0 : No INDEX occur
1 : A INDEX occur
Returns
0: No error
-1: The handle parameter of the board is wrong
-2: The module is not a counter module
-3: Counter not initialised see function "i_PCI3009_InitCounter"
-4: Index not initialised see function "i_PCI3009_InitIndex"
_INT_ i_PCI3009_SetIndexAndReferenceSource ( DWORD_  dw_BoardHandle,
BYTE_  b_SourceSelection 
)

Determine the hardware source for the index and the
reference logic. Per default the index logic is
connected to the difference input C and the reference
logic is connected to the 24V input E

Parameters
[in]dw_BoardHandle: Handle of board PCI-3009
[in]b_SourceSelection: PCI3009_SOURCE_0 :
The index logic is connected to the difference input C and
the reference logic is connected to the 24V input E.
This is the default configuration.
PCI3009_SOURCE_1 :
The reference logic is connected to the difference
input C and the index logic is connected to the 24V input E
Returns
0: No error
-1: The handle parameter of the board is wrong
-2: The module is not a counter module
-3: Counter not initialised see function "i_PCI3009_InitCounter"
-4: The source selection is wrong
_INT_ i_PCI3009_InitReference ( DWORD_  dw_BoardHandle,
BYTE_  b_ReferenceLevel 
)

Initialise the reference.

Parameters
[in]dw_BoardHandle: Handle of board PCI-3009
[in]b_ReferenceLevel: Reference level.
PCI3009_LOW : Reference occur if "0"
PCI3009_HIGH : Reference occur if "1"
Returns
0: No error
-1: The handle parameter of the board is wrong
-2: The module is not a counter module
-3: Counter not initialised see function "i_PCI3009_InitCounter"
-4: Reference level parameter is wrong
_INT_ i_PCI3009_GetReferenceStatus ( DWORD_  dw_BoardHandle,
PBYTE_  pb_ReferenceStatus 
)

Return the reference status

Parameters
[in]dw_BoardHandle: Handle of board PCI-3009
[out]pb_ReferenceStatus: 0 : No REFERENCE occur
1 : A REFERENCE occur
Returns
0: No error
-1: The handle parameter of the board is wrong
-2: The module is not a counter module
-3: Counter not initialised see function "i_PCI3009_InitCounter"
-4: Reference not initialised see function "i_PCI3009_InitReference"