Jump to content

Component: Motor Template (Mechatronics): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(11 intermediate revisions by 2 users not shown)
Line 17: Line 17:
==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_motor_base.fcfx FC_Comp_Source_motor_base.fcfx]
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_motor_base.fcfx FC_Comp_Source_motor_base.fcfx]


Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_motor_base.fcfx FC_Comp_Source_motor_base.fcfx]
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_motor_base.fcfx FC_Comp_Source_motor_base.fcfx]


==Detailed description==
==Detailed description==




Line 36: Line 40:


==Examples==
==Examples==




Line 51: Line 59:
{{Fcfile|Motors.fcfx|Motors}}
{{Fcfile|Motors.fcfx|Motors}}


==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;" | '''SetTarget'''
|-
| colspan="2" | Set a target object external to the motor component. This allows the motor to link "mechanically" to other components and move them around. 
|-
|-
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="90%" | Target
|-
| colspan="2" | The object to set as a target 
|-
| 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;" | '''SetSpeed'''
|-
| colspan="2" | Sets the speed for all attached objects.  The speed will change at the rate set by the acceleration property. 
|-
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Speed
|-
| colspan="2" | World units or degrees per second. 
|-
| 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''
|}








==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;" | Animation
|-
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | Frame Interval
|-
| colspan="2" | Time interval between animation frames. Does not affect the speed of motion, only the rate of screen updates. 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | On Stop
|-
| colspan="2" | 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.  
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Moving Part
|-
|-
| width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
| width="90%" | Target Object
|-
| colspan="2" | An object within the same host component which the motor will animate. 
|-
| width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
| width="90%" | Axis Object
|-
| colspan="2" | 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. 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Axis
|-
| colspan="2" | Which axis to move along or around. 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Motion
|-
| colspan="2" | 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. 
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="90%" | Acceleration
|-
| colspan="2" | Amount of speed change allowed per second when the motor is powered. Set to zero for instantaneous speed changes.  
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="90%" | Deceleration
|-
| colspan="2" | Amount of speed change allowed per second when power is removed and the motor is coasting. Set to zero for instantaneous speed changes. 
|}==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;" | '''SetTarget'''
|-
| colspan="2" | Set a target object external to the motor component. This allows the motor to link "mechanically" to other components and move them around. 
|-
|-
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
| width="90%" | Target
|-
| colspan="2" | The object to set as a target 
|-
| 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''
|}


==Macro reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===SetSpeed===
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetSpeed'''
| width="90%" class="mtx-class-macrohead" | '''SetSpeed'''
|-
|-
| colspan="2" | Sets the speed for all attached objects.  The speed will change at the rate set by the acceleration property. 
| colspan="2" | Sets the speed for all attached objects.  The speed will change at the rate set by the acceleration property. 
Line 184: Line 90:




 
===SetTarget===
 
{| class="mtx-class-macrotable wikitable"
==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;" | Animation
|-
|-
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" | Frame Interval
|-
| colspan="2" | Time interval between animation frames. Does not affect the speed of motion, only the rate of screen updates. 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | On Stop
|-
| colspan="2" | 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.  
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Moving Part
|-
|-
| width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
| width="90%" | Target Object
|-
| colspan="2" | An object within the same host component which the motor will animate. 
|-
| width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
| width="90%" | Axis Object
|-
| colspan="2" | 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. 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Axis
|-
| colspan="2" | Which axis to move along or around. 
|-
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| width="90%" | Motion
|-
| colspan="2" | 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. 
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="90%" | Acceleration
|-
| colspan="2" | Amount of speed change allowed per second when the motor is powered. Set to zero for instantaneous speed changes.  
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="90%" | Deceleration
|-
| colspan="2" | Amount of speed change allowed per second when power is removed and the motor is coasting. Set to zero for instantaneous speed changes. 
|}==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="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTarget'''
| width="90%" class="mtx-class-macrohead" | '''SetTarget'''
|-
|-
| colspan="2" | Set a target object external to the motor component. This allows the motor to link "mechanically" to other components and move them around. 
| colspan="2" | Set a target object external to the motor component. This allows the motor to link "mechanically" to other components and move them around. 
Line 259: Line 107:
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| 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;" | '''SetSpeed'''
|-
| colspan="2" | Sets the speed for all attached objects.  The speed will change at the rate set by the acceleration property. 
|-
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Speed
|-
| colspan="2" | World units or degrees per second. 
|-
| 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''
|}




==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| 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%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Animation
| width="90%" class="mtx-class-propfolder" | Animation
|-
|-
|-
|-
Line 303: Line 131:
| colspan="2" | 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.  
| colspan="2" | 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.  
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Moving Part
| width="90%" class="mtx-class-propfolder" | Moving Part
|-
|-
|-
|-

Latest revision as of 14:37, 13 July 2026

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

SetSpeed

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


SetTarget

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


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.