|
int MSXE17xx__MFPWMInitAndEnable |
( |
xsd__unsignedLong |
ulMFModuleIndex, |
|
|
xsd__unsignedLong |
ulPWM, |
|
|
xsd__unsignedLong |
ulTimeBase, |
|
|
xsd__unsignedLong |
ulLowTime, |
|
|
xsd__unsignedLong |
ulHighTime, |
|
|
xsd__unsignedLong |
ulStartLevel, |
|
|
xsd__unsignedLong |
ulExternGate, |
|
|
xsd__unsignedLong |
ulStopMode, |
|
|
xsd__unsignedLong |
ulStopLevel, |
|
|
xsd__unsignedLong |
ulSynchroOut, |
|
|
xsd__unsignedLong |
ulDataFrame, |
|
|
xsd__unsignedLong |
ulOption01, |
|
|
xsd__unsignedLong |
ulOption02, |
|
|
xsd__unsignedLong |
ulOption03, |
|
|
xsd__unsignedLong |
ulOption04, |
|
|
struct MSXE17xx__Response * |
Response | |
|
) |
| | |
- Parameters:
-
[in] | ulMFModuleIndex | : Index of the multifunction sub module (0 to 3).
|
[in] | ulPWM | : Selected PWM 0 or 1 |
[in] | ulTimeBase | : PWM time base selection
- 0: 250ns (4MHz)
- 1: micro s (1MHz)
- 2: ms (1kHz)
- 3: s (Hz)
- 4: Diff input C for PWM0 and D for PWM1
- 5: Trigger input (24V)
- 6: Synchro trigger
|
[in] | ulLowTime | : PWM low time reload value (1 to 16777215)
- If the extern clock is used this define the number of clocks for the low level.
- If the internal time base is used this define the low level time : Low time = ulTimeBase * ulLowTime.
|
[in] | ulHighTime | : PWM high time reload value (1 to 16777215)
- If the extern clock is used this define the number of clocks for the high level.
- If the internal time base is used this define the high level time : High time = ulTimeBase * ulHighTime.
|
[in] | ulStartLevel | : PWM start level, time selection
- 0: PWM start with the low level
- 1: PWM start with the high level
|
[in] | ulExternGate | : Extern gate selection
- 0: Extern gate not used
- 1: Diff input C (PWM0) or D (PWM1) is used as gate
- 2: Input trigger (24V) is used as gate
|
[in] | ulStopMode | : Stop mode selection
- 0: Stop the PWM signal directly after a stop condition
- 1: Stop the PWM after the current period is stopped
|
[in] | ulStopLevel | : Stop level selection
- 0: The output signal keep the level after the stop condition
- 1: The output signal is set to low after the stop condition
- 2: The output signal is set to high after the stop condition
|
[in] | ulSynchroOut | : Give the posibility to generate a synchro trigger
- 0: Disabled
- 1: Generate a synchro trigger be each start of period
- 2: Generate a synchro trigger be each end of period
- 3: Generate a synchro trigger be each start and end of period
|
[in] | ulDataFrame | : Give the posibility to send via the data server PWM informations
- 0: Disabled
- 1: Enabled
For each start and end of period the data server send a 5 DWORD frame with following informations:
DWORD 0 : Time stamp micro s
DWORD 1 : Time stamp s
DWORD 2 :
D1-D0 : Sub module index (0 to 3)
D31-D16 : Sub module functionality (1)
DWORD 3 : Event mask
8: PWM0. First period begin
9: PWM0. End of period
10: PWM0. End of last period. Stop condition occur
11: PWM1. First period begin
12: PWM1. End of period
13: PWM1. End of last period. Stop condition occur
DWORD 4 :
D23-D0: Number of occured periods
D24: 0: Diff input C for PWM0 or D for PWM1 is low
1: Diff input C for PWM0 or D for PWM1 is high
D25: 0: Extern trigger input (24V) is low
1: Extern trigger input (24V) is high
D26: 0: PWM output is low
1: PWM output is high
|
[in] | ulOption01 | : Reserved.
|
[in] | ulOption02 | : Reserved.
|
[in] | ulOption03 | : Reserved.
|
[in] | ulOption04 | : Reserved.
|
[out] | Response | :
iReturnValue :
- 0: means the remote function performed OK
- -1: means an system error occured
- -2: Sub module selection wrong
- -3: Sub module is not a PWM
- -4: PWM selection wrong
- -5: Time base selection wrong
- -6: Low time selection wrong
- -7: High time selection wrong
- -8: PWM already in progress
- -9: PWM timing not initialised
- -10: Start level selection wrong
- -11: Extern gate selection wrong
- -12: Extern gate selection identical to the external clock selection
- -13: Stop mode selection wrong
- -14: Stop level selection wrong
- -15: Synchro out trigger selection wrong
- -16: Module is slave and can not generate the syncho out trigger
- -17: Data frame selection wrong
- -18: Can not mixed synchro trigger clock and module synchronisation (ulSynchroOut)
- -100: Init and enable PWM kernel function error
syserrno : system-error code (the value of the libc "errno" code) |
- Returns:
- 0: SOAP_OK
- <> 0: See SOAP error
|