xPCI-1710 API
xPCI-1710 incremental counter functions

Functions

_INT_ i_PCI1710_SetInputFilter (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, BYTE b_PCIInputClock, BYTE b_Filter)
 
_INT_ i_PCI1710_SetInputFilterEFG (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, BYTE b_Filter)
 
_INT_ i_PCI1710_InitCounter (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, BYTE b_CounterRange, BYTE b_FirstCounterModus, BYTE b_FirstCounterOption, BYTE b_SecondCounterModus, BYTE b_SecondCounterOption)
 
_INT_ i_PCI1710_ConfigDigitalChlUse (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, BYTE b_SourceSelect)
 
_INT_ i_PCI1710_InitModuloCompareLogic (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, DWORD dw_CompareValue, BYTE b_CompareHysteresis)
 
_INT_ i_PCI1710_ReadCompareLatchRegister (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, PDWORD pdw_LatchValue)
 
_INT_ i_PCI1710_CounterAutoTest (HANDLE h_DeviceHandle, PBYTE pb_TestStatus)
 
_INT_ i_PCI1710_ClearCounterValue (HANDLE h_DeviceHandle, BYTE b_ModuleNbr)
 
_INT_ i_PCI1710_ClearAllCounterValue (HANDLE h_DeviceHandle)
 
_INT_ i_PCI1710_LatchCounter (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, BYTE b_LatchReg)
 
_INT_ i_PCI1710_ReadLatchRegisterStatus (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, BYTE b_LatchReg, PBYTE pb_LatchStatus)
 
_INT_ i_PCI1710_ReadLatchRegisterValue (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, BYTE b_LatchReg, PDWORD pdw_LatchValue)
 
_INT_ i_PCI1710_EnableLatchInterrupt (HANDLE h_DeviceHandle, BYTE b_ModuleNbr)
 
_INT_ i_PCI1710_DisableLatchInterrupt (HANDLE h_DeviceHandle, BYTE b_ModuleNbr)
 
_INT_ i_PCI1710_Read16BitCounterValue (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, BYTE b_SelectedCounter, PDWORD pdw_CounterValue)
 
_INT_ i_PCI1710_Read32BitCounterValue (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, PDWORD pdw_CounterValue)
 
_INT_ i_PCI1710_Write16BitCounterValue (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, BYTE b_SelectedCounter, DWORD dw_WriteValue)
 
_INT_ i_PCI1710_Write32BitCounterValue (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, DWORD dw_WriteValue)
 
_INT_ i_PCI1710_InitIndex (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, BYTE b_ReferenceAction, BYTE b_IndexOperation, BYTE b_AutoMode, BYTE b_InterruptEnable)
 
_INT_ i_PCI1710_EnableIndex (HANDLE h_DeviceHandle, BYTE b_ModuleNbr)
 
_INT_ i_PCI1710_DisableIndex (HANDLE h_DeviceHandle, BYTE b_ModuleNbr)
 
_INT_ i_PCI1710_GetIndexStatus (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, PBYTE pb_IndexStatus)
 
_INT_ i_PCI1710_SetIndexAndReferenceSource (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, BYTE b_SourceSelection)
 
_INT_ i_PCI1710_InitReference (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, BYTE b_ReferenceLevel)
 
_INT_ i_PCI1710_GetReferenceStatus (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, PBYTE pb_ReferenceStatus)
 
_INT_ i_PCI1710_GetUASStatus (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, PBYTE pb_UASStatus)
 
_INT_ i_PCI1710_GetCBStatus (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, PBYTE pb_CBStatus)
 
_INT_ i_PCI1710_Get16BitCBStatus (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, PBYTE pb_CBStatusCounter0, PBYTE pb_CBStatusCounter1)
 
_INT_ i_PCI1710_GetUDStatus (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, PBYTE pb_UDStatus)
 
_INT_ i_PCI1710_GetInterruptUDLatchedStatus (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, PBYTE pb_UDStatus)
 
