Difference between revisions of "Component: Servo Controller Mod (Mechatronics)"
Line 96: | Line 96: | ||
[[File:LinkedServo.jpg]] | [[File:LinkedServo.jpg]] | ||
+ | |||
+ | |||
Line 101: | Line 103: | ||
==Macro reference== | ==Macro reference== | ||
+ | ===DisableServo=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 119: | Line 122: | ||
+ | ===SetPosition=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 142: | Line 146: | ||
+ | ===MoveToPosition=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 165: | Line 170: | ||
+ | ===SetTrim=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 188: | Line 194: | ||
+ | ===IsAutoMoving=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 201: | Line 208: | ||
+ | ===AutoMoveToPosition=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 224: | Line 232: | ||
+ | ===EnableServo=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 242: | Line 251: | ||
+ | ===SetAutoMoveSpeed=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 260: | Line 270: | ||
+ | ===Initialise=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- |
Revision as of 11:52, 3 February 2023
Author | Matrix Ltd |
Version | 1.5 |
Category | Mechatronics |
Contents
Servo Controller Mod component
Can control up to eight standard PWM driven servo's. 'Servo Object' properties allow you to connect the controller to on-screen simulations using the "Servo Motor" component and its derivatives.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Servo_Controller_Mod.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Servo_Controller_Mod.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Importing from v5
The servo component in Flowcode v6 onwards has a new Initialise macro which will need to be added to your program before any other calls to the servo motor component are made.
Controlling a servo with an analogue input
This example reads the value of the analogue potentiometer and uses this to set the position of the servo motor.
Servo Example 1
The Servo controller is linked to the standard servo component but this could be linked to any object on the panel.
Creating a multi-axis actuator using servo motors
This example links two servo motors together using panel primitive objects and groups.
Servo Example 2
The Servo controller can handle up to 8 motors and is used to control both of the standard servo components on the panel.
Macro reference
DisableServo
![]() |
DisableServo |
Disables a servo channel effectivly disabling the motor. | |
![]() |
Channel |
The channel to set the position for. First channel is zero. | |
![]() |
Return |
SetPosition
MoveToPosition
SetTrim
IsAutoMoving
![]() |
IsAutoMoving |
Is the AutoMoveToPosition movement complete. Returns 1 if the servo is still moving. Returns 0 if the servo movement is complete. | |
![]() |
Return |
AutoMoveToPosition
EnableServo
SetAutoMoveSpeed
![]() |
SetAutoMoveSpeed |
Sets the speed of the auto move to position macro. Default speed is 1. | |
![]() |
Speed |
1=Slowest (Default), 2= Double, 3=Triple, 4=Quadruple | |
![]() |
Return |
Initialise
![]() |
Initialise |
Sets up the servo motor interrupts | |
![]() |
Return |