xPCI-1710 API
|
Functions | |
_INT_ | i_PCI1710_InitPWM (HANDLE h_DeviceHandle, BYTE b_ModulNbr, BYTE b_PWM, BYTE b_TimingUnit, ULONG ul_LowTiming, ULONG ul_HighTiming, PULONG pul_RealLowTiming, PULONG pul_RealHighTiming) |
_INT_ | i_PCI1710_SetNewPWMTiming (HANDLE h_DeviceHandle, BYTE b_ModulNbr, BYTE b_PWM, BYTE b_TimingUnit, ULONG ul_LowTiming, ULONG ul_HighTiming) |
_INT_ | i_PCI1710_EnablePWM (HANDLE h_DeviceHandle, BYTE b_ModulNbr, BYTE b_PWM, BYTE b_StartLevel, BYTE b_StopMode, BYTE b_StopLevel, BYTE b_ExternGate, BYTE b_InterruptEnable) |
_INT_ | i_PCI1710_DisablePWM (HANDLE h_DeviceHandle, BYTE b_ModulNbr, BYTE b_PWM) |
_INT_ | i_PCI1710_GetPWMInitialisation (HANDLE h_DeviceHandle, BYTE b_ModulNbr, BYTE b_PWM, PBYTE pb_TimingUnit, PULONG pul_LowTiming, PULONG pul_HighTiming, PBYTE pb_StartLevel, PBYTE pb_StopMode, PBYTE pb_StopLevel, PBYTE pb_ExternGate, PBYTE pb_InterruptEnable, PBYTE pb_Enable) |
_INT_ | i_PCI1710_GetPWMStatus (HANDLE h_DeviceHandle, BYTE b_ModulNbr, BYTE b_PWM, PBYTE pb_PWMOutputStatus, PBYTE pb_ExternGateStatus) |
_INT_ | i_PCI1710_ReadPWM1DigitalInput (HANDLE h_DeviceHandle, BYTE b_ModulNbr, BYTE b_InputChannel, PBYTE pb_ChannelStatus) |
_INT_ | i_PCI1710_ReadPWMAllDigitalInputs (HANDLE h_DeviceHandle, BYTE b_ModulNbr, PBYTE pb_InputStatus) |
_INT_ | i_PCI1710_EnableDisablePWMDigitalOutputManualSetting (HANDLE h_DeviceHandle, BYTE b_ModulNbr, BYTE b_Flag) |
_INT_ | i_PCI1710_SetPWMDigitalOutputOn (HANDLE h_DeviceHandle, BYTE b_ModulNbr) |
_INT_ | i_PCI1710_SetPWMDigitalOutputOff (HANDLE h_DeviceHandle, BYTE b_ModulNbr) |
_INT_ i_PCI1710_InitPWM | ( | HANDLE | h_DeviceHandle, |
BYTE | b_ModulNbr, | ||
BYTE | b_PWM, | ||
BYTE | b_TimingUnit, | ||
ULONG | ul_LowTiming, | ||
ULONG | ul_HighTiming, | ||
PULONG | pul_RealLowTiming, | ||
PULONG | pul_RealHighTiming | ||
) |
Initializes the PWM.
This function configures the selected PWM from the selected module. The ul_LowTiming, ul_HighTiming and b_TimingUnit determine the low/high base timing for the persiod. The pul_RealLowTiming and pul_RealHighTiming return the real timing value. You must call this function before calling any other PWM function.
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ModulNbr | Index of the module to configure (0 to 3) |
[in] | b_PWM | Index of the selected PWM (0 or 1) |
[in] | b_TimingUnit | Timing unit (0: ns, 1: us, 2: ms, 3: sec or 4: min) |
[in] | ul_LowTiming | Low base timing value |
[in] | ul_HighTiming | High base timing value |
[out] | pul_RealLowTiming | Real low base timing value |
[out] | pul_RealHighTiming | Real high base timing value |
0 | No Error |
-1 | The device handle parameter is wrong |
-2 | The module selection is wrong |
-3 | The PWM selection is wrong |
-4 | The base timing value is wrong |
-5 | The low base timing selection is wrong |
-6 | The high base timing selection is wrong |
-7 | Error while calling IOCTL function |
-101 | Driver - Invalid module index |
-102 | Driver - Invalid PWM index |
-103 | Driver - Invalid timing unit |
-104 | Driver - Invalid low timing |
-105 | Driver - Invalid high timing |
-106 | Driver - The module selected is not a PWM module |
_INT_ i_PCI1710_SetNewPWMTiming | ( | HANDLE | h_DeviceHandle, |
BYTE | b_ModulNbr, | ||
BYTE | b_PWM, | ||
BYTE | b_TimingUnit, | ||
ULONG | ul_LowTiming, | ||
ULONG | ul_HighTiming | ||
) |
Sets a new timing.
The ul_LowTiming, ul_HighTiming and b_TimingUnit determine the low/high base timing for the persiod.
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ModulNbr | Number of the module to configure (0 to 3) |
[in] | b_PWM | Selected PWM (0 or 1) |
[in] | b_TimingUnit | Timing unit (0: ns, 1: us, 2: ms, 3: sec or 4: min) |
[in] | ul_LowTiming | Low base timing value |
[in] | ul_HighTiming | High base timing value |
0 | No Error |
-1 | The device handle parameter is wrong |
-2 | The module selection is wrong |
-3 | The PWM selection is wrong |
-4 | The base timing value is wrong |
-5 | The low base timing selection is wrong |
-6 | The high base timing selection is wrong |
-7 | Error while calling IOCTL function |
-101 | Driver - Invalid module index |
-102 | Driver - Invalid PWM index |
-103 | Driver - Invalid timing unit |
-104 | Driver - Invalid low timing |
-105 | Driver - Invalid high timing |
-106 | Driver - The module selected is not a PWM module |
-107 | Driver - The PWM has not been initialized |
_INT_ i_PCI1710_EnablePWM | ( | HANDLE | h_DeviceHandle, |
BYTE | b_ModulNbr, | ||
BYTE | b_PWM, | ||
BYTE | b_StartLevel, | ||
BYTE | b_StopMode, | ||
BYTE | b_StopLevel, | ||
BYTE | b_ExternGate, | ||
BYTE | b_InterruptEnable | ||
) |
Enables the selected PWM of the selected module.
The i_PCI1710_InitPWM function must be called before calling this function.
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ModulNbr | Number of the module to configure (0 to 3) |
[in] | b_PWM | Selected PWM (0 or 1) |
[in] | b_StartLevel | Start period level selection (0: the period will start with a low level, 1: the period will start with a high level) |
[in] | b_StopMode | Stop mode selection (0: the PWM will be stopped directly after the call of the i_PCI1710_DisablePWM function, 1: the PWM will be stopped after the end of the last period after the call of the disable function) |
[in] | b_StopLevel | Stop PWM level selection (0: the output signal will keep its level after the call of the i_PCI1710_DisablePWM function, 1: the output signal will be set to low after the call of the disable function, 2: the output signal will be set to high after the call of the disable function) |
[in] | b_ExternGate | Extern gate action selection (0: extern gate signal not used, 1: extern gate signal used) |
[in] | b_InterruptEnable | Enable or disable the interrupt (0: disable the PWM interrupt, 1: an interrupt will occur after each end of state) |
0 | No Error |
-1 | The device handle parameter is wrong |
-2 | The module selection is wrong |
-3 | The PWM selection is wrong |
-4 | The PWM start level selection is wrong |
-5 | The PWM stop mode selection is wrong |
-6 | The PWM stop level selection is wrong |
-7 | The extern gate signal selection is wrong |
-8 | The interrupt parameter is wrong |
-9 | Error while calling IOCTL function |
-101 | Driver - Invalid module index |
-102 | Driver - Invalid PWM index |
-103 | Driver - Invalid start level selection |
-104 | Driver - Invalid stop mode selection |
-105 | Driver - Invalid stop level selection |
-106 | Driver - Invalid extern gate selection |
-107 | Driver - Invalid interrupt flag selection |
-108 | Driver - The module selected is not PWM module |
-109 | Driver - The PWM has not been initialized |
_INT_ i_PCI1710_DisablePWM | ( | HANDLE | h_DeviceHandle, |
BYTE | b_ModulNbr, | ||
BYTE | b_PWM | ||
) |
Disables the selected PWM of the selected module.
The output signal level depends of the configuration of the PWM parameter (see the b_StartLevel, b_StopMode and b_StopLevel parameters of the i_PCI1710_EnablePWM function).
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ModulNbr | Number of the module to configure (0 to 3) |
[in] | b_PWM | Selected PWM (0 or 1) |
0 | No Error |
-1 | The device handle parameter is wrong |
-2 | The module selection is wrong |
-3 | The PWM selection is wrong |
-4 | Error while calling IOCTL function |
-101 | Driver - Invalid module index |
-102 | Driver - Invalid PWM index |
-103 | Driver - The module selected is not a PWM module |
-104 | Driver - The PWM has not been initialized |
-105 | Driver - The PWM has not been enabled |
_INT_ i_PCI1710_GetPWMInitialisation | ( | HANDLE | h_DeviceHandle, |
BYTE | b_ModulNbr, | ||
BYTE | b_PWM, | ||
PBYTE | pb_TimingUnit, | ||
PULONG | pul_LowTiming, | ||
PULONG | pul_HighTiming, | ||
PBYTE | pb_StartLevel, | ||
PBYTE | pb_StopMode, | ||
PBYTE | pb_StopLevel, | ||
PBYTE | pb_ExternGate, | ||
PBYTE | pb_InterruptEnable, | ||
PBYTE | pb_Enable | ||
) |
Returns the selected PWM initialization of the selected module.
The i_PCI1710_InitPWM function must be called before calling this function.
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ModulNbr | Number of the module to configure (0 to 3) |
[in] | b_PWM | Selected PWM (0 or 1) |
[out] | pb_TimingUnit | Returns the base timing unit (0: ns, 1: us, 2: ms, 3: sec or 4: min) |
[out] | pul_LowTiming | Returns the low base timing value |
[out] | pul_HighTiming | Returns the high base timing value |
[out] | pb_StartLevel | Returns the start period level selection (0: the period will start with a low level, 1: the period will start with a high level) |
[out] | pb_StopMode | Returns the stop mode selection(0: the PWM will be stopped directly after the call of the i_PCI1710_DisablePWM function and will break the last period, 1: the PWM will end its last period before being stopped after the call of the disable function) |
[out] | pb_StopLevel | Returns the stop level selection (0: the output signal will keep the level after the call of the i_PCI1710_DisablePWM function, 1: the output signal will be stopped at low after the call of the disable function, 2: the output signal will be set to high after the call of the disable function) |
[out] | pb_ExternGate | Indicates if the extern gate action is used (0: not used, 1: used) |
[out] | pb_InterruptEnable | Indicates if the interrupt are enabled or not (0: disabled, 1: enabled) |
[out] | pb_Enable | Indicates if the PWM is enabled or not (0: disabled, 1: enabled) |
0 | No Error |
-1 | The device handle parameter is wrong |
-2 | The module selection is wrong |
-3 | The PWM selection is wrong |
-4 | Error while calling IOCTL function |
-101 | Driver - Invalid module index |
-102 | Driver - Invalid PWM index |
-103 | Driver - The module selected is not a PWM module |
-104 | Driver - The PWM has not been initialized |
-105 | Driver - The PWM has not been enabled |
_INT_ i_PCI1710_GetPWMStatus | ( | HANDLE | h_DeviceHandle, |
BYTE | b_ModulNbr, | ||
BYTE | b_PWM, | ||
PBYTE | pb_PWMOutputStatus, | ||
PBYTE | pb_ExternGateStatus | ||
) |
Returns the selected PWM status of the selected module.
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ModulNbr | Number of the module to configure (0 to 3) |
[in] | b_PWM | Selected PWM (0 or 1) |
[out] | pb_PWMOutputStatus | Returns the PWM output level status (0: low or 1: high) |
[out] | pb_ExternGateStatus | Returns the extern gate level status (0: low or 1: high) |
0 | No Error |
-1 | The device handle parameter is wrong |
-2 | The module selection is wrong |
-3 | The PWM selection is wrong |
-4 | Error while calling IOCTL function |
-101 | Driver - Invalid module index |
-102 | Driver - Invalid PWM index |
-103 | Driver - The module selected is not a PWM module |
-104 | Driver - The PWM has not been initialized |
-105 | Driver - The PWM has not been enabled |
_INT_ i_PCI1710_ReadPWM1DigitalInput | ( | HANDLE | h_DeviceHandle, |
BYTE | b_ModulNbr, | ||
BYTE | b_InputChannel, | ||
PBYTE | pb_ChannelStatus | ||
) |
Reads the status of the selected PWM digital input of the selected module.
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ModulNbr | Number of the module to configure (0 to 3) |
[in] | b_InputChannel | Selected digital input (0 to 2) |
[out] | pb_ChannelStatus | Returns the digital inptut channel status (0: reset or 1: set) |
0 | No Error |
-1 | The device handle parameter is wrong |
-2 | The module selection is wrong |
-3 | The selected digital input is wrong |
-4 | Error while calling IOCTL function |
-101 | Driver - Invalid module index |
-102 | Driver - The module selected is not a PWM module |
_INT_ i_PCI1710_ReadPWMAllDigitalInputs | ( | HANDLE | h_DeviceHandle, |
BYTE | b_ModulNbr, | ||
PBYTE | pb_InputStatus | ||
) |
Reads the status of all the PWM digital inputs of the selected module.
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ModulNbr | Number of the module to configure (0 to 3) |
[out] | pb_InputStatus | Digital inputs channel status |
0 | No Error |
-1 | The device handle parameter is wrong |
-2 | The module selection is wrong |
-3 | Error while calling IOCTL function |
-101 | Driver - Invalid module index |
-102 | Driver - The module selected is not a PWM |
_INT_ i_PCI1710_EnableDisablePWMDigitalOutputManualSetting | ( | HANDLE | h_DeviceHandle, |
BYTE | b_ModulNbr, | ||
BYTE | b_Flag | ||
) |
Enables or disables to set manually the digital output H of the selected module.
When the PWM 0 will be enabled for the first time, the digital output manual setting will be considered as disabled, which means that it would the PWM 0 which will control the digital output of the selected module.
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ModulNbr | Number of the module to configure (0 to 3) |
[in] | b_Flag | Enable/disable flag (0: disable the manual setting, the output H is controlled parallely to the PWM0, or 1: enable the manual setting, the output H will be set via the i_PCI1710_SetPWMDigitalOutputOn function or reset via the i_PCI1710_SetPWMDigitalOutputOff function) |
0 | No Error |
-1 | The device handle parameter is wrong |
-2 | The module selection is wrong |
-3 | The flag parameter is wrong |
-4 | Error while calling IOCTL function |
-101 | Driver - Invalid module index |
-102 | Driver - The module selected is not a PWM |
_INT_ i_PCI1710_SetPWMDigitalOutputOn | ( | HANDLE | h_DeviceHandle, |
BYTE | b_ModulNbr | ||
) |
Sets on the digital output H of the selected PWM of the selected module.
The i_PCI1710_EnableDisablePWMDigitalOutputSetting function must be called before calling this function
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ModulNbr | Number of the module to configure (0 to 3) |
0 | No Error |
-1 | The device handle parameter is wrong |
-2 | The module selection is wrong |
-3 | Error while calling IOCTL function |
-101 | Driver - Invalid module index |
-102 | Driver - The module selected is not a PWM |
-103 | Driver - The manual setting option is not active |
_INT_ i_PCI1710_SetPWMDigitalOutputOff | ( | HANDLE | h_DeviceHandle, |
BYTE | b_ModulNbr | ||
) |
Sets off the digital output H of the selected PWM of the selected module.
The i_PCI1710_EnableDisablePWMDigitalOutputSetting function must be called before calling this function
[in] | h_DeviceHandle | Handle of the board |
[in] | b_ModulNbr | Number of the module to configure (0 to 3) |
0 | No Error |
-1 | The device handle parameter is wrong |
-2 | The module selection is wrong |
-3 | Error while calling IOCTL function |
-101 | Driver - Invalid module index |
-102 | Driver - The module selected is not a PWM |
-103 | Driver - The manual setting option is not active |