Jump to content

Component: Linear Actuator (Mechatronics): Difference between revisions

From Flowcode Help
XML import
 
No edit summary
Line 1: Line 1:
 
{| style="width:50%"
 
{| width="50%"
|-
|-
| width="20%" style="color: gray;" | Author
| width="20%" style="color:gray;" | Author
| Matrix TSL
| Matrix TSL
|-
|-
| width="20%" style="color: gray;" | Version
| width="20%" style="color:gray;" | Version
| 1.0 (Release)
| 1.0
|-
|-
| width="20%" style="color: gray;" | Category
| width="20%" style="color:gray;" | Category
| Mechatronics
| Mechatronics
|}
|}




 
==Linear Actuator component==
==[[File:Component Icon 15921536_cf92_4cd3_88e4_207c251ab775.png|Image]] Linear Actuator component==
Creates a linear actuator that can be used with the various motor components via a coupling or gearbox.
Creates a linear actuator that can be used with the various motor components via a coupling or gearbox.


==Examples==
==Detailed description==
''<span style="color:red;">No additional examples</span>''


''No detailed description exists yet for this component''


==Downloadable macro reference==
==Examples==


===<span style="font-weight: normal;"><u><tt>CheckLimits</tt></u></span>===
Checks to see if either limit switch is active.


Returns 1 if min switch is active, 2 if max switch is active, 3 if both switches are active
''<span style="color:red;">No additional examples</span>''


else returns 0.


'''Parameters'''
==Downloadable macro reference==


:''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;" | '''Rotate'''
|-
| colspan="2" | Simulation Rotate function to allow accurate rotation during simulation. Automatically called by any attached coupling or gearbox component.&nbsp;
|-
|-
| width="10%" align="center" | [[File:]] -
| width="90%" | Angle
|-
| colspan="2" | Amount to rotate the shaft input in degrees&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;" | '''CheckLimits'''
|-
| colspan="2" | Checks to see if either limit switch is active. Returns 1 if min switch is active, 2 if max switch is active, 3 if both switches are active else returns 0.&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


:[[Variable Types|BYTE]]


{| 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;" | '''ReadMic'''
|-
| colspan="2" | Reads the current audio signal level from the on-board microphone.&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] -
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}




==Simulation 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;" | '''ReadSwitch'''
|-
| colspan="2" | Reads the value of one of the switches from the front of the Formula Flowcode.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Switch
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


===<span style="font-weight: normal;"><u><tt>Rotate</tt></u></span>===
Simulation Rotate function to allow accurate rotation during simulation.


Automatically called by any attached coupling or gearbox component.
{| 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;" | '''SpinLeft'''
|-
| colspan="2" | Spins the formula flowcode on the spot in an anticlockwise direction as seen from above.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Power
|-
| colspan="2" | &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'''


:[[Variable Types|FLOAT]] ''Angle''
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
::Amount to rotate the shaft input in degrees
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Forward'''
|-
| colspan="2" | Drives both motors of the formula flowcode forwards with the power specified.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Power
|-
| colspan="2" | &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;" | '''ReadLineSensor'''
|-
| colspan="2" | Returns the digital value from the line sensor specified.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Sensor
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


:''This call does not return a 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;" | '''SpinRight'''
|-
| colspan="2" | Spins the formula flowcode on the spot in a clockwise direction as seen from above.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Power
|-
| colspan="2" | &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''
|}




