Difference between revisions of "Component: Motor Template (Mechatronics)"

From Flowcode Help
Jump to navigationJump to search
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
+
{| style="width:50%"
 
 
{| width="50%"
 
 
|-
 
|-
| width="20%" style="color: gray;" | Author
+
| width="20%" style="color:gray;" | Author
 
| Matrix Ltd
 
| Matrix Ltd
 
|-
 
|-
| width="20%" style="color: gray;" | Version
+
| width="20%" style="color:gray;" | Version
| 1.1 (Release)
+
| 1.1
 
|-
 
|-
| width="20%" style="color: gray;" | Category
+
| width="20%" style="color:gray;" | Category
 
| Mechatronics
 
| 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).
  
==[[File:Component Icon 952471c7_11ca_430b_ab72_4fda8b195f83.png|Image]] Motor Template component==
+
==Component Pack==
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).
 
  
This component can be used as a base to create ''child'' components
+
MECHATRONICS
  
The following components all inherit the traits of Motor Template:
+
==Detailed description==
  
{| class="wikitable" width="50%"
 
|+|-
 
|[[File:Component Icon 3becc5a1_4034_45ca_b84f_d995c6cacdb2.png|Image]] [[Component: ID 3becc5a1_4034_45ca_b84f_d995c6cacdb2|Motor (Full Bridge)]]
 
|Motor that can be driven at a prest speed in either forwards or reverse direction with inertia.
 
Properties support several pin options to allow matching with differents hardware driving
 
circuits.
 
Can be connected to other objects to make them move.
 
|-
 
|[[File:Component Icon 4edcb163_5216_44c4_99d9_d6b24869f341.png|Image]] [[Component: ID 4edcb163_5216_44c4_99d9_d6b24869f341|Motor (Half Bridge)]]
 
|Simple animated motor turned on and off with a single pin connection.
 
Can be linked to other objects to make them move.
 
|}
 
  
==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.
+
''No detailed description exists yet for this component''
  
{{Fcfile|Motors.fcfx|Motors}}
+
==Examples==
  
  
==Downloadable macro reference==
 
  
''This component does not contain any downloadable macros''
 
  
==Simulation macro reference==
+
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.
 +
{{Fcfile|Motors.fcfx|Motors}}
  
===<span style="font-weight: normal;"><u><tt>SetTarget</tt></u></span>===
+
==Downloadable macro reference==
Set a target object external to the motor component.
 
  
This allows the motor to link "mechanically" to other components and
+
{| 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.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" | Target
 +
|-
 +
| colspan="2" | The object to set as a target&nbsp;
 +
|-
 +
| 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''
 +
|}
  
move them around.
 
  
'''Parameters'''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
:[[Variable Types|HANDLE]] ''Target''
+
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
::The object to set as a target
+
| 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.&nbsp;
'''Return value'''
+
|-
 
+
|-
:''This call does not return a value''
+
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 
+
| width="90%" | Speed
 
+
|-
===<span style="font-weight: normal;"><u><tt>SetSpeed</tt></u></span>===
+
| colspan="2" | World units or degrees per second.&nbsp;
Sets the speed for all attached objects.  The speed will change at the rate set by the acceleration property.
+
|-
 
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
'''Parameters'''
+
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
+
|}
:[[Variable Types|FLOAT]] ''Speed''
 
::World units or degrees per second.
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
  
  
Line 85: Line 74:
  
 
==Property reference==
 
==Property reference==
<span style="font-weight: normal;"><u>Frame Interval</u></span>
 
  
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''interval''.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
Time interval between animation frames.
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
Does not affect the speed of motion, only the rate of screen updates.
+
|-
 
+
|-
<span style="font-weight: normal;"><u>On Stop</u></span>
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Animation
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''on_stop''.
+
|-
 
+
|-
Decide what action to take when simulation stops.
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
+
| width="90%" | Frame Interval
No Action - Animation is paused, continues from this position when simulation restarts
+
|-
 
+
| colspan="2" | Time interval between animation frames. Does not affect the speed of motion, only the rate of screen updates.&nbsp;
Return to start - all object returned to their start positions, current speed resumes on simulation start.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
Clear speeds - objects retain their position, but speed is set to zero.
+
| width="90%" | On Stop
 
+
|-
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. &nbsp;
 
+
|-
<span style="font-weight: normal;"><u>Target Object</u></span>
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Moving Part
This property is of type ''Panel object'' and can be referenced with the variable name ''target_object''.
+
|-
 
+
|-
An object within the same host component which the motor will animate.
+
| width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
 
+
| width="90%" | Target Object
<span style="font-weight: normal;"><u>Axis Object</u></span>
+
|-
 
+
| colspan="2" | An object within the same host component which the motor will animate.&nbsp;
This property is of type ''Panel object'' and can be referenced with the variable name ''axis_object''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
If the motion property is set to 'Rotary', this sets an object around which the rotation will happen.
+
| width="90%" | Axis Object
 
+
|-
If not set, the 'Target' object will rotate around its own centre.
+
| 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.&nbsp;
 
+
|-
<span style="font-weight: normal;"><u>Axis</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
+
| width="90%" | Axis
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''axis''.
+
|-
 
+
| colspan="2" | Which axis to move along or around.&nbsp;
Which axis to move along or around.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
<span style="font-weight: normal;"><u>Motion</u></span>
+
| width="90%" | Motion
 
+
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''motion_type''.
+
| 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.&nbsp;
 
+
|-
The kind of motion to animate.
+
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
 
+
| width="90%" | Acceleration
Rotary - animated targets will rotate around the given axis.
+
|-
 
+
| colspan="2" | Amount of speed change allowed per second when the motor is powered. Set to zero for instantaneous speed changes. &nbsp;
Linear - animated object will move in a straight line.  Note that there is nothing to prevent the object from
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
moving off screen - stopping or reversing the motion is controlled only by the macro calls.
+
| width="90%" | Deceleration
 
+
|-
<span style="font-weight: normal;"><u>Acceleration</u></span>
+
| 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.&nbsp;
 
+
|}
This property is of type ''Floating point'' and can be referenced with the variable name ''acceleration''.
 
 
 
Amount of speed change allowed per second when the motor is powered.
 
 
 
Set to zero for instantaneous speed changes.
 
 
 
<span style="font-weight: normal;"><u>Deceleration</u></span>
 
 
 
This property is of type ''Floating point'' and can be referenced with the variable name ''deceleration''.
 
 
 
Amount of speed change allowed per second when power is removed and the motor is coasting.
 
 
 
Set to zero for instantaneous speed changes.
 

Latest revision as of 17:27, 9 November 2022

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 Pack

MECHATRONICS

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. FC6 Icon.png Motors

Downloadable macro reference

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


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



Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Animation
Fc9-type-21-icon.png Frame Interval
Time interval between animation frames. Does not affect the speed of motion, only the rate of screen updates. 
Fc9-type-16-icon.png 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.  
Fc9-conn-icon.png Moving Part
Fc9-type-17-icon.png Target Object
An object within the same host component which the motor will animate. 
Fc9-type-17-icon.png 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. 
Fc9-type-16-icon.png Axis
Which axis to move along or around. 
Fc9-type-16-icon.png 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. 
Fc9-type-15-icon.png Acceleration
Amount of speed change allowed per second when the motor is powered. Set to zero for instantaneous speed changes.  
Fc9-type-15-icon.png Deceleration
Amount of speed change allowed per second when power is removed and the motor is coasting. Set to zero for instantaneous speed changes.