|
|
(8 intermediate revisions by the same user not shown) |
Line 16: |
Line 16: |
| | | |
| ==Component Source Code== | | ==Component Source Code== |
| + | |
| + | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Servo_Controller.fcfx FC_Comp_Source_Servo_Controller.fcfx] |
| | | |
| Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Servo_Controller.fcfx FC_Comp_Source_Servo_Controller.fcfx] | | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Servo_Controller.fcfx FC_Comp_Source_Servo_Controller.fcfx] |
| | | |
| ==Detailed description== | | ==Detailed description== |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| | | |
| | | |
Line 33: |
Line 41: |
| | | |
| | | |
− | ''<span style="color:red;">No additional examples</span>''
| |
| | | |
− | ==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;" | '''DisableServo'''
| |
− | |-
| |
− | | colspan="2" | Disables a servo channel effectivly disabling the motor.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Channel
| |
− | |-
| |
− | | colspan="2" | The channel to set the position for. First channel is zero.
| |
− | |-
| |
− | | 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;" | '''SetPosition'''
| |
− | |-
| |
− | | colspan="2" | Moves directly to the specified position with no interpolation.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Channel
| |
− | |-
| |
− | | colspan="2" | The channel to assign the new position. Range: 0-7
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Position
| |
− | |-
| |
− | | colspan="2" | Position to jump to. Range: 0-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;"
| + | ''<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;" | '''MoveToPositionInt'''
| |
− | |-
| |
− | | colspan="2" | Moves a single step towards the new position, the rate of movement is determined by how often the move to macro is called. Returns 1 if the position has been reached.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Channel
| |
− | |-
| |
− | | colspan="2" | The channel to assign the new position. Range: 0-7
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" | Position
| |
− | |-
| |
− | | colspan="2" | Target position to move towards. Range: 0-65535
| |
− | |-
| |
− | | 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;" | '''SetPositionInt'''
| |
− | |-
| |
− | | colspan="2" | Moves directly to the specified position with no interpolation. Uses a 16-bit position parameter to add extra precision.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Channel
| |
− | |-
| |
− | | colspan="2" | The channel to assign the new position. Range: 0-7
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" | Position
| |
− | |-
| |
− | | colspan="2" | Position to jump to. Range: 0-65535
| |
− | |-
| |
− | | 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;" | '''MoveToPosition'''
| |
− | |-
| |
− | | colspan="2" | Moves a single step towards the new position, the rate of movement is determined by how often the move to macro is called. Returns 1 if the position has been reached.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Channel
| |
− | |-
| |
− | | colspan="2" | The channel to assign the new position. Range: 0-7
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Position
| |
− | |-
| |
− | | colspan="2" | Target position to move towards. Range: 0-255
| |
− | |-
| |
− | | 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;" | '''SetTrim'''
| |
− | |-
| |
− | | colspan="2" | Allows the level of trim for each servo channel to be adjusted progmatically.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Channel
| |
− | |-
| |
− | | colspan="2" | The channel to set the position for. First channel is zero.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Trim
| |
− | |-
| |
− | | colspan="2" | Legacy: 0=0us, 1=+25us, 2=+50us, 3=+75us, 4=+100us, 5=-25us, 6=-50us, 7=-75us, 8=-100us or Smooth: 0-200
| |
− | |-
| |
− | | 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;" | '''IsAutoMoving'''
| |
− | |-
| |
− | | colspan="2" | Is the AutoMoveToPosition movement complete. Returns 1 if the servos are still moving. Returns 0 if all servo movement is complete.
| |
− | |-
| |
− | |-
| |
− | | 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;" | '''SetAutoMoveSpeedInt'''
| |
− | |-
| |
− | | colspan="2" | Sets the speed of the auto move to position macro. Default speed is shown in the Servo_Period_Multiplier property.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" | Speed
| |
− | |-
| |
− | | colspan="2" | 1=Slowest (Default), 2= Double, 3=Triple, 4=Quadruple
| |
− | |-
| |
− | | 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;" | '''IsServoAutoMoving'''
| |
− | |-
| |
− | | colspan="2" | Is the AutoMoveToPosition movement complete for a specific servo output. Returns 1 if the servo is still moving. Returns 0 if the servo movement is complete.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Channel
| |
− | |-
| |
− | | colspan="2" | Servo Motor Output Range: 0-7
| |
− | |-
| |
− | | 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''
| |
− | |}
| |
| | | |
| + | ==Macro reference== |
| | | |
| + | ===AutoMoveToPosition=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
Line 242: |
Line 89: |
| | | |
| | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| + | ===AutoMoveToPositionInt=== |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''EnableServo'''
| |
− | |-
| |
− | | colspan="2" | Enables a servo channel effectivly setting the position of the motor to the value in the local position variable.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Channel
| |
− | |-
| |
− | | colspan="2" | The channel to set the position for. First channel is zero.
| |
− | |-
| |
− | | 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;" | '''SetAutoMoveSpeed'''
| |
− | |-
| |
− | | colspan="2" | Sets the speed of the auto move to position macro. Default speed is shown in the Servo_Period_Multiplier property.
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Speed
| |
− | |-
| |
− | | colspan="2" | 1=Slowest (Default), 2= Double, 3=Triple, 4=Quadruple
| |
− | |-
| |
− | | 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;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
Line 301: |
Line 113: |
| | | |
| | | |
| + | ===DisableServo=== |
| {| 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;" | '''Initialise''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DisableServo''' |
| + | |- |
| + | | colspan="2" | Disables a servo channel effectivly disabling the motor. |
| + | |- |
| |- | | |- |
− | | colspan="2" | Sets up the servo motor interrupts | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| + | | width="90%" | Channel |
| |- | | |- |
| + | | colspan="2" | The channel to set the position for. First channel is zero. |
| |- | | |- |
| | 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 |
Line 314: |
Line 132: |
| | | |
| | | |
− | | + | ===EnableServo=== |
− | | |
− | ==Property reference== | |
− | | |
− | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | Channels (1 - 8)
| |
− | |-
| |
− | | colspan="2" | Set the number of servo's that you need to control. Value from 1 to 8.
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
− | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| |
− | | width="90%" | Channel 0
| |
− | |-
| |
− | | colspan="2" | Pin on which to output PWM for the servo motor.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| |
− | | width="90%" | Channel 1
| |
− | |-
| |
− | | colspan="2" | Pin on which to output PWM for the servo motor.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| |
− | | width="90%" | Channel 2
| |
− | |-
| |
− | | colspan="2" | Pin on which to output PWM for the servo motor.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| |
− | | width="90%" | Channel 3
| |
− | |-
| |
− | | colspan="2" | Pin on which to output PWM for the servo motor.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| |
− | | width="90%" | Channel 4
| |
− | |-
| |
− | | colspan="2" | Pin on which to output PWM for the servo motor.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| |
− | | width="90%" | Channel 5
| |
− | |-
| |
− | | colspan="2" | Pin on which to output PWM for the servo motor.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| |
− | | width="90%" | Channel 6
| |
− | |-
| |
− | | colspan="2" | Pin on which to output PWM for the servo motor.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| |
− | | width="90%" | Channel 7
| |
− | |-
| |
− | | colspan="2" | Pin on which to output PWM for the servo motor.
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
− | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Resources
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
| |
− | | width="90%" | Peripherals
| |
− | |-
| |
− | | colspan="2" | Lists the internal peripherals of the MCU used by the component. When the servo motor is initialised you will not be able to use the listed peripherals for other functionality.
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
− | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Trim
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | Trim Mode
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | Trim 0
| |
− | |-
| |
− | | colspan="2" | Trim the pulse width for this channel. Use this to trim the positioning of two servos so that similar input values will produce the same degree of movement.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | Trim 1
| |
− | |-
| |
− | | colspan="2" | Trim the pulse width for this channel. Use this to trim the positioning of two servos so that similar input values will produce the same degree of movement.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | Trim 2
| |
− | |-
| |
− | | colspan="2" | Trim the pulse width for this channel. Use this to trim the positioning of two servos so that similar input values will produce the same degree of movement.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | Trim 3
| |
− | |-
| |
− | | colspan="2" | Trim the pulse width for this channel. Use this to trim the positioning of two servos so that similar input values will produce the same degree of movement.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | Trim 4
| |
− | |-
| |
− | | colspan="2" | Trim the pulse width for this channel. Use this to trim the positioning of two servos so that similar input values will produce the same degree of movement.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | Trim 5
| |
− | |-
| |
− | | colspan="2" | Trim the pulse width for this channel. Use this to trim the positioning of two servos so that similar input values will produce the same degree of movement.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | Trim 6
| |
− | |-
| |
− | | colspan="2" | Trim the pulse width for this channel. Use this to trim the positioning of two servos so that similar input values will produce the same degree of movement.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | Trim 7
| |
− | |-
| |
− | | colspan="2" | Trim the pulse width for this channel. Use this to trim the positioning of two servos so that similar input values will produce the same degree of movement.
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
− | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Pulse Width
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | Minimum (us)
| |
− | |-
| |
− | | colspan="2" | Shortest pulse width that will be used.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | Maximum (us)
| |
− | |-
| |
− | | colspan="2" | Longest pulse width used for the PWM signals.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
− | | width="90%" | Period Multiplier
| |
− | |-
| |
− | | colspan="2" | Number of instructions for 1 / 256th of the positional accuracy. This sets the default movement speed to maintain legacy move speeds. Also sets the multiplication factor to convert from a byte 0-255 to a clocked position value.
| |
− | |-
| |
− | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
− | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
| |
− | | width="90%" | Servo Object 0
| |
− | |-
| |
− | | colspan="2" | Drag a servo motor component onto the System Panel, and then select it here, to create an on screen simulation of the way that your flowchart moves the servo's. Servo motors should be based on the 'Servo Motor Base' component, or use a custom component set to responf to 'User.Notify' events (ID = n/a, Data = Position (0-127)).
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
| |
− | | width="90%" | Servo Object 1
| |
− | |-
| |
− | | colspan="2" | Drag a servo motor component onto the System Panel, and then select it here, to create an on screen simulation of the way that your flowchart moves the servo's. Servo motors should be based on the 'Servo Motor Base' component, or use a custom component set to responf to 'User.Notify' events (ID = n/a, Data = Position (0-127)).
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
| |
− | | width="90%" | Servo Object 2
| |
− | |-
| |
− | | colspan="2" | Drag a servo motor component onto the System Panel, and then select it here, to create an on screen simulation of the way that your flowchart moves the servo's. Servo motors should be based on the 'Servo Motor Base' component, or use a custom component set to responf to 'User.Notify' events (ID = n/a, Data = Position (0-127)).
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
| |
− | | width="90%" | Servo Object 3
| |
− | |-
| |
− | | colspan="2" | Drag a servo motor component onto the System Panel, and then select it here, to create an on screen simulation of the way that your flowchart moves the servo's. Servo motors should be based on the 'Servo Motor Base' component, or use a custom component set to responf to 'User.Notify' events (ID = n/a, Data = Position (0-127)).
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
| |
− | | width="90%" | Servo Object 4
| |
− | |-
| |
− | | colspan="2" | Drag a servo motor component onto the System Panel, and then select it here, to create an on screen simulation of the way that your flowchart moves the servo's. Servo motors should be based on the 'Servo Motor Base' component, or use a custom component set to responf to 'User.Notify' events (ID = n/a, Data = Position (0-127)).
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
| |
− | | width="90%" | Servo Object 5
| |
− | |-
| |
− | | colspan="2" | Drag a servo motor component onto the System Panel, and then select it here, to create an on screen simulation of the way that your flowchart moves the servo's. Servo motors should be based on the 'Servo Motor Base' component, or use a custom component set to responf to 'User.Notify' events (ID = n/a, Data = Position (0-127)).
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
| |
− | | width="90%" | Servo Object 6
| |
− | |-
| |
− | | colspan="2" | Drag a servo motor component onto the System Panel, and then select it here, to create an on screen simulation of the way that your flowchart moves the servo's. Servo motors should be based on the 'Servo Motor Base' component, or use a custom component set to responf to 'User.Notify' events (ID = n/a, Data = Position (0-127)).
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
| |
− | | width="90%" | Servo Object 7
| |
− | |-
| |
− | | colspan="2" | Drag a servo motor component onto the System Panel, and then select it here, to create an on screen simulation of the way that your flowchart moves the servo's. Servo motors should be based on the 'Servo Motor Base' component, or use a custom component set to responf to 'User.Notify' events (ID = n/a, Data = Position (0-127)).
| |
− | |}==Macro reference==
| |
− | | |
| {| 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;" | '''DisableServo''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''EnableServo''' |
| |- | | |- |
− | | colspan="2" | Disables a servo channel effectivly disabling the motor. | + | | colspan="2" | Enables a servo channel effectivly setting the position of the motor to the value in the local position variable. |
| |- | | |- |
| |- | | |- |
Line 513: |
Line 151: |
| | | |
| | | |
| + | ===Initialise=== |
| {| 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;" | '''SetPosition''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' |
| |- | | |- |
− | | colspan="2" | Moves directly to the specified position with no interpolation. | + | | colspan="2" | Sets up the servo motor interrupts |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Channel
| |
− | |-
| |
− | | colspan="2" | The channel to assign the new position. Range: 0-7
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Position
| |
| |- | | |- |
− | | colspan="2" | Position to jump to. Range: 0-255
| |
| |- | | |- |
| | 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 |
Line 536: |
Line 165: |
| | | |
| | | |
| + | ===IsAutoMoving=== |
| {| 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;" | '''MoveToPositionInt''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IsAutoMoving''' |
− | |-
| |
− | | colspan="2" | Moves a single step towards the new position, the rate of movement is determined by how often the move to macro is called. Returns 1 if the position has been reached.
| |
| |- | | |- |
| + | | colspan="2" | Is the AutoMoveToPosition movement complete. Returns 1 if the servos are still moving. Returns 0 if all servo movement is complete. |
| |- | | |- |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Channel
| |
− | |-
| |
− | | colspan="2" | The channel to assign the new position. Range: 0-7
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" | Position
| |
− | |-
| |
− | | colspan="2" | Target position to move towards. Range: 0-65535
| |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE |
Line 559: |
Line 179: |
| | | |
| | | |
| + | ===IsServoAutoMoving=== |
| {| 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;" | '''SetPositionInt''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IsServoAutoMoving''' |
| |- | | |- |
− | | colspan="2" | Moves directly to the specified position with no interpolation. Uses a 16-bit position parameter to add extra precision. | + | | colspan="2" | Is the AutoMoveToPosition movement complete for a specific servo output. Returns 1 if the servo is still moving. Returns 0 if the servo movement is complete. |
| |- | | |- |
| |- | | |- |
Line 570: |
Line 191: |
| | width="90%" | Channel | | | width="90%" | Channel |
| |- | | |- |
− | | colspan="2" | The channel to assign the new position. Range: 0-7 | + | | colspan="2" | Servo Motor Output Range: 0-7 |
| |- | | |- |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE |
− | | width="90%" | Position
| |
− | |-
| |
− | | colspan="2" | Position to jump to. Range: 0-65535
| |
− | |-
| |
− | | 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'' |
| |} | | |} |
| | | |
| | | |
| + | ===MoveToPosition=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
Line 605: |
Line 222: |
| | | |
| | | |
| + | ===MoveToPositionInt=== |
| {| 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;" | '''SetTrim''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''MoveToPositionInt''' |
| |- | | |- |
− | | colspan="2" | Allows the level of trim for each servo channel to be adjusted progmatically. | + | | colspan="2" | Moves a single step towards the new position, the rate of movement is determined by how often the move to macro is called. Returns 1 if the position has been reached. |
| |- | | |- |
| |- | | |- |
Line 616: |
Line 234: |
| | width="90%" | Channel | | | width="90%" | Channel |
| |- | | |- |
− | | colspan="2" | The channel to set the position for. First channel is zero. | + | | colspan="2" | The channel to assign the new position. Range: 0-7 |
| |- | | |- |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
− | | width="90%" | Trim | + | | width="90%" | Position |
− | |-
| |
− | | colspan="2" | Legacy: 0=0us, 1=+25us, 2=+50us, 3=+75us, 4=+100us, 5=-25us, 6=-50us, 7=-75us, 8=-100us or Smooth: 0-200
| |
− | |-
| |
− | | 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;" | '''IsAutoMoving'''
| |
− | |-
| |
− | | colspan="2" | Is the AutoMoveToPosition movement complete. Returns 1 if the servos are still moving. Returns 0 if all servo movement is complete.
| |
| |- | | |- |
| + | | colspan="2" | Target position to move towards. Range: 0-65535 |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE |
Line 641: |
Line 246: |
| | | |
| | | |
| + | ===SetAutoMoveSpeed=== |
| {| 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;" | '''SetAutoMoveSpeedInt''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAutoMoveSpeed''' |
| |- | | |- |
| | colspan="2" | Sets the speed of the auto move to position macro. Default speed is shown in the Servo_Period_Multiplier property. | | | colspan="2" | Sets the speed of the auto move to position macro. Default speed is shown in the Servo_Period_Multiplier property. |
| |- | | |- |
| |- | | |- |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | Speed | | | width="90%" | Speed |
| |- | | |- |
Line 659: |
Line 265: |
| | | |
| | | |
| + | ===SetAutoMoveSpeedInt=== |
| {| 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;" | '''IsServoAutoMoving''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAutoMoveSpeedInt''' |
| |- | | |- |
− | | colspan="2" | Is the AutoMoveToPosition movement complete for a specific servo output. Returns 1 if the servo is still moving. Returns 0 if the servo movement is complete. | + | | colspan="2" | Sets the speed of the auto move to position macro. Default speed is shown in the Servo_Period_Multiplier property. |
| |- | | |- |
| |- | | |- |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
− | | width="90%" | Channel | + | | width="90%" | Speed |
| |- | | |- |
− | | colspan="2" | Servo Motor Output Range: 0-7 | + | | colspan="2" | 1=Slowest (Default), 2= Double, 3=Triple, 4=Quadruple |
| |- | | |- |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | + | | 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'' |
| |} | | |} |
| | | |
| | | |
| + | ===SetPosition=== |
| {| 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;" | '''AutoMoveToPosition''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetPosition''' |
| |- | | |- |
− | | colspan="2" | Automatically moves towards the new position at a fixed rate determined by the AutoMoveSpeed. | + | | colspan="2" | Moves directly to the specified position with no interpolation. |
| |- | | |- |
| |- | | |- |
Line 693: |
Line 301: |
| | width="90%" | Position | | | width="90%" | Position |
| |- | | |- |
− | | colspan="2" | Position to automatically move to. Range: 0-255 | + | | colspan="2" | Position to jump to. Range: 0-255 |
| |- | | |- |
| | 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 |
Line 700: |
Line 308: |
| | | |
| | | |
| + | ===SetPositionInt=== |
| {| 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;" | '''EnableServo''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetPositionInt''' |
| |- | | |- |
− | | colspan="2" | Enables a servo channel effectivly setting the position of the motor to the value in the local position variable. | + | | colspan="2" | Moves directly to the specified position with no interpolation. Uses a 16-bit position parameter to add extra precision. |
| |- | | |- |
| |- | | |- |
Line 711: |
Line 320: |
| | width="90%" | Channel | | | width="90%" | Channel |
| |- | | |- |
− | | colspan="2" | The channel to set the position for. First channel is zero. | + | | colspan="2" | The channel to assign the new position. Range: 0-7 |
| |- | | |- |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return''
| + | | width="90%" | Position |
− | |}
| |
− | | |
− | | |
− | {| 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;" | '''SetAutoMoveSpeed''' | |
− | |-
| |
− | | colspan="2" | Sets the speed of the auto move to position macro. Default speed is shown in the Servo_Period_Multiplier property.
| |
| |- | | |- |
− | |- | + | | colspan="2" | Position to jump to. Range: 0-65535 |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Speed
| |
− | |-
| |
− | | colspan="2" | 1=Slowest (Default), 2= Double, 3=Triple, 4=Quadruple
| |
| |- | | |- |
| | 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 |
Line 736: |
Line 332: |
| | | |
| | | |
| + | ===SetTrim=== |
| {| 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;" | '''AutoMoveToPositionInt''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTrim''' |
| |- | | |- |
− | | colspan="2" | Automatically moves towards the new 16-bit position at a fixed rate determined by the AutoMoveSpeed. | + | | colspan="2" | Allows the level of trim for each servo channel to be adjusted progmatically. |
| |- | | |- |
| |- | | |- |
Line 747: |
Line 344: |
| | width="90%" | Channel | | | width="90%" | Channel |
| |- | | |- |
− | | colspan="2" | The channel to assign the new position. Range: 0-7 | + | | colspan="2" | The channel to set the position for. First channel is zero. |
| |- | | |- |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
− | | width="90%" | Position | + | | width="90%" | Trim |
| |- | | |- |
− | | colspan="2" | Position to automatically move to. Range: 0-65535 | + | | colspan="2" | Legacy: 0=0us, 1=+25us, 2=+50us, 3=+75us, 4=+100us, 5=-25us, 6=-50us, 7=-75us, 8=-100us or Smooth: 0-200 |
| |- | | |- |
| | 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'' |
| |} | | |} |
− |
| |
− |
| |
− | {| 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" | Sets up the servo motor interrupts
| |
− | |-
| |
− | |-
| |
− | | 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''
| |
− | |}
| |
− |
| |
− |
| |
| | | |
| | | |