L293D DC Motor
Libraries:
Simulink Support Package for Arduino Hardware /
Common
Description
The L293D DC Motor block controls power and direction of a DC motor connected to motor driver shields such as L293D and L298N.
Supported Hardware
The L293D DC Motor block supports all Arduino boards.
Ports
Input
Port_1 — Input signal
value between –100
and
100
The sign of the input signal determines the direction of rotation of the DC motor. A positive sign indicates a forward rotation, whereas a negative sign indicates a reverse rotation. The amplitude determines the power supplied to the motor.
1
to100
: Forward rotation, minimum to maximum power.–1
to–100
: Reverse rotation, minimum to maximum power.0
: No power is supplied.
Any out-of-range values, at the block input port has the same effect as the maximum or minimum input values.
Data Types: single
| double
| int8
| int16
| int32
| uint8
| uint16
| uint32
Parameters
Enable pin — Enable pin on DC motor
5
(default)
Specify the enable pin number on the motor driver shield to which the DC motor is connected.
Input A pin — Input A pin number for DC motor
8
(default)
Specify the Input A pin number on the motor driver shield that is connected to the DC motor.
Do not assign the same pin number to more than one DC Motor block within the same model.
Input B pin — Input B pin number for DC motor
10
(default)
Specify the Input B pin number on the motor driver shield that is connected to the DC motor.
Do not assign the same pin number to more than one DC Motor block within the same model.
Version History
Introduced in R2023a
See Also
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)