Table of Contents
quanser.hardware.hil.set_pwm_deadband
Sets the deadband employed for the specified PWM channels.
If no err output is provided then it throws an exception if an error occurs. In generated code it prints the error message. Use hil_get_error_message to get the message associated with an error code.
err = board.set_pwm_deadband(channels, leading_edge_deadband, trailing_edge_deadband)
Sets the deadband employed for the specified PWM channels. This function is used only for the primary channel of a bipolar, complementary or paired PWM output.
board
The board instance returned by the quanser.hardware.hil.open function.
channels
A vector of channel numbers. Channel numbers are zero-based.
Select a board type from the list for board-specific details: .
leading_edge_deadband
A vector of leading-edge deadband values in seconds. Each element corresponds to the channel at the same index in the channels vector.
trailing_edge_deadband
A vector of trailing-edge deadband values in seconds. Each element corresponds to the channel at the same index in the channels vector.
err
A negative error code or zero on success.
board.set_pwm_deadband([0 2], [100e-9 50e-9], [100e-9 75e-9]); % Sets PWM channel 0 deadbands to 100ns and channel 2 deadbands to 50ns and 75ns
See Also
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.