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

From Flowcode Help
Jump to navigationJump to search
 
(5 intermediate revisions by the same user 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
 
|}
 
|}
  
  
 +
==Servo Motor Template component==
 +
Base component for creating custom servo motor simulations. Recieves messages  from the the 'Servo Controller' component.  Macro 'SetTarget' allows external objects to be moved by the servo for mechanical simulations.
  
==[[File:Component Icon fbad3c39_8c38_49b7_a860_ae37e9b979a2.png|Image]] Servo Motor Template component==
+
==Component Pack==
Base component for creating custom servo motor simulations.
 
Recieves messages  from the the 'Servo Controller' component.
 
  
Macro 'SetTarget' allows external objects to be moved by the servo
+
MECHATRONICS
for mechanical simulations.
 
  
This component can be used as a base to create ''child'' components
+
==Detailed description==
  
The following components all inherit the traits of Servo Motor Template:
 
  
{| class="wikitable" width="50%"
 
|+|-
 
|[[File:Component Icon dc99e179_216f_4618_aee7_3f5f87541a9d.png|Image]] Brushless Motor (Standard)
 
|A small brushless motor component designed to be driven from a three phase ESC.
 
The ESC would be driven using the Servo Motor Controller component.
 
|-
 
|[[File:Component Icon b6fdc61f_7be2_49c7_925f_aea3dc284cba.png|Image]] Micro Servo (Tower Pro 9g)
 
|Small size 9g servo motor suitable for control by the 'Servo Controller' component.
 
Use the 'Link to...' property to attach other objects to the rotor for emulating
 
mechanical systems.
 
Send a virtual PWM signal to the servo by selecting it as a target of the 'Servo Controller' component.
 
|-
 
|[[File:Component Icon cc031290_2255_4e8d_b382_1998c8dda95a.png|Image]] Standard Servo
 
|Standard size servo motor suitable for control by the 'Servo Controller' component.
 
Use the 'Link to...' property to attach other objects to the rotor for emulating
 
mechanical systems.
 
Send a virtual PWM signal to the servo by selecting it as a target of the 'Servo Controller' component.
 
|}
 
  
==Examples==
 
Please note that the servo motor template and child components require the Servo Controller component to control them.
 
  
  
===Controlling a servo with an analogue input===
+
''No detailed description exists yet for this component''
  
This example reads the value of the analogue potentiometer and uses this to set the position of the servo motor.
+
==Examples==
{{Fcfile|Single servo motor control.fcfx|Servo Example 1}}
 
The Servo controller is linked to the standard servo component but this could be linked to any object on the panel.
 
  
[[File:ServoLink.jpg]]
 
  
  
===Creating a multi-axis actuator using servo motors===
 
  
This example links two servo motors together using panel primitive objects and groups.
 
{{Fcfile|Servo Demo.fcfx|Servo Example 2}}
 
The Servo controller can handle up to 8 motors and is used to control both of the standard servo components on the panel.
 
  
[[File:LinkedServo.jpg]]
+
''<span style="color:red;">No additional examples</span>''
  
 
==Downloadable macro reference==
 
==Downloadable macro reference==
  
