xPCI-3009 API
PCI-3009 Chronos initialisation functions

Functions

_INT_ i_PCI3009_InitChrono (DWORD_ dw_BoardHandle, BYTE_ b_ChronoMode, BYTE_ b_TimingUnit, DWORD_ dw_TimingInterval, PDWORD_ pdw_RealTimingInterval)
 
_INT_ i_PCI3009_EnableChrono (DWORD_ dw_BoardHandle, BYTE_ b_CycleMode, BYTE_ b_InterruptEnable)
 
_INT_ i_PCI3009_DisableChrono (DWORD_ dw_BoardHandle)
 

Detailed Description

Function Documentation

_INT_ i_PCI3009_InitChrono ( DWORD_  dw_BoardHandle,
BYTE_  b_ChronoMode,
BYTE_  b_TimingUnit,
DWORD_  dw_TimingInterval,
PDWORD_  pdw_RealTimingInterval 
)

Configure the chronometer operating mode (b_ChronoMode)
The dw_TimingInterval and dw_TimingUnit determine the timing base for the measurement.
The pdw_RealTimingInterval return the real timing value.
You must calling this function be for you call any other function witch access of the chronometer.

Witch this functionality from the xPCI-3009 you have the possibility to measure the timing witch two event.

The mode 0 and 1 is appropriate for period measurement.
The mode 2 and 3 is appropriate for frequent measurement.
The mode 4 to 7 is appropriate for measuring the timing between two events.

Parameters
[in]dw_BoardHandle: Handle of board PCI-3009
[in]b_ChronoMode: Chronometer action mode (0 to 7).

Mode Function of signal C Function of signal D
0 The high level starts the time measuring.
The low level stopsthe time measuring.
Not used
1 The low level starts the time measuring.
The high level stopsthe time measuring.
Not used
2 The high level starts the time measuring.
The next high level stops the time measuring.
Not used
3 The low level starts the time measuring.
The next low level stops the time measuring.
Not used
4 The high level starts the time measuring. The high level stops the time measuring.
5 The low level starts the time measuring. The low level stops the time measuring.
6 The high level starts the time measuring. The low level stops the time measuring.
6 The low level starts the time measuring. The high level stops the time measuring.

[in]b_TimingUnit: Base timing unity (0 to 4)
0 : ns
1 : µs
2 : ms
3 : s
4 : mn
[in]dw_TimingInterval: Base timing value.

b_TimeUnit dw_TimeInterval min vale dw_TimeInterval min vale
0 (ns) 50 4294967295
1 (micro s) 1 107374182
2 (ms) 1 107374
3 (s) 1 107
4 (mn) 1 2

[out]pdw_RealTimingInterval: Real base timing value.
Returns
0: No error
-1: The handle parameter of the board is wrong
-2: The module is not a Chronometer module
-3: Chronometer mode selection is wrong
-4: Timing unity selection is wrong
-5: Base timing selection is wrong
_INT_ i_PCI3009_EnableChrono ( DWORD_  dw_BoardHandle,
BYTE_  b_CycleMode,
BYTE_  b_InterruptEnable 
)

Enable the chronometer. You must calling the "i_PCI3009_InitChrono" function be for you call this function.
If you enable the chronometer interrupt, the chronometer generate a interrupt after the stop signal.
See function "i_PCI3009_SetBoardIntRoutine" and the Interrupt mask description chapter from this manual.
The b_CycleMode parameter determine if you will measured a single or more cycle.

Parameters
[in]dw_BoardHandle: Handle of board PCI-3009
[in]b_CycleMode: Selected the chronometer acquisition mode
PCI3009_SINGLE : Single acquisition
PCI3009_CONTINUOUS : Continuous acquisition
[in]b_InterruptEnable: PCI3009_ENABLE:
Enable the chronometer interrupt
PCI3009_DISABLE:
Disable the chronometer interrupt
Returns
0: No error
-1: The handle parameter of the board is wrong
-2: The module is not a Chronometer module
-3: Chronometer not initialised see function "i_PCI3009_InitChrono"
-4: Chronometer acquisition mode cycle is wrong
-5: Interrupt parameter is wrong n -6: Interrupt function not initialised. See function "i_PCI3009_SetBoardIntRoutine"
_INT_ i_PCI3009_DisableChrono ( DWORD_  dw_BoardHandle)

Disable the chronometer. If you disable the chronometer after a start signal occur and you restart the chronometer
witch the " i_PCI3009_EnableChrono" function, if no stop signal occur this start signal is ignored.

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 Chronometer module
-3: Chronometer not initialised see function "i_PCI3009_InitChrono"