Jump to content

Component: Stepper Motor (Mechatronics): Difference between revisions

From Flowcode Help
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;" align="center"" to "width="10%" align="center" class="mtx-class-macrohead""
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;"" to "width="10%" align="center" class="mtx-class-macrohead""
Line 163: Line 163:
{| class="mtx-class-macrotable wikitable"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
|-
|-

Revision as of 14:21, 13 July 2026

Author Matrix Ltd
Version 1.2
Category Mechatronics


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

DecrementStep

DecrementStep
Move the motor backwards by one step. 
- VOID Return


DisableMotor

DisableMotor
Turn off the motor. It will no longer respond to any other macros. 
- VOID Return


EnableMotor

EnableMotor
Turn on the motor. This must be done before it will respond to any other macros. 
- VOID Return


GetSimAngle

GetSimAngle
Gets the angle of the simulated motor shaft in degrees. 
- FLOAT Return


IncrementStep

IncrementStep
Move the motor forward by one step. 
- VOID Return


Property reference

Properties
Connections
Driver
 
Coil 1
Chip pin to which the first motor coil is connected. 
Coil 2
Chip pin to which the second motor coil is connected. 
Coil 3
Chip pin to which the third motor coil is connected. 
Coil 4
Chip pin to which the fourth motor coil is connected. 
Motor Setup
Step Type
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. 
Simulation
Show Pin Labels
 
Label Colour
 
Waveforms
Allows waveforms to be auto generated on the data recorder window. 
Motor Simulation
Steps Per Revolution
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. 
Angle Increment
Amount of change in the shaft angle when the IncrementStep / DecrementStep functions are called. 
Coil Simulation
Coil Simulation
Turn coil simulation on and off. 
Colour Non Active Coil
Make coil object this colour when they are NOT energised. 
Colour Active Coil
Make the coil objects this colour when they ARE energised,.