Difference between revisions of "Component: Stepper Motor (Mechatronics)"
From Flowcode Help
Jump to navigationJump to searchLine 16: | Line 16: | ||
==Component Source Code== | ==Component Source Code== | ||
+ | |||
+ | Please click here to download the component source project: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_StepperMotor_2d.fcfx FC_Comp_Source_StepperMotor_2d.fcfx] | ||
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_StepperMotor_2d.fcfx FC_Comp_Source_StepperMotor_2d.fcfx] | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_StepperMotor_2d.fcfx FC_Comp_Source_StepperMotor_2d.fcfx] | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
Line 42: | Line 46: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Line 64: | Line 70: | ||
==Macro reference== | ==Macro reference== | ||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IncrementStep''' | ||
+ | |- | ||
+ | | colspan="2" | Move the motor forward by one step. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DecrementStep''' | ||
+ | |- | ||
+ | | colspan="2" | Move the motor backwards by one step. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''EnableMotor''' | ||
+ | |- | ||
+ | | colspan="2" | Turn on the motor. This must be done before it will respond to any other macros. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DisableMotor''' | ||
+ | |- | ||
+ | | colspan="2" | Turn off the motor. It will no longer respond to any other macros. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetSimAngle''' | ||
+ | |- | ||
+ | | colspan="2" | Gets the angle of the simulated motor shaft in degrees. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==Property reference== | ||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Driver | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | Coil 1 | ||
+ | |- | ||
+ | | colspan="2" | Chip pin to which the first motor coil is connected. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | Coil 2 | ||
+ | |- | ||
+ | | colspan="2" | Chip pin to which the second motor coil is connected. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | Coil 3 | ||
+ | |- | ||
+ | | colspan="2" | Chip pin to which the third motor coil is connected. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | Coil 4 | ||
+ | |- | ||
+ | | colspan="2" | Chip pin to which the fourth motor coil is connected. | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Motor Setup | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Step Type | ||
+ | |- | ||
+ | | colspan="2" | Trade accuracy against torque by changing the type of stepping. Refer to the data-sheet for your chosen hardware to determine which modes your device supports. | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | ||
+ | | width="90%" | Show Pin Labels | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-2-icon.png]] | ||
+ | | width="90%" | Label Colour | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | ||
+ | | width="90%" | Waveforms | ||
+ | |- | ||
+ | | colspan="2" | Allows waveforms to be auto generated on the data recorder window. | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Motor Simulation | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | ||
+ | | width="90%" | Steps Per Revolution | ||
+ | |- | ||
+ | | colspan="2" | The number of steps it takes for the motor shaft to turn a full circle (360 degrees). Refer to the data-sheet for your chosen hardware to determine this value. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]] | ||
+ | | width="90%" | Angle Increment | ||
+ | |- | ||
+ | | colspan="2" | Amount of change in the shaft angle when the IncrementStep / DecrementStep functions are called. | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Coil Simulation | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | ||
+ | | width="90%" | Coil Simulation | ||
+ | |- | ||
+ | | colspan="2" | Turn coil simulation on and off. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-1-icon.png]] | ||
+ | | width="90%" | Colour Non Active Coil | ||
+ | |- | ||
+ | | colspan="2" | Make coil object this colour when they are NOT energised. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-1-icon.png]] | ||
+ | | width="90%" | Colour Active Coil | ||
+ | |- | ||
+ | | colspan="2" | Make the coil objects this colour when they ARE energised,. | ||
+ | |}==Macro reference== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
Revision as of 15:24, 20 January 2023
Author | Matrix Ltd |
Version | 1.2 |
Category | Mechatronics |
Contents
Stepper Motor component
A component to drive stepper motor either using direct transistors or using an external stepper driver IC. Complete with 2D based panel simulation of the motor including coils and waveforms.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_StepperMotor_2d.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_StepperMotor_2d.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
![]() |
IncrementStep |
Move the motor forward by one step. | |
![]() |
Return |
![]() |
DecrementStep |
Move the motor backwards by one step. | |
![]() |
Return |
![]() |
EnableMotor |
Turn on the motor. This must be done before it will respond to any other macros. | |
![]() |
Return |
![]() |
DisableMotor |
Turn off the motor. It will no longer respond to any other macros. | |
![]() |
Return |
![]() |
GetSimAngle |
Gets the angle of the simulated motor shaft in degrees. | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
IncrementStep |
Move the motor forward by one step. | |
![]() |
Return |
![]() |
DecrementStep |
Move the motor backwards by one step. | |
![]() |
Return |
![]() |
EnableMotor |
Turn on the motor. This must be done before it will respond to any other macros. | |
![]() |
Return |
![]() |
DisableMotor |
Turn off the motor. It will no longer respond to any other macros. | |
![]() |
Return |
![]() |
GetSimAngle |
Gets the angle of the simulated motor shaft in degrees. | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
IncrementStep |
Move the motor forward by one step. | |
![]() |
Return |
![]() |
DecrementStep |
Move the motor backwards by one step. | |
![]() |
Return |
![]() |
EnableMotor |
Turn on the motor. This must be done before it will respond to any other macros. | |
![]() |
Return |
![]() |
DisableMotor |
Turn off the motor. It will no longer respond to any other macros. | |
![]() |
Return |
![]() |
GetSimAngle |
Gets the angle of the simulated motor shaft in degrees. | |
![]() |
Return |