Jump to content

Component: Motor Template (Mechatronics)

From Flowcode Help
Revision as of 16:51, 30 January 2023 by Wiki bot (talk | contribs)
Author Matrix Ltd
Version 1.1
Category Mechatronics


Motor Template component

Base component for constructing continuous motion - e.g. motors. Automatically animates two objects - one within the same host components (e.g. moving parts of the motor itself), and one external (e.g. the mechanism to which the motor is connected).

Component Source Code

Please click here to download the component source project: FC_Comp_Source_motor_base.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_motor_base.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

SetTarget
Set a target object external to the motor component. This allows the motor to link "mechanically" to other components and move them around. 
- HANDLE Target
The object to set as a target 
- VOID Return


SetSpeed
Sets the speed for all attached objects. The speed will change at the rate set by the acceleration property. 
- FLOAT Speed
World units or degrees per second. 
- VOID Return



Property reference

Properties
Animation
Frame Interval
Time interval between animation frames. Does not affect the speed of motion, only the rate of screen updates. 
On Stop
Decide what action to take when simulation stops. No Action - Animation is paused, continues from this position when simulation restarts Return to start - all object returned to their start positions, current speed resumes on simulation start. Clear speeds - objects retain their position, but speed is set to zero. Return and clear - objects return to start position and have theri speed set to zero.  
Moving Part
Target Object
An object within the same host component which the motor will animate. 
Axis Object
If the motion property is set to 'Rotary', this sets an object around which the rotation will happen. If not set, the 'Target' object will rotate around its own centre. 
Axis
Which axis to move along or around. 
Motion
The kind of motion to animate. Rotary - animated targets will rotate around the given axis. Linear - animated object will move in a straight line. Note that there is nothing to prevent the object from moving off screen - stopping or reversing the motion is controlled only by the macro calls. 
Acceleration
Amount of speed change allowed per second when the motor is powered. Set to zero for instantaneous speed changes.  
Deceleration
Amount of speed change allowed per second when power is removed and the motor is coasting. Set to zero for instantaneous speed changes.