xPCI-3009 API
PCI-3009 incremental counter frequency measurement functions

Functions

_INT_ i_PCI3009_InitFrequencyMeasurement (DWORD_ dw_BoardHandle, BYTE_ b_TimingUnity, DWORD_ dw_TimingInterval, PDWORD_ pdw_RealTimingInterval)
 
_INT_ i_PCI3009_EnableFrequencyMeasurement (DWORD_ dw_BoardHandle, BYTE_ b_InterruptEnable)
 
_INT_ i_PCI3009_ReadFrequencyMeasurement (DWORD_ dw_BoardHandle, PBYTE_ pb_Status, PBYTE_ pb_UDStatus, PDWORD_ pdw_ReadValue)
 
_INT_ i_PCI3009_DisableFrequencyMeasurement (DWORD_ dw_BoardHandle)
 

Detailed Description

Function Documentation

_INT_ i_PCI3009_InitFrequencyMeasurement ( DWORD_  dw_BoardHandle,
BYTE_  b_TimingUnity,
DWORD_  dw_TimingInterval,
PDWORD_  pdw_RealTimingInterval 
)

Sets the time for the frequency measurement.
Configures the selected TOR incremental counter.
The dw_TimingInterval and ul_TimingUnity determine the time base for the measurement.
The pdw_RealTimingInterval returns the real time value. You must call up this function before
you call up any other function which gives access to the frequency measurement.

Parameters
[in]dw_BoardHandle: Handle of board PCI-3009
[in]b_TimingUnity: Base time unit (0 to 2)
0 : ns
1 : ęs
2 : ms
[in]dw_TimingIntervalBase time value.
[out]pdw_RealTimingInterval: Real base time value.
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: Timing unity selection is wrong
-5: Base timing selection is wrong
_INT_ i_PCI3009_EnableFrequencyMeasurement ( DWORD_  dw_BoardHandle,
BYTE_  b_InterruptEnable 
)

Enables the frequency measurement function

Parameters
[in]dw_BoardHandle: Handle of board PCI-3009
[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: Frequency measurement logic not initialised. See function "i_PCI3009_InitFrequencyMeasurement"
-5: Interrupt parameter is wrong
-6: Interrupt function not initialised.
_INT_ i_PCI3009_ReadFrequencyMeasurement ( DWORD_  dw_BoardHandle,
PBYTE_  pb_Status,
PBYTE_  pb_UDStatus,
PDWORD_  pdw_ReadValue 
)

Returns the status (pb_Status) and the number of increments in the set time.
See function "i_PCI3009_InitFrequencyMeasurement"

Parameters
[in]dw_BoardHandle: Handle of board PCI-3009
[out]pb_Status: Returns the frequency measurement status
0 : Counting cycle not started.
1 : Counting cycle started.
2 : Counting cycle stopped. The measurement cycle is completed.
[out]pb_UDStatus: 0 : Counter progress in the selected mode down
1 : Counter progress in the selected mode up
[out]pdw_ReadValue: Return the number of increments in the defined time base.
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: Frequency measurement logic not initialised. See function "i_PCI3009_InitFrequencyMeasurement"
_INT_ i_PCI3009_DisableFrequencyMeasurement ( DWORD_  dw_BoardHandle)

Disables the frequency measurement function

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: Frequency measurement logic not initialised. See function "i_PCI3009_InitFrequencyMeasurement"