_INT_ i_PCI1710_InitExternalStrobe (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, BYTE b_ExternalStrobe, BYTE b_ExternalStrobeLevel)
 
_INT_ i_PCI1710_InitCompareLogic (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, DWORD dw_CompareValue)
 
_INT_ i_PCI1710_ModuloCompareCorrection (HANDLE h_BoardHandle, BYTE b_ModuleNbr, DWORD dw_ModuloCompareEventValue, DWORD dw_ModuloCompareCorrectionValue)
 
_INT_ i_PCI1710_EnableCompareLogic (HANDLE h_DeviceHandle, BYTE b_ModuleNbr)
 
_INT_ i_PCI1710_DisableCompareLogic (HANDLE h_DeviceHandle, BYTE b_ModuleNbr)
 
_INT_ i_PCI1710_SetDigitalChlOn (HANDLE h_DeviceHandle, BYTE b_ModuleNbr)
 
_INT_ i_PCI1710_SetDigitalChlOff (HANDLE h_DeviceHandle, BYTE b_ModuleNbr)
 
_INT_ i_PCI1710_InitFrequencyMeasurement (HANDLE h_DeviceHandle, BYTE b_ModulNbr, BYTE b_PCIInputClock, BYTE b_TimingUnity, DWORD ul_TimingInterval, PDWORD pul_RealTimingInterval)
 
_INT_ i_PCI1710_EnableFrequencyMeasurement (HANDLE h_DeviceHandle, BYTE b_ModulNbr, BYTE b_InterruptEnable)
 
_INT_ i_PCI1710_DisableFrequencyMeasurement (HANDLE h_DeviceHandle, BYTE_ b_ModulNbr)
 
_INT_ i_PCI1710_ReadFrequencyMeasurement (HANDLE h_DeviceHandle, BYTE b_ModulNbr, PBYTE pb_Status, PBYTE pb_UDStatus, PDWORD pdw_ReadValue)
 

Detailed Description

Function Documentation

_INT_ i_PCI1710_SetInputFilter ( HANDLE  h_DeviceHandle,
BYTE  b_ModuleNbr,
BYTE  b_PCIInputClock,
BYTE  b_Filter 
)

Disables or enables the software filter in the selected module for the inputs A, B, C and D. This function is only available for incremental counter and impulse counter

Parameters
[in]h_DeviceHandleHandle of the board
[in]b_ModuleNbrNumber of the module to be configured
[in]b_PCIInputClockSelection of the bus clock
  • 30: 30 MHz (Only for Incremental counter module)
  • 33: 33 MHz
  • 40: 40 MHz
