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

From Flowcode Help
Jump to navigationJump to search
(XML import BR)
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%"
+
''No detailed description exists yet for this component''
|+|-
 
|[[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==
 
==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.
 
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}}
 
{{Fcfile|Motors.fcfx|Motors}}
Line 43: Line 31:
 
==Downloadable macro reference==
 
==Downloadable macro reference==
  
''This component does not contain any downloadable macros''
+
{| 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''
 +
|}
  
==Simulation macro reference==
 
  
===<span style="font-weight: normal;"><u><tt>SetTarget</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Set a target object external to the motor component.
+
|-
 
+
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
This allows the motor to link "mechanically" to other components and
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetSpeed'''
 
+
|-
move them around.
+
| colspan="2" | Sets the speed for all attached objects.  The speed will change at the rate set by the acceleration property.&nbsp;
 
+
|-
'''Parameters'''
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
:[[Variable Types|HANDLE]] ''Target''
+
| width="90%" | Speed
::The object to set as a target
+
|-
 
+
| colspan="2" | World units or degrees per second.&nbsp;
 
+
|-
'''Return value'''
+
| 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''
:''This call does not return a value''
+
|}
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetSpeed</tt></u></span>===
 
Sets the speed for all attached objects.  The speed will change at the rate set by the acceleration property.
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|FLOAT]] ''Speed''
 
::World units or degrees per second.
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
  
  
Line 82: Line 70:
  
 
==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" | [[File:Fc9-type-21-icon.png]]
 
+
| width="90%" | Frame Interval
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''on_stop''.
+
|-
 
+
| colspan="2" | Time interval between animation frames. Does not affect the speed of motion, only the rate of screen updates.&nbsp;
Decide what action to take when simulation stops.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
No Action - Animation is paused, continues from this position when simulation restarts
+
| width="90%" | On Stop
 
+
|-
Return to start - all object returned to their start positions, current speed resumes on simulation start.
+
| 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;
 
+
|-
Clear speeds - objects retain their position, but speed is set to zero.
+
| width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
 
+
| width="90%" | Target Object
Return and clear - objects return to start position and have theri speed set to zero.
+
|-
 
+
| colspan="2" | An object within the same host component which the motor will animate.&nbsp;
<span style="font-weight: normal;"><u>Target Object</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
This property is of type ''Panel object'' and can be referenced with the variable name ''target_object''.
+
| width="90%" | Axis Object
 
+
|-
An object within the same host component which the motor will animate.
+
| 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 Object</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
+
| width="90%" | Axis
This property is of type ''Panel object'' and can be referenced with the variable name ''axis_object''.
+
|-
 
+
| colspan="2" | Which axis to move along or around.&nbsp;
If the motion property is set to 'Rotary', this sets an object around which the rotation will happen.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
If not set, the 'Target' object will rotate around its own centre.
+
| width="90%" | Motion
 
+
|-
<span style="font-weight: normal;"><u>Axis</u></span>
+
| 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;
 
+
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''axis''.
+
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
 
+
| width="90%" | Acceleration
Which axis to move along or around.
+
|-
 
+
| colspan="2" | Amount of speed change allowed per second when the motor is powered. Set to zero for instantaneous speed changes. &nbsp;
<span style="font-weight: normal;"><u>Motion</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''motion_type''.
+
| width="90%" | Deceleration
 
+
|-
The kind of motion to animate.
+
| 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;
 
+
|-
Rotary - animated targets will rotate around the given axis.
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''
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" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''
<span style="font-weight: normal;"><u>Acceleration</u></span>
+
|-
 
+
|}
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.
 

Revision as of 16:29, 7 January 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-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-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. 
Fc9-conn-icon.png Connections
Fc9-conn-icon.png Simulations