quanser.hardware.hil.set_pwm_configuration quanser.hardware.hil.set_pwm_duty_cycle navigation bar

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.

Syntax

err = board.set_pwm_deadband(channels, leading_edge_deadband, trailing_edge_deadband)
    

Description

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.

Parameters

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.

Outputs

err

A negative error code or zero on success.

Examples

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

 

navigation bar