[in]b_FilterSelection of the filter for the inputs A, B, C and D
  • 33 Mhz clock
    • 0: filter not used
      1: 121 ns
      2: 182 ns
      3: 242 ns
      4: 303 ns
      5: 364 ns
      6: 424 ns
      7: 485 ns
      8: 545 ns
      9: 606 ns
      10: 667 ns
      11: 727 ns
      12: 788 ns
      13: 848 ns
      14: 909 ns
      15: 970 ns
  • 40 Mhz clock
    • 0: filter not used
      1: 100 ns
      2: 150 ns
      3: 200 ns
      4: 250 ns
      5: 300 ns
      6: 350 ns
      7: 400 ns
      8: 450 ns
      9: 500 ns
      10: 550 ns
      11: 600 ns
      12: 650 ns
      13: 700 ns
      14: 750 ns
      15: 800 ns
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The module is not a counter module or a pulse encoder module
    -4: The selected PCI input clock is wrong
    -5: The selected filter time is wrong
    -6: The 40 MHz quartz is not available on the board
    _INT_ i_PCI1710_SetInputFilterEFG ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr,
    BYTE  b_Filter 
    )

    Disables or enables the software filter in the selected module for the inputs E, F and G. This function is only available for incremental counter version SC30 or higher

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured
    [in]b_FilterSelection of the filter for the inputs E, F and G
  • 40 Mhz clock
    • 0: filter not used
      1: 100 ns
      2: 150 ns
      3: 200 ns
      4: 250 ns
      5: 300 ns
      6: 350 ns
      7: 400 ns
      8: 450 ns
      9: 500 ns
      10: 550 ns
      11: 600 ns
      12: 650 ns
      13: 700 ns
      14: 750 ns
      15: 800 ns
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The module is not a counter module
    -4: The module is a counter module but the version is wrong (it has to be SC30 or higher)
    -5: The selected filter time is wrong
    -6: The 40 MHz quartz is not available on the board
    _INT_ i_PCI1710_InitCounter ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr,
    BYTE  b_CounterRange,
    BYTE  b_FirstCounterModus,
    BYTE  b_FirstCounterOption,
    BYTE  b_SecondCounterModus,
    BYTE  b_SecondCounterOption 
    )

    Configures the counter operation mode of the selected module.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    [in]b_CounterRangeSelection of the counter range (0: 32-bit counter, 16: 16-bit counter)
    [in]b_FirstCounterModusOperation mode of the first counter (0: quadruple mode, 3: double mode, 15: simple mode, 128: direct mode)
    [in]b_FirstCounterOptionOption of the first counter (if first counter mode is direct mode, 0: decrement, 96: increment; if first counter mode is quadruple, double or single, 0: hysteresis off, 96: hysteresis on)
    [in]b_SecondCounterModusOperation mode of the second counter (0: quadruple mode, 3: double mode, 15: simple mode, 128: direct mode)
    [in]b_SecondCounterOptionOption of the second counter (if second mode is direct, 0: decrement, 96: increment; if second counter mode is quadruple, double or single, 0: hysteresis off, 96: hysteresis on)
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The module is not a counter module
    -3: The selected counter range is wrong
    -4: The selected operation mode of the first counter is wrong
    -5: The selected operation option of the first counter is wrong
    -6: The selected operation mode of the second counter is wrong
    -7: The selected operation option of the second counter is wrong
    _INT_ i_PCI1710_ConfigDigitalChlUse ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr,
    BYTE  b_SourceSelect 
    )

    Configures the H output behavior. A pulse of 400ns can be generated by the compare event.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    [in]b_SourceSelectSource selection (0: manually set using SetDigitalChlOn/Off, 1: pulses are generated by compare events)
    Return values
    -1The device handle parameter is wrong
    -2The selected module number is wrong
    -3The source selection parameter is wrong
    -4The selected module is not compatible with this function (SC3x is required)
    -5The counter has not been initialised (see the i_PCI1710_InitCounter function)
    _INT_ i_PCI1710_InitModuloCompareLogic ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr,
    DWORD  dw_CompareValue,
    BYTE  b_CompareHysteresis 
    )

    Sets the 16-bit compare value. An interrupt is generated for each multiple of the compare value.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    [in]dw_CompareValue16-bit compare value
    [in]b_CompareHysteresisCompare hysteresis value
    Return values
    0No error
    -1The device handle parameter is wrong
    -2The selected module number is wrong
    -3The selected module is not compatible with this function (SC3x is required)
    -4The counter has not been initialised (see the i_PCIe1710_InitCounter function)
    -5The compare value is wrong
    _INT_ i_PCI1710_ReadCompareLatchRegister ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr,
    PDWORD  pdw_LatchValue 
    )

    Reads the compare latch register value from the selected module.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be read (0 to 3)
    [out]pdw_LatchValueLatch register value
    Return values
    0No error
    -1The device handle parameter is wrong
    -2The selected module number is wrong
    -3The selected module is not compatible with this function (SC3x is required)
    -4The counter has not been initialised (see the i_PCIe1710_InitCounter function)
    _INT_ i_PCI1710_CounterAutoTest ( HANDLE  h_DeviceHandle,
    PBYTE  pb_TestStatus 
    )

    Tests the internal status of all the modules.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [out]pb_TestStatusAuto test returned value (0: no error, 1: error on counter 0, 2: error on counter 2, 3: error on counter 3)
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: No counter module found
    _INT_ i_PCI1710_ClearCounterValue ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr 
    )

    Deletes the counter value of the selected module.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    _INT_ i_PCI1710_ClearAllCounterValue ( HANDLE  h_DeviceHandle)

    Deletes all the counter values.

    Parameters
    [in]h_DeviceHandleHandle of the board
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    _INT_ i_PCI1710_LatchCounter ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr,
    BYTE  b_LatchReg 
    )

    Latching of the current value of the selected module.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    [in]b_LatchRegSelection of the latch register (0: for the first latch register, 1: for the second latch register)
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    -4: The selected latch register is wrong
    _INT_ i_PCI1710_ReadLatchRegisterStatus ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr,
    BYTE  b_LatchReg,
    PBYTE  pb_LatchStatus 
    )

    Reads the status of the selected latch register of the selected module.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configurred (0 to 3)
    [in]b_LatchRegSelection of the latch register (0: for the first latch register, 1: for the second latch register)
    [out]pb_LatchStatusLatch register status (0: no latch, 1: a software latch was generated, 2: a hardware latch was generated, 3: a software latch and a hardware latch were generated)
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    -4: The selected latch register is wrong
    _INT_ i_PCI1710_ReadLatchRegisterValue ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr,
    BYTE  b_LatchReg,
    PDWORD  pdw_LatchValue 
    )

    Reads the value of the selected latch register of the selected module.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    [in]b_LatchRegSelection of the latch register (0: for the first latch register, 1: for the second latch register)
    [out]pdw_LatchValueLatch register value
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    -4: The selected latch register is wrong
    _INT_ i_PCI1710_EnableLatchInterrupt ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr 
    )

    Enables the latch interrupt of the selected module. Each hardware latched generates an interrupt.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    -15: An interrupt routine is not installed (see the i_PCI1710_SetBoardIntRoutine function)
    _INT_ i_PCI1710_DisableLatchInterrupt ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr 
    )

    Disables the latch interrupt of the selected module.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    -15: An interrupt routine is not installed (see the i_PCI1710_SetBoardIntRoutine function)
    _INT_ i_PCI1710_Read16BitCounterValue ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr,
    BYTE  b_SelectedCounter,
    PDWORD  pdw_CounterValue 
    )

    Latches a 16-bit counter from the selected module in the first register and returns the latched value.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    [in]b_SelectedCounterSelection of the 16-bit counter (0 or 1)
    [out]pdw_CounterValue16-bit counter value
    Return values
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    -4: The selected 16-bit counter is wrong
    _INT_ i_PCI1710_Read32BitCounterValue ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr,
    PDWORD  pdw_CounterValue 
    )

    Latches the 32-bit counter from the selected module in the first register and returns the latched value.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    [out]pdw_CounterValue32-bit counter value
    Return values
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    _INT_ i_PCI1710_Write16BitCounterValue ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr,
    BYTE  b_SelectedCounter,
    DWORD  dw_WriteValue 
    )

    Writes the 16-bit value into a 16-bit counter of the selected module.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    [in]b_SelectedCounterSelection of the 16-bit counter (0 or 1)
    [in]dw_WriteValue16-bit write value
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    _INT_ i_PCI1710_Write32BitCounterValue ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr,
    DWORD  dw_WriteValue 
    )

    Writes the 32-bit value into the counter of the selected module.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    [in]dw_WriteValue32-bit write value
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    _INT_ i_PCI1710_InitIndex ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr,
    BYTE  b_ReferenceAction,
    BYTE  b_IndexOperation,
    BYTE  b_AutoMode,
    BYTE  b_InterruptEnable 
    )

    Initializes the index action for the selected module.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    [in]b_ReferenceActionDetermines if the reference for the index-transfer shall be reset or not (0: reference has not an importance, 1: reference shall be set for the index transfer)
    [in]b_IndexOperationIndex operation mode (0: after an index signal (high level), the counter value is deleted (32-bit), 1: after an index signal (high level), the counter value (32-bit) is latched into the first latch register, 2: after an index signal (low level), the counter value is deleted (32-bit), 3: after an index signal (low level), the counter value (32-bit) is latched into the first latch register, 4: after an index signal (high level), the counter value (32-bit) is latched into the first latch register and then deleted (32-bit), 5: after an index signal (low level), the counter value (32-bit) is latched into the first latch register and then deleted (32-bit))
    [in]b_AutoModeEnables or disables the automatic index reset (0: disables, 1: enables)
    [in]b_InterruptEnableEnables or disables the interrupt (0: disables, 1: enables)
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    -4: The selected reference action is wrong
    -5: The index operation parameter is wrong
    -6: The automatic mode parameter is wrong
    -7: The interrupt parameter is wrong
    -8: An interrupt routine is not installed (see the i_PCI1710_SetBoardIntRoutine function)
    _INT_ i_PCI1710_EnableIndex ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr 
    )

    Enables the index actions.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    -4: The index has not been initialized (see the i_PCI1710_InitIndex function) (see the i_PCI1710_InitIndex function)
    _INT_ i_PCI1710_DisableIndex ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr 
    )

    Disables the index actions.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    -4: The index has not been initialized (see the i_PCI1710_InitIndex function) (see the i_PCI1710_InitIndex function)
    -5: Flag error
    _INT_ i_PCI1710_GetIndexStatus ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr,
    PBYTE  pb_IndexStatus 
    )

    Returns the index status.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    [out]pb_IndexStatusIndex status (0: no index, 1: an index is determined)
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    -4: The index has not been initialized (see the i_PCI1710_InitIndex function)
    _INT_ i_PCI1710_SetIndexAndReferenceSource ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr,
    BYTE  b_SourceSelection 
    )

    Determines the hardware source for the index and the reference logic.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    [in]b_SourceSelectionSource of the index and the reference logic (0: source 0 (index logic connected to the differential input C and reference logic to the 24 V input E), 1: source 1 (reference logic connected to the differential input C and index logic to the 24 V input E))
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The module is not a counter module
    -4: The source selection is wrong
    _INT_ i_PCI1710_InitReference ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr,
    BYTE  b_ReferenceLevel 
    )

    Initializes the reference that corresponds with the selected module.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    [in]b_ReferenceLevelReference level (0: if '0', reference initialized, 1: if '1', reference initialized)
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    -4: The reference level is wrong
    _INT_ i_PCI1710_GetReferenceStatus ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr,
    PBYTE  pb_ReferenceStatus 
    )

    Returns the reference status.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    [out]pb_ReferenceStatusReference status (0: no reference, 1: a reference was enabled)
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    -4: The reference has not been initialized (See the i_PCI1710_InitReference function)
    _INT_ i_PCI1710_GetUASStatus ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr,
    PBYTE  pb_UASStatus 
    )

    Returns the UAS status.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    [out]pb_UASStatusUAS status (0: UAS is set on low, 1: UAS is set on high)
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    _INT_ i_PCI1710_GetCBStatus ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr,
    PBYTE  pb_CBStatus 
    )

    Returns the CB status.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    [out]pb_CBStatusCB status (0: no counter overflow, 1: counter overflow)
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    _INT_ i_PCI1710_Get16BitCBStatus ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr,
    PBYTE  pb_CBStatusCounter0,
    PBYTE  pb_CBStatusCounter1 
    )

    Returns the CB status of the two 16-bit counters.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    [out]pb_CBStatusCounter0CB status of the 16-bit counter 0
    [out]pb_CBStatusCounter1CB status of the 16-bit counter 1
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    _INT_ i_PCI1710_GetUDStatus ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr,
    PBYTE  pb_UDStatus 
    )

    Gets the UD status of the counter runout.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    [out]pb_UDStatusUD status (0: counter runout in the selected mode, 1: counter runout in the selected mode upwards)
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    _INT_ i_PCI1710_GetInterruptUDLatchedStatus ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr,
    PBYTE  pb_UDStatus 
    )

    Returns the latched status of the counter runout, after an interrupt is generated.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    [out]pb_UDStatusUD status (0: counter runout in the selected mode downwards, 1: counter runout in the selected mode upwards, 2: there is no index interrupt)
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    -4: An interrupt routine is not installed (see the i_PCI1710_SetBoardIntRoutine function)
    _INT_ i_PCI1710_InitExternalStrobe ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr,
    BYTE  b_ExternalStrobe,
    BYTE  b_ExternalStrobeLevel 
    )

    Initializes the external pulse level for the seöected module.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    [in]b_ExternalStrobeSelection of the external pulse (strobe) (0: external pulse A, 1: external pulse B)
    [in]b_ExternalStrobeLevelLevel of the external pulse (0: external latch is generated at '0', 1: external latch is generated at '1' (standard configuration))
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    -4: The selected external pulse is wrong
    -5: The external pulse level is wrong
    _INT_ i_PCI1710_InitCompareLogic ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr,
    DWORD  dw_CompareValue 
    )

    Sets the 32-bit compare value. An interrupt is generated as soon as the counter has reached the compare value. For the SC3x or higher use the i_PCIe1710_InitModuloCompareLogic function

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    [in]dw_CompareValue32-bit compare value
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    -4: For SC3x module use i_PCI1710_InitModuloCompareLogic
    _INT_ i_PCI1710_ModuloCompareCorrection ( HANDLE  h_BoardHandle,
    BYTE  b_ModuleNbr,
    DWORD  dw_ModuloCompareEventValue,
    DWORD  dw_ModuloCompareCorrectionValue 
    )

    Allow to add a correction to the compare value after a certain number or event. (require the SC60 firmware)

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    [in]dw_ModuloCompareEventValue16-bit Number of event before applying the correction
    [in]dw_ModuloCompareCorrectionValue16-bit correction to applied (signed value)
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The module Firmware is not correct (Should be between SC60 and SC69)
    -4: The parameter us_ModuloCompareEventValue is incorrect (Should be between 2 and 655535)
    -5: The dw_ModuloCompareCorrectionValue parameter is incorrect (the value compare + Correction value > 65535 or 0 <)
    -6: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    -7: The compare functionality has not been initialized (see the i_PCI1710_InitCompareLogic function)
    _INT_ i_PCI1710_EnableCompareLogic ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr 
    )

    Enables the 32-bit compare logic. An interrupt is generated as soon as the counter has reached the compare value.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    -4: The compare logic has not been initialized (see the i_PCI1710_InitCompareLogic function)
    -5: An interrupt routine is not installed (see the i_PCI1710_SetBoardIntRoutine function)
    _INT_ i_PCI1710_DisableCompareLogic ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr 
    )

    Disables the 32-bit compare logic.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    -4: The compare logic has not been initialized (see the i_PCI1710_InitCompareLogic function)
    _INT_ i_PCI1710_SetDigitalChlOn ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr 
    )

    Sets the digital output of the selected module.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    _INT_ i_PCI1710_SetDigitalChlOff ( HANDLE  h_DeviceHandle,
    BYTE  b_ModuleNbr 
    )

    Resets the digital output of the selected module.

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModuleNbrNumber of the module to be configured (0 to 3)
    Return values
    0: No error
    -1: The device handle parameter is wrong
    -2: The selected module number is wrong
    -3: The counter has not been initialized (see the i_PCI1710_InitCounter function)
    _INT_ i_PCI1710_InitFrequencyMeasurement ( HANDLE  h_DeviceHandle,
    BYTE  b_ModulNbr,
    BYTE  b_PCIInputClock,
    BYTE  b_TimingUnity,
    DWORD  ul_TimingInterval,
    PDWORD  pul_RealTimingInterval 
    )

    Init frequency measurement

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModulNbrModule to configure (0 to 3)
    [in]b_PCIInputClockBus clock selection
    [in]b_TimingUnityUnit of the time base (0 to 2)
    • 0: ns
    • 1: us
    • 2: ms
    [in]ul_TimingIntervalValue of the time base.
    [out]pul_RealTimingIntervalCorrect value of the time base
    Returns
    0 : No error
    -1 : The device handle parameter is wrong
    -2 : b_ModulNbr parameter is wrong, must be < 4
    -3 : Module version is wrong
    -4 : Counter not initialized, see "i_PCI1710_InitCounter" function
    -5 : b_TimingUnity is wrong -6 : b_PCIInputClock parameter is wrong, must be 30, 33 or 40
    -7 : ul_TimingInterval parameter is wrong
    -8 : Module version is wrong for 40 MHz version
    -9 : There is no 40 Mhz quartz available on the board
    _INT_ i_PCI1710_EnableFrequencyMeasurement ( HANDLE  h_DeviceHandle,
    BYTE  b_ModulNbr,
    BYTE  b_InterruptEnable 
    )

    Enable frequency measurement

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModulNbrModule to configure (0 to 3)
    [in]b_InterruptEnableEnables or disables the interrupt
    • 1 : Interrupt enabled
    • 0 : Interrupt enabled
    Returns
    0 : No error
    -1 : The device handle parameter is wrong
    -2 : b_ModulNbr parameter is wrong, must be < 4
    -3 : b_InterruptEnable parameter is wrong
    -4 : Module version is wrong
    -5 : Counter not initialized, see "i_PCI1710_InitCounter" function
    -6 : Frequency measurement not initialized, see "i_PCI1710_InitFrequencyMeasurement" function
    _INT_ i_PCI1710_DisableFrequencyMeasurement ( HANDLE  h_DeviceHandle,
    BYTE_  b_ModulNbr 
    )

    Disable frequency measurement

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModulNbrModule to configure (0 to 3)
    Returns
    0 : No error
    -1 : The device handle parameter is wrong
    -2 : b_ModulNbr parameter is wrong, must be < 4
    _INT_ i_PCI1710_ReadFrequencyMeasurement ( HANDLE  h_DeviceHandle,
    BYTE  b_ModulNbr,
    PBYTE  pb_Status,
    PBYTE  pb_UDStatus,
    PDWORD  pdw_ReadValue 
    )

    Read the frequency measurement

    Parameters
    [in]h_DeviceHandleHandle of the board
    [in]b_ModulNbrModule to configure (0 to 3)
    [out]pb_StatusReturns the status of the frequency measurement.
    • 0: Counter cycle not started
    • 1: Counter cycle started
    • 2: Counter cycle stoped
    [out]pb_UDStatusStatus of the upward/downward counter.
    • 2 x 16 bit counter mode
      • First 16-bit counter
        • 0 : Downward counter cycle
        • 1 : Upward counter cycle
        • 2 : Downward counter cycle
        • 3 : Upward counter cycle
      • Second 16-bit counter
        • 0 : Downward counter cycle
        • 1 : Downward counter cycle
        • 2 : Upward counter cycle
        • 3 : Upward counter cycle
    • 1 x 32 bit counter mode
      • 0 : Downward counter cycle
      • 1 : Not used
      • 2 : Not used
      • 3 : Upward counter cycle
    [out]pdw_ReadValueReturns the number of increments within the time base.
    Returns
    0 : No error
    -1 : The device handle parameter is wrong
    -2 : b_ModulNbr parameter is wrong, must be < 4
    -3 : Module version is wrong
    -4 : Counter not initialized, see "i_PCI1710_InitCounter" function
    -5 : Frequency measurement not initialized, see "i_PCI1710_InitFrequencyMeasurement" function
    -6 : Frequency measurement not enabled, see "i_PCI1710_EnableFrequencyMeasurement" function