Difference between revisions of "Component: Stepper Motor Template (Mechatronics)"
From Flowcode Help
Jump to navigationJump to searchLine 17: | Line 17: | ||
==Component Source Code== | ==Component Source Code== | ||
− | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/ | + | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_temp/Stepper_Motor_Base.fcfx FC_Comp_Source_temp/Stepper_Motor_Base.fcfx] |
− | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/ | + | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_temp/Stepper_Motor_Base.fcfx FC_Comp_Source_temp/Stepper_Motor_Base.fcfx] |
==Detailed description== | ==Detailed description== | ||
Line 60: | Line 60: | ||
''<span style="color:red;">No additional examples</span>'' | ''<span style="color:red;">No additional examples</span>'' | ||
+ | |||
+ | |||
Line 67: | Line 69: | ||
==Macro reference== | ==Macro reference== | ||
− | === | + | ===DecrementStep=== |
{| 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;" | '''DecrementStep''' |
|- | |- | ||
− | | colspan="2" | Move the motor | + | | colspan="2" | Move the motor backwards by one step. |
|- | |- | ||
|- | |- | ||
Line 81: | Line 83: | ||
− | === | + | ===DisableMotor=== |
{| 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;" | '''DisableMotor''' |
|- | |- | ||
− | | colspan="2" | | + | | 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="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
Line 100: | Line 97: | ||
− | === | + | ===EnableMotor=== |
{| 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;" | '''EnableMotor''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Turn on the motor. This must be done before it will respond to any other macros. |
|- | |- | ||
|- | |- | ||
Line 114: | Line 111: | ||
− | === | + | ===IncrementStep=== |
{| 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;" | '''IncrementStep''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Move the motor forward by one step. |
|- | |- | ||
|- | |- | ||
Line 128: | Line 125: | ||
− | === | + | ===SetTarget=== |
{| 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;" | '''SetTarget''' |
+ | |- | ||
+ | | colspan="2" | Assign a panel object to be moved by the motor. Once linked, the object will respond to the 'Motor Simulation' properties, and it will be moved whenever the motor is stepped. | ||
+ | |- | ||
|- | |- | ||
− | | | + | | width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE |
+ | | width="90%" | target | ||
|- | |- | ||
+ | | colspan="2" | An object to be moved by the motor. | ||
|- | |- | ||
| 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 |
Revision as of 12:03, 3 February 2023
Author | Matrix Ltd |
Version | 1.2 |
Category | Mechatronics |
Contents
Stepper Motor Template component
Enables the creation of a stepper motor component by specifying objects for its appearance. 'Attach to...' property should be exposed in any components buit from this - this sets a target object to be joined to the motor shaft. The target can then be rotated around the axis with a custom gear ration, or moved linearly according to the pitch of a given lead screw.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_temp/Stepper_Motor_Base.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_temp/Stepper_Motor_Base.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
DecrementStep
![]() |
DecrementStep |
Move the motor backwards by one step. | |
![]() |
Return |
DisableMotor
![]() |
DisableMotor |
Turn off the motor. It will no longer respond to any other macros. | |
![]() |
Return |
EnableMotor
![]() |
EnableMotor |
Turn on the motor. This must be done before it will respond to any other macros. | |
![]() |
Return |
IncrementStep
![]() |
IncrementStep |
Move the motor forward by one step. | |
![]() |
Return |
SetTarget