|
xPCI-3501 API
|
Functions | |
| _INT_ | i_PCI3501_InitAndStartTimerWatchdog (HANDLE h_DeviceHandle, DWORD dw_ReloadValue, BYTE b_TimeBase, BYTE b_InterruptFlag, BYTE b_Mode) |
| _INT_ | i_PCI3501_StopTimerWatchdog (HANDLE h_DeviceHandle) |
| _INT_ | i_PCI3501_TriggerTimerWatchdog (HANDLE h_DeviceHandle) |
| _INT_ | i_PCI3501_ReadTimerWatchdogValue (HANDLE h_DeviceHandle, PDWORD pdw_Value) |
| _INT_ | i_PCI3501_ReadTimerWatchdogStatus (HANDLE h_DeviceHandle, PDWORD pdw_Value, PBYTE pb_Overflow, PBYTE pb_SoftTrigger, PBYTE pb_ExtTrigger) |
| _INT_ i_PCI3501_InitAndStartTimerWatchdog | ( | HANDLE | h_DeviceHandle, |
| DWORD | dw_ReloadValue, | ||
| BYTE | b_TimeBase, | ||
| BYTE | b_InterruptFlag, | ||
| BYTE | b_Mode | ||
| ) |
Initialize and start the component as timer or watchdog.
If you use this component as a watchdog, when the value reaches 0, the analog outputs will be set to 0V.
If you write on an analog output, or if you trigger the watchdog, then the value of the watchdog is reset to dw_ReloadValue.
| [in] | h_DeviceHandle | Handle of the board. You can get it with the function i_PCI3501_OpenBoardViaIndex for example |
| [in] | dw_ReloadValue | The time interval. Its unit is defined by the b_TimeBase parameter. (0 to 4095) |
| [in] | b_TimeBase | The unit of the parameter dw_ReloadValue.
|
| [in] | b_InterruptFlag | Specify if you want to generate an interrupt when the value of the timer / watchdog reach 0. |
| [in] | b_Mode | Specifiy the mode of the component.
|
| 0 | : No error |
| -1 | : The device handle parameter is wrong |
| -2 | : dw_ReloadValue parameter is wrong |
| -3 | : b_TimeBase parameter is wrong |
| -4 | : b_InterruptFlag parameter is wrong |
| -5 | : b_Mode parameter is wrong |
| -6 | : Error while calling IOCTL function (wrong handle ?) |
| _INT_ i_PCI3501_StopTimerWatchdog | ( | HANDLE | h_DeviceHandle | ) |
Stop a started timer / watchdog.
| [in] | h_DeviceHandle | Handle of the board. You can get it with the function i_PCI3501_OpenBoardViaIndex for example |
| 0 | : No error |
| -1 | : The device handle parameter is wrong |
| -2 | : Error while calling IOCTL function (wrong handle ?) |
| _INT_ i_PCI3501_TriggerTimerWatchdog | ( | HANDLE | h_DeviceHandle | ) |
Trigger a started timer / watchdog.
| [in] | h_DeviceHandle | Handle of the board. You can get it with the function i_PCI3501_OpenBoardViaIndex for example |
| 0 | : No error |
| -1 | : The device handle parameter is wrong |
| -2 | : Error while calling IOCTL function (wrong handle ?) |
| _INT_ i_PCI3501_ReadTimerWatchdogValue | ( | HANDLE | h_DeviceHandle, |
| PDWORD | pdw_Value | ||
| ) |
Read the current value of the timer / watchdog
| [in] | h_DeviceHandle | Handle of the board. You can get it with the function i_PCI3501_OpenBoardViaIndex for example |
| [out] | dw_Value | The current value of the timer watchdog |
| 0 | : No error |
| -1 | : The device handle parameter is wrong |
| -2 | : Error while calling IOCTL function (wrong handle ?) |
| _INT_ i_PCI3501_ReadTimerWatchdogStatus | ( | HANDLE | h_DeviceHandle, |
| PDWORD | pdw_Value, | ||
| PBYTE | pb_Overflow, | ||
| PBYTE | pb_SoftTrigger, | ||
| PBYTE | pb_ExtTrigger | ||
| ) |
Read the current value and the status of the timer / watchdog
| [in] | h_DeviceHandle | Handle of the board. You can get it with the function i_PCI3501_OpenBoardViaIndex for example |
| [out] | dw_Value | The current value of the timer watchdog |
| [out] | pb_Overflow | 1 if the timer / watchdog reached 0, else 0 |
| [out] | pb_SoftTrigger | 1 if a software trigger occurred, else 0 |
| [out] | pb_ExtTrigger | 1 if a hardware trigger occurred, else 0 |
| 0 | : No error |
| -1 | : The device handle parameter is wrong |
| -2 | : Error while calling IOCTL function (wrong handle ?) |