PWM capture
RC input or PWM input configuration.
info
- RC input - only one channel on one input. Multiple channels, SBUS, ..., are not supported in the standard applications.
- If you do not see these variables, PWM capture is disabled in your application.
- Input duty cycle ranges from 10[us] - 10 000[us]
- Reading resolution is about 1[us] and accuracy about +-10[us]
info
The following variables are located in /common
folder.
States
pwm_ch1
[us]
pwm_ch2
[us]
Raw input readings of the PWM inputs. If PWM signal is not present, last value is shown. Checking for lost signal is done in PWM Signal Conditioner, which is used for the consequent processing.
PWM channel number is not corresponding to the pin names. Check device HW manual or read state description to get correct ordering.
info
Example: AX controller with state description:
-> pwm_ch1 uint16 : [us] raw pwm signal on DIN4
pwm_ch1
input is present on DIN4 on AX controller.
tip
If you see wrong values, try to invert the reading polarity of the signal using the ppmconf
Parameters
ppmconf
PWM capture digital input configuration
Value | Description |
---|---|
0 | default |
255 | inverted polarity |