Component: Stepper Motor (Mechatronics)

From Flowcode Help
Jump to navigationJump to search
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

Fc9-comp-macro.png DecrementStep
Move the motor backwards by one step. 
Fc9-void-icon.png - VOID Return


DisableMotor

Fc9-comp-macro.png DisableMotor
Turn off the motor. It will no longer respond to any other macros. 
Fc9-void-icon.png - VOID Return


EnableMotor

Fc9-comp-macro.png EnableMotor
Turn on the motor. This must be done before it will respond to any other macros. 
Fc9-void-icon.png - VOID Return


GetSimAngle

Fc9-comp-macro.png GetSimAngle
Gets the angle of the simulated motor shaft in degrees. 
Fc9-f32-icon.png - FLOAT Return


IncrementStep

Fc9-comp-macro.png IncrementStep
Move the motor forward by one step. 
Fc9-void-icon.png - VOID Return


Property reference

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