{| 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;" | '''CheckIR'''
|-
| colspan="2" | Checks to see if a IR sensor is within the master threshold distance.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Sensor
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


==Property reference==
<span style="font-weight: normal;"><u>Translation Per Rev</u></span>


This property is of type ''Floating point'' and can be referenced with the variable name ''Ratio''.
{| 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;" | '''ReadIRSensor'''
|-
| colspan="2" | Reads the analogue value from the specified IR distance sensor.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Sensor
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


Sets the amount of translation for each revolution of the input shaft.


M4 = 0.7mm
{| 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;" | '''SetMotors'''
|-
| colspan="2" | Sets the speed and direction of the Formula Flowcode motors.&nbsp;
|-
|-
| width="10%" align="center" | [[File:]] -
| width="90%" | Left_Power
|-
| colspan="2" | Valid Range = -255 to 255&nbsp;
|-
| width="10%" align="center" | [[File:]] -
| width="90%" | Right_Power
|-
| colspan="2" | Valid Range = -255 to 255&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''
|}


M5 = 0.8mm


M6 = 1.0mm
{| 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;" | '''Reverse'''
|-
| colspan="2" | Drives both motors of the formula flowcode backwards with the power specified.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Power
|-
| colspan="2" | &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''
|}


M8 = 1.25mm


M10 = 1.5mm
{| 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;" | '''WaitForSwitch'''
|-
| colspan="2" | Waits for the specified switch to be pressed.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Switch
|-
| colspan="2" | &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''
|}


<span style="font-weight: normal;"><u>Travel</u></span>


This property is of type ''Floating point'' and can be referenced with the variable name ''Length''.
{| 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;" | '''ReadLDR'''
|-
| colspan="2" | Reads the current audio signal level from the on-board light sensor.&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] -
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


Amount of travel in the linear actuator before hitting the end stops


<span style="font-weight: normal;"><u>Revolutions</u></span>
{| 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;" | '''WriteLEDs'''
|-
| colspan="2" | Allows control of all 8-LEDs on the front of the Formula Flowcode.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | LED_Byte
|-
| colspan="2" | &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 property is of type ''Floating point'' and can be referenced with the variable name ''NumRevs''.


Number of revolutions the actuator can travel
{| 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;" | '''Initialise'''
|-
| colspan="2" | Starts up the formula flowcode PWM for motor control and performs the wait for button press&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''
|}


<span style="font-weight: normal;"><u>Colour</u></span>


This property is of type ''Color picker'' and can be referenced with the variable name ''Colour''.


Sets the colour of the actuator and end stops


<span style="font-weight: normal;"><u>Output</u></span>
==Property reference==


This property is of type ''Panel object'' and can be referenced with the variable name ''Output''.
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
Output connection for example an end tool or another linear slide and motor group.
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
<span style="font-weight: normal;"><u>Output Offset X</u></span>
|-
 
|-
This property is of type ''Floating point'' and can be referenced with the variable name ''OutputOffsetX''.
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
 
| width="90%" | Translation Per Rev
Distance along the X axis from the center of the coupling to the center of the output object.
|-
 
| colspan="2" | Sets the amount of translation for each revolution of the input shaft. M4 = 0.7mm M5 = 0.8mm M6 = 1.0mm M8 = 1.25mm M10 = 1.5mm&nbsp;
<span style="font-weight: normal;"><u>Output Offset Y</u></span>
|-
 
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
This property is of type ''Floating point'' and can be referenced with the variable name ''OutputOffsetY''.
| width="90%" | Travel
 
|-
Distance along the X axis from the center of the coupling to the center of the output object.
| colspan="2" | Amount of travel in the linear actuator before hitting the end stops&nbsp;
 
|-
<span style="font-weight: normal;"><u>Output Offset Z</u></span>
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
 
| width="90%" | Revolutions
This property is of type ''Floating point'' and can be referenced with the variable name ''OutputOffsetZ''.
|-
 
| colspan="2" | Number of revolutions the actuator can travel&nbsp;
Distance along the shaft from the center of the coupling to the center of the output object.
|-
 
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
<span style="font-weight: normal;"><u>Limit Type</u></span>
| width="90%" | Colour
 
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''LimitType''.
| colspan="2" | Sets the colour of the actuator and end stops&nbsp;
 
|-
Controls if limit switches are available on the linear actuator.
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Limit Type
<span style="font-weight: normal;"><u>Switch Polarity</u></span>
|-
 
| colspan="2" | Controls if limit switches are available on the linear actuator.&nbsp;
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''SwitchPolarity''.
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
Sets the active polarity of the input switches.
| width="90%" | Switch Polarity
 
|-
Active low are often used to help reduce noise on the switch inputs.
| colspan="2" | Sets the active polarity of the input switches. Active low are often used to help reduce noise on the switch inputs.&nbsp;
 
|-
<span style="font-weight: normal;"><u>Min Switch Pin</u></span>
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
| width="90%" | Min Switch Pin
This property is of type ''Single digital pin'' and can be referenced with the variable name ''MinPin''.
|-
 
| colspan="2" | Pin connection used for the minimum limit switch&nbsp;
Pin connection used for the minimum limit switch
|-
 
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
<span style="font-weight: normal;"><u>Max Switch Pin</u></span>
| width="90%" | Max Switch Pin
 
|-
This property is of type ''Single digital pin'' and can be referenced with the variable name ''MaxPin''.
| colspan="2" | Pin connection used for the maximum limit switch&nbsp;
 
|-
Pin connection used for the maximum limit switch
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''  
|-
|-
| width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
| width="90%" | Output
|-
| colspan="2" | Output connection for example an end tool or another linear slide and motor group.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="90%" | Output Offset X
|-
| colspan="2" | Distance along the X axis from the center of the coupling to the center of the output object.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="90%" | Output Offset Y
|-
| colspan="2" | Distance along the X axis from the center of the coupling to the center of the output object.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="90%" | Output Offset Z
|-
| colspan="2" | Distance along the shaft from the center of the coupling to the center of the output object.&nbsp;
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''  
|-
|}

Revision as of 21:05, 16 November 2021

Author Matrix TSL
Version 1.0
Category Mechatronics


Linear Actuator component

Creates a linear actuator that can be used with the various motor components via a coupling or gearbox.

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

Rotate
Simulation Rotate function to allow accurate rotation during simulation. Automatically called by any attached coupling or gearbox component. 
[[File:]] - Angle
Amount to rotate the shaft input in degrees 
- VOID Return


CheckLimits
Checks to see if either limit switch is active. Returns 1 if min switch is active, 2 if max switch is active, 3 if both switches are active else returns 0. 
- BYTE Return


ReadMic
Reads the current audio signal level from the on-board microphone. 
[[File:]] - Return


ReadSwitch
Reads the value of one of the switches from the front of the Formula Flowcode. 
- BYTE Switch
 
- BYTE Return


SpinLeft
Spins the formula flowcode on the spot in an anticlockwise direction as seen from above. 
- BYTE Power
 
- VOID Return


Forward
Drives both motors of the formula flowcode forwards with the power specified. 
- BYTE Power
 
- VOID Return


ReadLineSensor
Returns the digital value from the line sensor specified. 
- BYTE Sensor
 
- BYTE Return


SpinRight
Spins the formula flowcode on the spot in a clockwise direction as seen from above. 
- BYTE Power
 
- VOID Return


CheckIR
Checks to see if a IR sensor is within the master threshold distance. 
- BYTE Sensor
 
- BYTE Return


ReadIRSensor
Reads the analogue value from the specified IR distance sensor. 
- BYTE Sensor
 
- UINT Return


SetMotors
Sets the speed and direction of the Formula Flowcode motors. 
[[File:]] - Left_Power
Valid Range = -255 to 255 
[[File:]] - Right_Power
Valid Range = -255 to 255 
- VOID Return


Reverse
Drives both motors of the formula flowcode backwards with the power specified. 
- BYTE Power
 
- VOID Return


WaitForSwitch
Waits for the specified switch to be pressed. 
- BYTE Switch
 
- VOID Return


ReadLDR
Reads the current audio signal level from the on-board light sensor. 
[[File:]] - Return


WriteLEDs
Allows control of all 8-LEDs on the front of the Formula Flowcode. 
- BYTE LED_Byte
 
- VOID Return


Initialise
Starts up the formula flowcode PWM for motor control and performs the wait for button press 
- VOID Return



Property reference

Properties
Translation Per Rev
Sets the amount of translation for each revolution of the input shaft. M4 = 0.7mm M5 = 0.8mm M6 = 1.0mm M8 = 1.25mm M10 = 1.5mm 
Travel
Amount of travel in the linear actuator before hitting the end stops 
Revolutions
Number of revolutions the actuator can travel 
Colour
Sets the colour of the actuator and end stops 
Limit Type
Controls if limit switches are available on the linear actuator. 
Switch Polarity
Sets the active polarity of the input switches. Active low are often used to help reduce noise on the switch inputs. 
Min Switch Pin
Pin connection used for the minimum limit switch 
Max Switch Pin
Pin connection used for the maximum limit switch 
Connections
Output
Output connection for example an end tool or another linear slide and motor group. 
Output Offset X
Distance along the X axis from the center of the coupling to the center of the output object. 
Output Offset Y
Distance along the X axis from the center of the coupling to the center of the output object. 
Output Offset Z
Distance along the shaft from the center of the coupling to the center of the output object. 
Simulations