''This component does not contain any downloadable macros''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
==Simulation macro reference==
+
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTarget'''
===<span style="font-weight: normal;"><u><tt>SetTarget</tt></u></span>===
+
|-
Set a panel object to be 'connected' to the servo's.
+
| colspan="2" | Set a panel object to be 'connected' to the servo's. The connected object will then move as if connected mechanically to the servo's actuator.&nbsp;
 
+
|-
The connected object will then move as if connected mechanically to
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
the servo's actuator.
+
| width="90%" | Target
 
+
|-
'''Parameters'''
+
| colspan="2" | Object to be moved by the motor&nbsp;
 
+
|-
:[[Variable Types|HANDLE]] ''Target''
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
::Object to be moved by the motor
+
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
+
|}
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
  
  
Line 93: Line 58:
  
 
==Property reference==
 
==Property reference==
<span style="font-weight: normal;"><u>Moving Part</u></span>
 
  
This property is of type ''Panel object'' and can be referenced with the variable name ''moving_object''.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
Set an object on the System Panel to be the servo's actuator.
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
The object's position at the moment of selection is taken to be the 'rest' position of the actuator - the
+
|-
 
+
|-
maximum and minimum angles will be measured from this position.
+
| width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
 
+
| width="90%" | Moving Part
<span style="font-weight: normal;"><u>Axis Object</u></span>
+
|-
 
+
| colspan="2" | Set an object on the System Panel to be the servo's actuator. The object's position at the moment of selection is taken to be the 'rest' position of the actuator - the maximum and minimum angles will be measured from this position.&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]]
Set a panel object to be the centre of rotation of the servo's actuator.
+
| width="90%" | Axis Object
 
+
|-
<span style="font-weight: normal;"><u>Move Around</u></span>
+
| colspan="2" | Set a panel object to be the centre of rotation of the servo's actuator.&nbsp;
 
+
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''rot_axis''.
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
+
| width="90%" | Move Around
Set the axis around which the actuator will revolve.
+
|-
 
+
| colspan="2" | Set the axis around which the actuator will revolve. If an 'Axis Object' is chosen, this will be a local axis of the chosen object, otherwise it will be the current world axes.&nbsp;
If an 'Axis Object' is chosen, this will be a local axis of the chosen object, otherwise it will be the
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
current world axes.
+
| width="90%" | Movement Type
 
+
|-
<span style="font-weight: normal;"><u>Minimum (degrees)</u></span>
+
| colspan="2" | &nbsp;
 
+
|-
This property is of type ''Floating point'' and can be referenced with the variable name ''rot_min''.
+
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
 
+
| width="90%" | Minimum (degrees)
Angle that the servo turns when the PWM signal is at its minimum.
+
|-
 
+
| colspan="2" | Angle that the servo turns when the PWM signal is at its minimum. Measured from the actuator object's 'rest' position, chosen at the time of connecting the object.&nbsp;
Measured from the actuator object's 'rest' position, chosen at the time of connecting the object.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
<span style="font-weight: normal;"><u>Maximum (degrees)</u></span>
+
| width="90%" | Maximum (degrees)
 
+
|-
This property is of type ''Floating point'' and can be referenced with the variable name ''rot_max''.
+
| colspan="2" | Angle that the servo turns when the PWM signal is at its maximum. Measured from the actuator object's 'rest' position, chosen at the time of connecting the object.&nbsp;
 
+
|}
Angle that the servo turns when the PWM signal is at its maximum.
 
 
 
Measured from the actuator object's 'rest' position, chosen at the time of connecting the object.
 

Latest revision as of 17:26, 9 November 2022

Author Matrix Ltd
Version 1.1
Category Mechatronics


Servo Motor Template component

Base component for creating custom servo motor simulations. Recieves messages from the the 'Servo Controller' component. Macro 'SetTarget' allows external objects to be moved by the servo for mechanical simulations.

Component Pack

MECHATRONICS

Detailed description

No detailed description exists yet for this component

Examples

No additional examples

Downloadable macro reference

Fc9-comp-macro.png SetTarget
Set a panel object to be 'connected' to the servo's. The connected object will then move as if connected mechanically to the servo's actuator. 
Fc9-h32-icon.png - HANDLE Target
Object to be moved by the motor 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-17-icon.png Moving Part
Set an object on the System Panel to be the servo's actuator. The object's position at the moment of selection is taken to be the 'rest' position of the actuator - the maximum and minimum angles will be measured from this position. 
Fc9-type-17-icon.png Axis Object
Set a panel object to be the centre of rotation of the servo's actuator. 
Fc9-type-16-icon.png Move Around
Set the axis around which the actuator will revolve. If an 'Axis Object' is chosen, this will be a local axis of the chosen object, otherwise it will be the current world axes. 
Fc9-type-16-icon.png Movement Type
 
Fc9-type-15-icon.png Minimum (degrees)
Angle that the servo turns when the PWM signal is at its minimum. Measured from the actuator object's 'rest' position, chosen at the time of connecting the object. 
Fc9-type-15-icon.png Maximum (degrees)
Angle that the servo turns when the PWM signal is at its maximum. Measured from the actuator object's 'rest' position, chosen at the time of connecting the object.