Table of Contents
hil_set_pwm_deadband
The HIL API MATLAB functions have been deprecated in favour of the new quanser.hardware.hil class, which has support for code generation for Quanser targets. Hence, with the new hil class it is possible to run MATLAB scripts in real-time on Quanser targets, while making use of the Quanser hardware. |
Sets the deadband employed for the specified PWM channels.
err = hil_set_pwm_deadband(board, 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.
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.
board
A board handle returned by hil_open.
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.
hil_set_pwm_deadband(board, [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.