|
|
| (14 intermediate revisions by the same user not shown) |
| Line 14: |
Line 14: |
| | ==Linear Actuator component== | | ==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. |
| | + | |
| | + | ==Component Source Code== |
| | + | |
| | + | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_LinearActuator.fcfx FC_Comp_Source_LinearActuator.fcfx] |
| | + | |
| | + | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_LinearActuator.fcfx FC_Comp_Source_LinearActuator.fcfx] |
| | | | |
| | ==Detailed description== | | ==Detailed description== |
| | + | |
| | + | |
| | + | |
| | + | |
| | + | |
| | + | |
| | + | |
| | + | |
| | + | |
| | + | |
| | + | |
| | + | |
| | + | |
| | + | |
| | + | |
| | + | |
| | + | |
| | + | |
| | + | |
| | + | |
| | + | |
| | + | |
| | | | |
| | ''No detailed description exists yet for this component'' | | ''No detailed description exists yet for this component'' |
| Line 22: |
Line 50: |
| | | | |
| | | | |
| − | ''<span style="color:red;">No additional examples</span>''
| |
| | | | |
| | | | |
| − | ==Downloadable 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;" | '''Rotate'''
| |
| − | |-
| |
| − | | colspan="2" | Simulation Rotate function to allow accurate rotation during simulation. Automatically called by any attached coupling or gearbox component.
| |
| − | |-
| |
| − | |-
| |
| − | | width="10%" align="center" | [[File:]] -
| |
| − | | width="90%" | Angle
| |
| − | |-
| |
| − | | colspan="2" | Amount to rotate the shaft input in degrees
| |
| − | |-
| |
| − | | 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;" | '''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.
| |
| − | |-
| |
| − | |-
| |
| − | | 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''
| |
| − | |}
| |
| | | | |
| | | | |
| − | {| 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.
| |
| − | |-
| |
| − | |-
| |
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] -
| |
| − | | 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;" | '''ReadSwitch'''
| |
| − | |-
| |
| − | | colspan="2" | Reads the value of one of the switches from the front of the Formula Flowcode.
| |
| − | |-
| |
| − | |-
| |
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| − | | width="90%" | Switch
| |
| − | |-
| |
| − | | colspan="2" |
| |
| − | |-
| |
| − | | 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''
| |
| − | |}
| |
| | | | |
| | | | |
| − | {| 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.
| |
| − | |-
| |
| − | |-
| |
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| − | | width="90%" | Power
| |
| − | |-
| |
| − | | colspan="2" |
| |
| − | |-
| |
| − | | 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;" | '''Forward'''
| |
| − | |-
| |
| − | | colspan="2" | Drives both motors of the formula flowcode forwards with the power specified.
| |
| − | |-
| |
| − | |-
| |
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| − | | width="90%" | Power
| |
| − | |-
| |
| − | | colspan="2" |
| |
| − | |-
| |
| − | | 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;" | '''ReadLineSensor'''
| |
| − | |-
| |
| − | | colspan="2" | Returns the digital value from the line sensor specified.
| |
| − | |-
| |
| − | |-
| |
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| − | | width="90%" | Sensor
| |
| − | |-
| |
| − | | colspan="2" |
| |
| − | |-
| |
| − | | 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''
| |
| − | |}
| |
| | | | |
| | | | |
| − | {| 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.
| |
| − | |-
| |
| − | |-
| |
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| − | | width="90%" | Power
| |
| − | |-
| |
| − | | colspan="2" |
| |
| − | |-
| |
| − | | 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.
| |
| − | |-
| |
| − | |-
| |
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| − | | width="90%" | Sensor
| |
| − | |-
| |
| − | | colspan="2" |
| |
| − | |-
| |
| − | | 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''
| |
| − | |}
| |
| | | | |
| | | | |
| − | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| + | |
| − | |-
| + | ''<span style="color:red;">No additional examples</span>'' |
| − | | 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.
| + | |
| − | |-
| + | |
| − | |-
| |
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| − | | width="90%" | Sensor
| |
| − | |-
| |
| − | | colspan="2" |
| |
| − | |-
| |
| − | | 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''
| |
| − | |}
| |
| | | | |
| | | | |
| − | {| 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.
| |
| − | |-
| |
| − | |-
| |
| − | | width="10%" align="center" | [[File:]] -
| |
| − | | width="90%" | Left_Power
| |
| − | |-
| |
| − | | colspan="2" | Valid Range = -255 to 255
| |
| − | |-
| |
| − | | width="10%" align="center" | [[File:]] -
| |
| − | | width="90%" | Right_Power
| |
| − | |-
| |
| − | | colspan="2" | Valid Range = -255 to 255
| |
| − | |-
| |
| − | | 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;" | '''Reverse'''
| |
| − | |-
| |
| − | | colspan="2" | Drives both motors of the formula flowcode backwards with the power specified.
| |
| − | |-
| |
| − | |-
| |
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| − | | width="90%" | Power
| |
| − | |-
| |
| − | | colspan="2" |
| |
| − | |-
| |
| − | | 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;" | '''WaitForSwitch'''
| |
| − | |-
| |
| − | | colspan="2" | Waits for the specified switch to be pressed.
| |
| − | |-
| |
| − | |-
| |
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| − | | width="90%" | Switch
| |
| − | |-
| |
| − | | colspan="2" |
| |
| − | |-
| |
| − | | 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''
| |
| − | |}
| |
| | | | |
| | + | ==Macro reference== |
| | | | |
| | + | ===CheckLimits=== |
| | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| | |- | | |- |
| | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadLDR''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckLimits''' |
| | |- | | |- |
| − | | colspan="2" | Reads the current audio signal level from the on-board light sensor. | + | | 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. |
| | |- | | |- |
| | |- | | |- |
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - | + | | 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'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| | |} | | |} |
| | | | |
| | | | |
| | + | ===Rotate=== |
| | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| | |- | | |- |
| | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteLEDs''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Rotate''' |
| | |- | | |- |
| − | | colspan="2" | Allows control of all 8-LEDs on the front of the Formula Flowcode. | + | | colspan="2" | Simulation Rotate function to allow accurate rotation during simulation. Automatically called by any attached coupling or gearbox component. |
| | |- | | |- |
| | |- | | |- |
| − | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | + | | width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT |
| − | | width="90%" | LED_Byte | + | | width="90%" | Angle |
| − | |-
| |
| − | | colspan="2" |
| |
| − | |-
| |
| − | | 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;" | '''Initialise'''
| |
| − | |-
| |
| − | | colspan="2" | Starts up the formula flowcode PWM for motor control and performs the wait for button press
| |
| | |- | | |- |
| | + | | colspan="2" | Amount to rotate the shaft input in degrees |
| | |- | | |- |
| | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | 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'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| | |} | | |} |
| − |
| |
| − |
| |
| | | | |
| | | | |
| Line 308: |
Line 126: |
| | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] |
| | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' |
| | + | |- |
| | + | |- |
| | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] |
| | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Actuator Properties |
| | |- | | |- |
| | |- | | |- |
| Line 330: |
Line 152: |
| | | colspan="2" | Sets the colour of the actuator and end stops | | | colspan="2" | Sets the colour of the actuator and end stops |
| | |- | | |- |
| − | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] |
| − | | width="90%" | Limit Type
| + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections |
| − | |-
| |
| − | | colspan="2" | Controls if limit switches are available on the linear actuator.
| |
| − | |-
| |
| − | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| − | | width="90%" | Switch Polarity
| |
| − | |-
| |
| − | | colspan="2" | Sets the active polarity of the input switches. Active low are often used to help reduce noise on the switch inputs.
| |
| − | |-
| |
| − | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| |
| − | | width="90%" | Min Switch Pin
| |
| − | |-
| |
| − | | colspan="2" | Pin connection used for the minimum limit switch
| |
| − | |-
| |
| − | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| |
| − | | width="90%" | Max Switch Pin
| |
| − | |-
| |
| − | | colspan="2" | 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''' | |
| | |- | | |- |
| | |- | | |- |
| Line 374: |
Line 176: |
| | | colspan="2" | Distance along the shaft from the center of the coupling to the center of the output object. | | | colspan="2" | Distance along the shaft from the center of the coupling to the center of the output object. |
| | |- | | |- |
| − | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]] | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] |
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations''' | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Limits |
| | + | |- |
| | + | |- |
| | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] |
| | + | | width="90%" | Limit Type |
| | + | |- |
| | + | | colspan="2" | Controls if limit switches are available on the linear actuator. |
| | + | |- |
| | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] |
| | + | | width="90%" | Switch Polarity |
| | + | |- |
| | + | | colspan="2" | Sets the active polarity of the input switches. Active low are often used to help reduce noise on the switch inputs. |
| | |- | | |- |
| | + | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] |
| | + | | width="90%" | Min Switch Pin |
| | + | |- |
| | + | | colspan="2" | Pin connection used for the minimum limit switch |
| | + | |- |
| | + | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] |
| | + | | width="90%" | Max Switch Pin |
| | + | |- |
| | + | | colspan="2" | Pin connection used for the maximum limit switch |
| | |} | | |} |