Difference between revisions of "Component: DC Motor ()"
From Flowcode Help
Jump to navigationJump to search(8 intermediate revisions by the same user not shown) | |||
Line 17: | Line 17: | ||
==Component Source Code== | ==Component Source Code== | ||
− | Please click here | + | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Motor_with_reverse.fcfx FC_Comp_Source_Motor_with_reverse.fcfx] |
+ | |||
+ | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Motor_with_reverse.fcfx FC_Comp_Source_Motor_with_reverse.fcfx] | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Line 36: | Line 48: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Line 53: | Line 75: | ||
{{Fcfile|Motors.fcfx|Motors}} | {{Fcfile|Motors.fcfx|Motors}} | ||
− | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==Macro reference== | ||
+ | |||
+ | ===Break=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Break''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Actively drives both ends of the motor by setting the pins according to the 'Brake Pattern' property. |
|- | |- | ||
|- | |- | ||
Line 68: | Line 101: | ||
+ | ===Coast=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Coast''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Turn off power to the motor by setting the pins according to the 'Coast Pattern' property. |
|- | |- | ||
|- | |- | ||
Line 81: | Line 115: | ||
+ | ===Disable=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 94: | Line 129: | ||
+ | ===Enable=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Enable''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Enables the motor output |
|- | |- | ||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
Line 112: | Line 143: | ||
+ | ===Forwards=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Forwards''' |
+ | |- | ||
+ | | colspan="2" | Set the motor turning in the forwards direction by setting the pins according to the 'Reverse Pattern' property. | ||
+ | |- | ||
|- | |- | ||
− | | | + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
+ | | width="90%" | Duty | ||
|- | |- | ||
+ | | colspan="2" | Sets the motor power for PWM or H-Bridge outputs | ||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
Line 125: | Line 162: | ||
+ | ===Reverse=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 141: | Line 179: | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
− | |||
− | |||
Latest revision as of 13:12, 7 February 2023
Author | Matrix Ltd. |
Version | 1.2 |
Category |
Contents
DC Motor component
DC Motor that can be driven in one or both directions using digital output pins, PWM or HBRIDGE peripherals.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Motor_with_reverse.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Motor_with_reverse.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Simple example showing how to drive the motor components and how to create sub assemblies attached to the motor output shafts in the simulation panels. Motors
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 'Reverse Pattern' property. | |
- UINT | Duty |
Sets the motor power for PWM or H-Bridge outputs | |
- VOID | 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 |