Component: DC Motor (Mechatronics)
From Flowcode Help
(Redirected from Component: ID 4b0e5196 0db2 45a9 bcb9 b172f71f9c4d)
Jump to navigationJump to searchAuthor | Matrix TSL |
Version | 1.2 |
Category | Mechatronics |
Contents
DC Motor component
DC Motor that can be driven in one or both directions using digital output pins, PWM or HBRIDGE peripherals.
Version information
Library Version, Component Version, Date, Author, Info 2, 1.2, 13-11-24, BR, Altered property tooltips to make them more meaningful
Detailed description
No detailed description exists yet for this component
Examples
Simple example showing how to drive the motor component by only using Enable and two port pins.
Macro reference
Break
Break | |
Actively drives both ends of the motor by setting the pins according to the 'Brake Pattern' property. | |
- VOID | Return |
Coast
Coast | |
Turn off power to the motor by setting the pins according to the 'Coast Pattern' property. | |
- VOID | Return |
Disable
Disable | |
Disable the motor output | |
- VOID | Return |
Enable
Enable | |
Enables the motor output | |
- VOID | Return |
Forwards
Forwards | |
Set the motor turning in the forwards direction by setting the pins according to the 'Forwards Pattern' property. | |
- UINT | Duty |
Sets the motor power for PWM or H-Bridge outputs | |
- VOID | Return |
GetSimAngle
GetSimAngle | |
Gets the angle of the simulated motor shaft in degrees. | |
- FLOAT | Return |
Reverse
Reverse | |
Set the motor turning in the reverse direction by setting the pins according to the 'Reverse Pattern' property. | |
- UINT | Duty |
Sets the motor power for PWM or H-Bridge outputs | |
- VOID | Return |
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_DCMotor_2d.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_DCMotor_2d.fcfx