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

From Flowcode Help
Jump to navigationJump to search
(XML import BR)
(Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix Ltd |- | width="20%" style="color:gray;" | Version | 1.1 |- | width="20%" style="color:gray...")
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
 
|}
 
|}
  
  
 +
==Solenoid Template component==
 +
Base component for constructing solenoids. These take a single input pin and move an actuator between two positions depending on the pin state.
 +
 +
==Component Pack==
  
==[[File:Component Icon eb1db17a_1c6c_44ef_84d0_d718549343c4.png|Image]] Solenoid Template component==
+
MECHATRONICS
Base component for constructing solenoids.
 
These take a single input pin and move an actuator between two positions depending on
 
the pin state.
 
  
This component can be used as a base to create ''child'' components
+
==Detailed description==
  
[[File:Component Icon 1ac8ae8b_bcd2_493f_b516_36dacb3695f9.png|Image]] The component Solenoid DC1 is inherited from this.
+
''No detailed description exists yet for this component''
  
 
==Examples==
 
==Examples==
A solenoid will likely require more current than a microcontroller device can supply to activate the mechanical mechanism.
 
  
To amplify the current from the microcontroller simply use a NPN transistor or N channel FET.
+
''<span style="color:red;">No additional examples</span>''
 
 
The diode is required as with any inductive loads to help protect the microcontroller from back EMF generated by the inductor as the control signal switches the current through the inductor on and off
 
 
 
[[File:Solenoid.jpg]]
 
 
 
 
 
If the solenoid requires a large DC voltage, say 12V then you can connect the 12V directly to the top of the solenoid as shown above rather than using VCC or VDD. The transistor / FET will protect the micro from the large Voltage.
 
  
 
==Downloadable macro reference==
 
==Downloadable macro reference==
  
===<span style="font-weight: normal;"><u><tt>TurnOn</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Activate the solenoid
+
|-
 +
| 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" | Choose an extermal object to move along with the solenoid's actuator&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-h32-icon.png]] - HANDLE
 +
| width="90%" | Object
 +
|-
 +
| colspan="2" | An object to be moved by the solenoid&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''
 +
|}
  
'''Parameters'''
 
  
:''This macro has no parameters''
+
{| 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;" | '''TurnOn'''
 +
|-
 +
| colspan="2" | Activate the solenoid&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''
 +
|}
  
  
'''Return value'''
+
{| 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;" | '''SetState'''
 +
|-
 +
| colspan="2" | Trun the solenoid on or off using a boolean value.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 +
| width="90%" | State
 +
|-
 +
| colspan="2" | The new state for the solenoid to take.&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''
 +
|}
  
