xPCI-1500 API
|
Functions | |
_INT_ | i_PCI1500_InitTimerCounter2 (HANDLE h_DeviceHandle, BYTE b_ComponentMode, WORD w_ReloadValue, BYTE b_EnableContinuousCycle, BYTE b_EnableHardwareTrigger, BYTE b_EnableHardwareGate, BYTE b_EnableInterrupt) |
_INT_ | i_PCI1500_StartTimerCounter2 (HANDLE h_DeviceHandle) |
_INT_ | i_PCI1500_StopTimerCounter2 (HANDLE h_DeviceHandle) |
_INT_ | i_PCI1500_TriggerTimerCounter2 (HANDLE h_DeviceHandle) |
_INT_ | i_PCI1500_ReadTimerCounter2 (HANDLE h_DeviceHandle, PWORD pw_TimerValue) |
_INT_ i_PCI1500_InitTimerCounter2 | ( | HANDLE | h_DeviceHandle, |
BYTE | b_ComponentMode, | ||
WORD | w_ReloadValue, | ||
BYTE | b_EnableContinuousCycle, | ||
BYTE | b_EnableHardwareTrigger, | ||
BYTE | b_EnableHardwareGate, | ||
BYTE | b_EnableInterrupt | ||
) |
Initializes the component 2 as a timer or a counter.
Important! The timer component internally operates with half of the input frequency.
If the timer is set as a timer, the time period is defined by (2*w_ReloadValue)/InputClock, where InputClock is the value of the input clock in Hz.
This timer/counter supports hardware trigger, i.e. the value is reloaded if the trigger input is high.
This timer/counter also supports hardware gate, i.e. the timer is only counting if the gate input is high.
If the counter is used, input 10 acts as the counter input
If the hardware trigger is enabled, input 11 acts as the trigger input
If the hardware gate is enabled, input 12 acts as the gate input
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ComponentMode | Selects the component mode ( PCI1500_TIMER or PCI1500_COUNTER ) |
[in] | w_ReloadValue | Defines the starting value of the timer |
[in] | b_EnableContinuousCycle | Reset the timer to us_ReloadValue after each interrupt, and continue counting (0,1) |
[in] | b_EnableHardwareTrigger | Enable the hardware trigger on pin 11 (0,1) |
[in] | b_EnableHardwareGate | Enable the hardware gate on pin 12 (0,1) |
[in] | b_EnableInterrupt | An interrupt is generated each time the timer or counter expires (0,1) |
_INT_ i_PCI1500_StartTimerCounter2 | ( | HANDLE | h_DeviceHandle | ) |
Starts the counter timer 2 as a timer or a counter (depending on how you initialized it)
[in] | h_DeviceHandle | Handle of the board |
_INT_ i_PCI1500_StopTimerCounter2 | ( | HANDLE | h_DeviceHandle | ) |
Stops the counter timer 2
[in] | h_DeviceHandle | Handle of the board |
_INT_ i_PCI1500_TriggerTimerCounter2 | ( | HANDLE | h_DeviceHandle | ) |
Triggers the counter timer 2, resetting its value
[in] | h_DeviceHandle | Handle of the board |
_INT_ i_PCI1500_ReadTimerCounter2 | ( | HANDLE | h_DeviceHandle, |
PWORD | pw_TimerValue | ||
) |
Reads the timer 2 current value
[in] | h_DeviceHandle | Handle of the board |
[out] | pw_TimerValue | Current value of the counter timer |