xPCI-1710 API
|
Functions | |
_INT_ | i_PCI1710_InitETM (HANDLE h_DeviceHandle, BYTE_ b_ModuleNbr, BYTE_ b_ClockSelection, BYTE_ b_TimingUnit, DWORD_ dw_Timing, PDWORD_ pdw_RealTiming) |
_INT_ | i_PCI1710_EnableETM (HANDLE h_DeviceHandle, BYTE_ b_ModuleNbr, BYTE_ b_ETM, BYTE_ b_EdgeLevel, BYTE_ b_TriggerLevel, BYTE_ b_CycleMode, BYTE_ b_FirstTriggerMode, BYTE_ b_InterruptEnable) |
_INT_ | i_PCI1710_DisableETM (HANDLE h_DeviceHandle, BYTE_ b_ModuleNbr, BYTE_ b_ETM) |
_INT_ | i_PCI1710_GetETMInitialisation (HANDLE h_DeviceHandle, BYTE_ b_ModuleNbr, BYTE_ b_ETM, PBYTE_ pb_TimingUnit, PDWORD_ pdw_Timing, PBYTE_ pb_EdgeLevel, PBYTE_ pb_TriggerLevel, PBYTE_ pb_CycleMode, PBYTE_ pb_FirstTriggerMode, PBYTE_ pb_InterruptEnable, PBYTE_ pb_Enable) |
_INT_ | i_PCI1710_GetETMProgressStatus (HANDLE h_DeviceHandle, BYTE_ b_ModuleNbr, BYTE_ b_ETM, PBYTE_ pb_ETMStatus) |
_INT_ | i_PCI1710_ReadETMValue (HANDLE h_DeviceHandle, BYTE_ b_ModuleNbr, BYTE_ b_ETM, DWORD_ dw_TimeOut, PBYTE_ pb_ETMStatus, PDWORD_ pdw_ETMValue) |
_INT_ | i_PCI1710_ReadETMTotalTime (HANDLE h_DeviceHandle, BYTE_ b_ModuleNbr, BYTE_ b_ETM, DWORD_ dw_TimeOut, PBYTE_ pb_ETMStatus, PDWORD_ pdw_ETMValue) |
_INT_ | i_PCI1710_ReadETMDutyCycleValue (HANDLE h_DeviceHandle, BYTE_ b_ModuleNbr, BYTE_ b_ETM, DWORD_ dw_TimeOut, PBYTE_ pb_ETMStatus, PDOUBLE pd_DutyCycle) |
_INT_ | i_PCI1710_ConvertETMValue (HANDLE h_DeviceHandle, BYTE_ b_ModuleNbr, DWORD_ dw_ETMValue, PDWORD_ pdw_Hour, PBYTE_ pb_Minute, PBYTE_ pb_Second, PDWORD_ pdw_MilliSecond, PDWORD_ pdw_MicroSecond, PDWORD_ pdw_NanoSecond) |
_INT_ i_PCI1710_InitETM | ( | HANDLE | h_DeviceHandle, |
BYTE_ | b_ModuleNbr, | ||
BYTE_ | b_ClockSelection, | ||
BYTE_ | b_TimingUnit, | ||
DWORD_ | dw_Timing, | ||
PDWORD_ | pdw_RealTiming | ||
) |
Configures all ETM counters of the selected module. The parameters dw_Timing und dw_TimingUnit determine the time base for the measurement. pdw_RealTiming returns the correct time value. Call this function before you call another function that accesses the ETM counter.
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ModuleNbr | Number of the module (0 to 3) |
[in] | b_ClockSelection | Selection of the reference clock (30: PCI clock (30 MHz), 33: PCI clock (33 MHz), 40: 40 MHz onboard quartz) |
[in] | b_TimingUnit | Unit of the time base (0: ns 1: us 2: ms) |
[in] | dw_Timing | Value of the time base |
[out] | pdw_RealTiming | Correct value of the time base. Returns the value that corresponds best with the value entered in the dw_Timing |
0 | No error |
-1 | The handle parameter of the board is wrong |
-2 | The selected module number is wrong |
-3 | The selected module is not an ETM module |
-4 | The selected input clock is wrong |
-5 | The selected time unit is wrong |
-6 | The selected time base is wrong |
-7 | The 40 MHz cannot be configured on your board |
_INT_ i_PCI1710_EnableETM | ( | HANDLE | h_DeviceHandle, |
BYTE_ | b_ModuleNbr, | ||
BYTE_ | b_ETM, | ||
BYTE_ | b_EdgeLevel, | ||
BYTE_ | b_TriggerLevel, | ||
BYTE_ | b_CycleMode, | ||
BYTE_ | b_FirstTriggerMode, | ||
BYTE_ | b_InterruptEnable | ||
) |
Enables the ETM counter of the selected module. The function "i_PCI1710_InitETM" has to be called first. If the interrupt is enabled, the ETM counter generates an interrupt after each trigger signal.
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ModuleNbr | Number of the module (0 to 3) |
[in] | b_ETM | Selection of the ETM counter (0 or 1) |
[in] | b_EdgeLevel | Edge selection for time measurement (0: Measures the low level time, 1: Measures the high level time) |
[in] | b_TriggerLevel | Selection of the trigger level (0: Trigger at low level, 1: Trigger at high level) |
[in] | b_CycleMode | Mode selection (0: Single mode, 1: Continuous Mode). Each trigger stops the measurement and starts a new cycle. |
[in] | b_FirstTriggerMode | Mode of the first trigger 0: The measurement of the first edge time starts after calling the function "i_PCI1710_EnableETM". 1: The measurement of the first edge time starts after the next trigger signal. |
[in] | b_InterruptEnable | Enables or disables the interrupt function. (0: interrupts disabled, 1: interrupts enabled) |
0 | No error |
-1 | The handle parameter of the board is wrong |
-2 | The selected module number is wrong |
-3 | The selected module is not an ETM module |
-4 | The selected ETM counter is wrong |
-5 | ETM is not initialised. See function "i_PCI1710_InitETM" |
-6 | Selection of the edge level is wrong |
-7 | Selection of the trigger level is wrong |
-8 | Mode selection is wrong |
-9 | Mode selection for the first trigger is wrong |
-10 | Interrupt parameter is wrong |
-11 | Interrupt function is not initialised |
_INT_ i_PCI1710_DisableETM | ( | HANDLE | h_DeviceHandle, |
BYTE_ | b_ModuleNbr, | ||
BYTE_ | b_ETM | ||
) |
Disables the ETM counter of the selected module
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ModuleNbr | Number of the module (0 to 3) |
[in] | b_ETM | Selection of the ETM counter (0 or 1) |
0 | No error |
-1 | The handle parameter of the board is wrong |
-2 | The selected module number is wrong |
-3 | The selected module is not an ETM module |
-4 | The selected ETM counter is wrong |
-5 | ETM is not initialised. See function "i_PCI1710_InitETM" |
_INT_ i_PCI1710_GetETMInitialisation | ( | HANDLE | h_DeviceHandle, |
BYTE_ | b_ModuleNbr, | ||
BYTE_ | b_ETM, | ||
PBYTE_ | pb_TimingUnit, | ||
PDWORD_ | pdw_Timing, | ||
PBYTE_ | pb_EdgeLevel, | ||
PBYTE_ | pb_TriggerLevel, | ||
PBYTE_ | pb_CycleMode, | ||
PBYTE_ | pb_FirstTriggerMode, | ||
PBYTE_ | pb_InterruptEnable, | ||
PBYTE_ | pb_Enable | ||
) |
Returns the information about the ETM initialisation for the selected module
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ModuleNbr | Number of the module (0 to 3) |
[in] | b_ETM | Selection of the ETM counter (0 or 1) |
[out] | pb_TimingUnit | Unit of the time base (0: ns, 1: us, 2: ms) |
[out] | pdw_Timing | Value of the time base. |
[out] | pb_EdgeLevel | Edge selection for time measurement (0: Measures the low level time, 1: Measures the high level time) |
[out] | pb_TriggerLevel | Selection of the trigger level (0: Trigger at the low level, 1: Trigger at the high level) |
[out] | pb_CycleMode | Mode selection (0: Single mode, 1: Continuous mode). Each trigger stops the measurement and starts a new cycle |
[out] | pb_FirstTriggerMode | Mode of the first trigger (0: The measurement of the first edge time starts after calling the function "i_PCI1710_EnableETM", 1: The measurement of the first edge time starts after the next trigger signal). |
[out] | pb_InterruptEnable | Enables or disables the interrupt function. (0: interrupts disabled, 1: interrupts enabled) |
[out] | pb_Enable | Returns whether the ETM is enabled or disabled. (0: ETM disabled, 1: ETM enabled) |
0 | No error |
-1 | The handle parameter of the board is wrong |
-2 | The selected module number is wrong |
-3 | The selected module is not an ETM module |
-4 | The selected ETM counter is wrong |
-5 | ETM is not initialised. See function "i_PCI1710_InitETM" |
_INT_ i_PCI1710_GetETMProgressStatus | ( | HANDLE | h_DeviceHandle, |
BYTE_ | b_ModuleNbr, | ||
BYTE_ | b_ETM, | ||
PBYTE_ | pb_ETMStatus | ||
) |
Returns the ETM state of the selected module
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ModuleNbr | Number of the module (0 to 3) |
[in] | b_ETM | Selection of the ETM counter (0 or 1) |
[out] | pb_ETMStatus | The ETM state. (0: No start trigger arrived, 1: A start trigger has arrived, 2: A stop trigger has arrived, 3: An overflow occurred) |
0 | No error |
-1 | The handle parameter of the board is wrong |
-2 | The selected module number is wrong |
-3 | The selected module is not an ETM module |
-4 | The selected ETM counter is wrong |
-5 | ETM is not initialised. See function "i_PCI1710_InitETM" |
_INT_ i_PCI1710_ReadETMValue | ( | HANDLE | h_DeviceHandle, |
BYTE_ | b_ModuleNbr, | ||
BYTE_ | b_ETM, | ||
DWORD_ | dw_TimeOut, | ||
PBYTE_ | pb_ETMStatus, | ||
PDWORD_ | pdw_ETMValue | ||
) |
Returns the ETM state and the time value after a stop signal on the selected module. This function is only available when you disable the interrupt function. The returned value is not the actual measured time value. You must use the function "i_PCI1710_ConvertETMValue" or apply the following formula in order to calculate the time value: Time value = pdw_ETMValue x pdw_RealTiming
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ModuleNbr | Number of the module (0 to 3) |
[in] | b_ETM | Selection of the ETM counter (0 or 1) |
[in] | dw_TimeOut | Selection of the timeout in ms. (0 to 65535, 0: Blocking until a stop signal has arrived) |
[out] | pb_ETMStatus | The ETM state. (0: No start trigger arrived, 1: A start trigger has arrived, 2: A stop trigger has arrived, 3: An overflow occurred, 4: Timeout reached) |
[out] | pdw_ETMValue | ETM time value. |
0 | No error |
-1 | The handle parameter of the board is wrong |
-2 | The selected module number is wrong |
-3 | The selected module is not an ETM module |
-4 | The selected ETM counter is wrong |
-5 | ETM is not initialised. See function "i_PCI1710_InitETM" |
-6 | The timeout parameter is wrong (0 to 65535) |
-7 | Interrupt routine installed; the measured ETM cannot be read directly |
_INT_ i_PCI1710_ReadETMTotalTime | ( | HANDLE | h_DeviceHandle, |
BYTE_ | b_ModuleNbr, | ||
BYTE_ | b_ETM, | ||
DWORD_ | dw_TimeOut, | ||
PBYTE_ | pb_ETMStatus, | ||
PDWORD_ | pdw_ETMValue | ||
) |
Returns the ETM status and the total time value after a stop signal occurred on the selected ETM module. This function is only available if you have disabled the interrupt function. The returned value is not the actual measured time value. You must use the function "i_PCI1710_ConvertETMValue" or apply the following formula in order to calculate the time value: pdw_ETMValue x pdw_RealTiming
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ModuleNbr | Number of the module (0 to 3) |
[in] | b_ETM | Selection of the ETM counter (0 or 1) |
[in] | dw_TimeOut | Selection of the timeout in ms. (0 to 65535, 0: Blocking until a stop signal has arrived) |
[out] | pb_ETMStatus | The ETM state. (0: No start trigger arrived, 1: A start trigger has arrived, 2: A stop trigger has arrived, 3: An overflow occurred, 4: Timeout reached) |
[out] | pdw_ETMValue | ETM time value. |
0 | No error |
-1 | The handle parameter of the board is wrong |
-2 | The selected module number is wrong |
-3 | The selected module is not an ETM module |
-4 | The selected ETM counter is wrong |
-5 | ETM is not initialised. See function "i_PCI1710_InitETM" |
-6 | The timeout parameter is wrong (0 to 65535) |
-7 | Interrupt routine installed; the measured ETM cannot be read directly |
_INT_ i_PCI1710_ReadETMDutyCycleValue | ( | HANDLE | h_DeviceHandle, |
BYTE_ | b_ModuleNbr, | ||
BYTE_ | b_ETM, | ||
DWORD_ | dw_TimeOut, | ||
PBYTE_ | pb_ETMStatus, | ||
PDOUBLE | pd_DutyCycle | ||
) |
Returns the ETM status and the duty cycle value after a stop signal occurred on the selected ETM module. This function is only available if you have disabled the interrupt function.
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ModuleNbr | Number of the module (0 to 3) |
[in] | b_ETM | Selection of the ETM counter (0 or 1) |
[in] | dw_TimeOut | Selection of the timeout in ms. (0 to 65535, 0: Blocking until a stop signal has arrived) |
[out] | pb_ETMStatus | The ETM state. (0: No start trigger arrived, 1: A start trigger has arrived, 2: A stop trigger has arrived, 3: An overflow occurred, 4: Timeout reached) |
[out] | pd_DutyCycle | ETM duty cycle. |
0 | No error |
-1 | The handle parameter of the board is wrong |
-2 | The selected module number is wrong |
-3 | The selected module is not an ETM module |
-4 | The selected ETM counter is wrong |
-5 | ETM is not initialised. See function "i_PCI1710_InitETM" |
-6 | The timeout parameter is wrong (0 to 65535) |
-7 | Interrupt routine installed; the measured ETM cannot be read directly |
_INT_ i_PCI1710_ConvertETMValue | ( | HANDLE | h_DeviceHandle, |
BYTE_ | b_ModuleNbr, | ||
DWORD_ | dw_ETMValue, | ||
PDWORD_ | pdw_Hour, | ||
PBYTE_ | pb_Minute, | ||
PBYTE_ | pb_Second, | ||
PDWORD_ | pdw_MilliSecond, | ||
PDWORD_ | pdw_MicroSecond, | ||
PDWORD_ | pdw_NanoSecond | ||
) |
Converts the measured ETM time in hours, minutes, seconds, milliseconds, microseconds and nanoseconds.
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ModuleNbr | Number of the module (0 to 3) |
[in] | dw_ETMValue | ETM time value. See "i_PCI1710_ReadETMValue" |
[out] | pdw_Hour | Time measurement in hours |
[out] | pb_Minute | Time measurement in minutes |
[out] | pb_Second | Time measurement in seconds |
[out] | pdw_MilliSecond | Time measurement in milliseconds |
[out] | pdw_MicroSecond | Time measurement in microseconds |
[out] | pdw_NanoSecond | Time measurement in nanoseconds |
0 | No error |
-1 | The handle parameter of the board is wrong |
-2 | The selected module number is wrong |
-3 | The selected module is not an ETM module |
-4 | ETM is not initialised. See function "i_PCI1710_InitETM" |