:''This call does not return a value''
 
  
 
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
===<span style="font-weight: normal;"><u><tt>SetState</tt></u></span>===
+
|-
Trun the solenoid on or off using a boolean value.
+
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TurnOff'''
'''Parameters'''
+
|-
 
+
| colspan="2" | De-activate the solenoid&nbsp;
:[[Variable Types|BOOL]] ''State''
+
|-
::The new state for the solenoid to take.
+
|-
 
+
| 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''
'''Return value'''
+
|}
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>TurnOff</tt></u></span>===
 
De-activate the solenoid
 
 
 
'''Parameters'''
 
 
 
:''This macro has no parameters''
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
 
 
==Simulation macro reference==
 
 
 
===<span style="font-weight: normal;"><u><tt>SetTarget</tt></u></span>===
 
Choose an extermal object to move along with the solenoid's actuator
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|HANDLE]] ''Object''
 
::An object to be moved by the solenoid
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
  
  
Line 98: Line 94:
  
 
==Property reference==
 
==Property reference==
<span style="font-weight: normal;"><u>Pin</u></span>
 
  
This property is of type ''Single digital pin'' and can be referenced with the variable name ''pin''.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
Chip pin to connect the solenoid circuit to.
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
NB) Solenoid cannot be moved unless there is a valid connection.
+
|-
 
+
|-
<span style="font-weight: normal;"><u>Moving part</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
+
| width="90%" | Pin
This property is of type ''Panel object'' and can be referenced with the variable name ''int_target''.
+
|-
 
+
| colspan="2" | Chip pin to connect the solenoid circuit to. NB) Solenoid cannot be moved unless there is a valid connection.&nbsp;
A panel object to be moved back and forth when the solenoid is activated.
+
|-
 
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
<span style="font-weight: normal;"><u>Pivot object</u></span>
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''  
 
+
|-
This property is of type ''Panel object'' and can be referenced with the variable name ''pivot''.
+
|-
 
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
A position to rotate around when the solenoid type is set to 'Rotate'
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''  
 
+
|-
Not required for linear solenoids.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
<span style="font-weight: normal;"><u>Type</u></span>
+
| width="90%" | Moving part
 
+
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''movetype''.
+
| colspan="2" | A panel object to be moved back and forth when the solenoid is activated.&nbsp;
 
+
|-
The type of motion of the solenoid actuator.
+
| width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
 
+
| width="90%" | Pivot object
<span style="font-weight: normal;"><u>Axis</u></span>
+
|-
 
+
| colspan="2" | A position to rotate around when the solenoid type is set to 'Rotate' Not required for linear solenoids.&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-16-icon.png]]
For linear solenoids, the axis along which the actuator will move.
+
| width="90%" | Type
 
+
|-
For rotary solenoids, the axis around which it will rotate.
+
| colspan="2" | The type of motion of the solenoid actuator.&nbsp;
 
+
|-
<span style="font-weight: normal;"><u>Distance</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
+
| width="90%" | Axis
This property is of type ''Floating point'' and can be referenced with the variable name ''move''.
+
|-
 
+
| colspan="2" | For linear solenoids, the axis along which the actuator will move. For rotary solenoids, the axis around which it will rotate.&nbsp;
For linear solenoids, the distance between the 'off'' and 'on' states in model units.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
For rotary solenoids, the rotation in degrees.
+
| width="90%" | Distance
 
+
|-
<span style="font-weight: normal;"><u>Time (ms)</u></span>
+
| colspan="2" | For linear solenoids, the distance between the 'off'' and 'on' states in model units. For rotary solenoids, the rotation in degrees.&nbsp;
 
+
|-
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''animate_time''.
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
+
| width="90%" | Time (ms)
The time taken for the solenoid to move between the on and off positions.
+
|-
 
+
| colspan="2" | The time taken for the solenoid to move between the on and off positions. Used only for the purpose of System Panel animations on screen.&nbsp;
Used only for the purpose of System Panel animations on screen.
+
|}

Revision as of 16:29, 7 January 2022

Author Matrix Ltd
Version 1.1
Category Mechatronics


Solenoid Template component

Base component for constructing solenoids. These take a single input pin and move an actuator between two positions depending on the pin state.

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
Choose an extermal object to move along with the solenoid's actuator 
Fc9-h32-icon.png - HANDLE Object
An object to be moved by the solenoid 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png TurnOn
Activate the solenoid 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetState
Trun the solenoid on or off using a boolean value. 
Fc9-bool-icon.png - BOOL State
The new state for the solenoid to take. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png TurnOff
De-activate the solenoid 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-5-icon.png Pin
Chip pin to connect the solenoid circuit to. NB) Solenoid cannot be moved unless there is a valid connection. 
Fc9-conn-icon.png Connections
Fc9-conn-icon.png Simulations
Fc9-type-17-icon.png Moving part
A panel object to be moved back and forth when the solenoid is activated. 
Fc9-type-17-icon.png Pivot object
A position to rotate around when the solenoid type is set to 'Rotate' Not required for linear solenoids. 
Fc9-type-16-icon.png Type
The type of motion of the solenoid actuator. 
Fc9-type-16-icon.png Axis
For linear solenoids, the axis along which the actuator will move. For rotary solenoids, the axis around which it will rotate. 
Fc9-type-15-icon.png Distance
For linear solenoids, the distance between the 'off and 'on' states in model units. For rotary solenoids, the rotation in degrees. 
Fc9-type-21-icon.png Time (ms)
The time taken for the solenoid to move between the on and off positions. Used only for the purpose of System Panel animations on screen.