This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

DC Motor

Set power, direction, and stopping action of a DC motor

  • Library:
  • Simulink Coder Support Package for BeagleBone Blue Hardware

Description

The DC Motor block controls the power, direction, and stopping action of rotation of a DC motor connected to BeagleBone® Blue. Use this block with the Encoder block to measure the incremental position of the motor.

The input signal determines the power supplied to the motor and the direction of rotation of the motor. The stopping action specified in the Stop action parameter of the Block Parameters dialog box determines the stopping behavior of the motor.

During simulations without hardware, this block does nothing. See Block Produces Zeros or Does Nothing in Simulation (Simulink).

Ports

Input

expand all

The block accepts normalized values ranging from –100 to 100.

The sign determines the direction of rotation, and the amplitude determines the power supplied to the motor.

  • 1 to 100: Forward rotation, minimum to maximum power.

  • –1 to –100: Reverse rotation, minimum to maximum power.

  • 0: No power is supplied

For an input value beyond the range of –100 to 100, the block supplies the power with an amplitude of 100.

This block converts the data type of the value it receives to uint8. You do not need to convert the data type of the input signal.

Data Types: uint8

Parameters

expand all

Select the DC motor port index on the hardware to which the DC motor is connected.

Using this parameter, configure the motor to brake or spin freely when the block receives an input of 0 (stop).

  • Brake: When you select this option, a back electromotive force is applied on the motor causing the motor to stop immediately.

  • Free Spin: When you select this option, the motor spins freely as if it is disconnected from the wheel(s).

See Also

Introduced in R2017b