Component: ST3215 Servo Motor (Mechatronics)
From Flowcode Help
Jump to navigationJump to search| Author | Matrix TSL |
| Version | 2.0 |
| Category | Mechatronics |
Contents
- 1 ST3215 Servo Motor component
- 2 Detailed description
- 3 Examples
- 4 Macro reference
- 4.1 ChangeBaudrate
- 4.2 ChangeID
- 4.3 DefineMiddle
- 4.4 Initialise
- 4.5 IsMoving
- 4.6 ListServos
- 4.7 LockEEPROM
- 4.8 PingServo
- 4.9 ReadAcceleration
- 4.10 ReadAngle
- 4.11 ReadCorrection
- 4.12 ReadCurrent
- 4.13 ReadID
- 4.14 ReadLoad
- 4.15 ReadMode
- 4.16 ReadPosition
- 4.17 ReadSpeed
- 4.18 ReadStatus
- 4.19 ReadTemperature
- 4.20 ReadTorqueLimit
- 4.21 ReadVoltage
- 4.22 Rotate
- 4.23 SetAcceleration
- 4.24 SetAngle
- 4.25 SetCorrection
- 4.26 SetMode
- 4.27 SetPosition
- 4.28 SetSpeed
- 4.29 SetTorqueLimit
- 4.30 StartServo
- 4.31 StopServo
- 4.32 UnlockEEPROM
- 5 Property reference
- 6 Component Source Code
ST3215 Servo Motor component
Control ST3215 servo motors via serial UART communication using the STS protocol.
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
ChangeBaudrate
ChangeID
DefineMiddle
| DefineMiddle | |
| Define the 2048 position by setting torque to 128. | |
| ServoID | |
| Servo ID | |
| Return | |
Initialise
| Initialise | |
| Return | |
IsMoving
| IsMoving | |
| Check if the servo is currently moving. Returns True if moving, False otherwise. | |
| ServoID | |
| Servo ID | |
| Return | |
ListServos
LockEEPROM
| LockEEPROM | |
| Lock EEPROM to prevent writes from being saved after power loss. IMPORTANT: Use the NEW servo ID after ChangeID. | |
| ServoID | |
| Servo ID (use NEW ID after ChangeID) | |
| Return | |
PingServo
| PingServo | |
| Check if a servo is responding. Returns True if successful, False otherwise. | |
| ServoID | |
| Servo ID to ping (0-253) | |
| Return | |
ReadAcceleration
| ReadAcceleration | |
| Read current acceleration value in steps per second squared. | |
| ServoID | |
| Servo ID | |
| Return | |
ReadAngle
| ReadAngle | |
| Read current position of servo. Returns position in steps (0-4095). | |
| ServoID | |
| Servo ID | |
| Return | |
ReadCorrection
| ReadCorrection | |
| Read position correction value in steps. | |
| ServoID | |
| Servo ID | |
| Return | |
ReadCurrent
| ReadCurrent | |
| Read current in milliamps (6.5mA resolution). Returns current / 6.5. | |
| ServoID | |
| Servo ID | |
| Return | |
ReadID
| ReadID | |
| Read the servo ID from EEPROM. Returns the stored ID value. | |
| ServoID | |
| Servo ID to query | |
| Return | |
ReadLoad
| ReadLoad | |
| Read motor load in percentage. Returns load percentage. | |
| ServoID | |
| Servo ID | |
| Return | |
ReadMode
| ReadMode | |
| Read current operational mode. Returns: 0=position, 1=speed, 2=PWM, 3=step | |
| ServoID | |
| Servo ID | |
| Return | |
ReadPosition
| ReadPosition | |
| Read current position of servo. Returns position in steps (0-4095). | |
| ServoID | |
| Servo ID | |
| Return | |
ReadSpeed
| ReadSpeed | |
| Read current speed of servo. Returns speed in steps per second. | |
| ServoID | |
| Servo ID | |
| Return | |
ReadStatus
| ReadStatus | |
| Read servo status flags. Returns status byte with bits: Voltage, Sensor, Temperature, Current, Angle, Overload | |
| ServoID | |
| Servo ID | |
| Return | |
ReadTemperature
| ReadTemperature | |
| Read temperature in degrees Celsius. | |
| ServoID | |
| Servo ID | |
| Return | |
ReadTorqueLimit
| ReadTorqueLimit | |
| Read torque limit value (0-1000). | |
| ServoID | |
| Servo ID | |
| Return | |
ReadVoltage
| ReadVoltage | |
| Read voltage in volts (0.1V resolution). Returns voltage * 10. | |
| ServoID | |
| Servo ID | |
| Return | |
Rotate
SetAcceleration
| SetAcceleration | |
| Set servo acceleration in steps per second squared. | |
| ServoID | |
| Servo ID | |
| Acceleration | |
| Acceleration value (0-254) | |
| Return | |
SetAngle
| SetAngle | |
| Move servo to a target angle. Angle range: -180 to 180 degrees. | |
| ServoID | |
| Servo ID | |
| Angle | |
| Angle range: -180 to 180 degrees. | |
| Return | |
SetCorrection
| SetCorrection | |
| Set position correction value in steps. Adds correction to position. | |
| ServoID | |
| Servo ID | |
| Correction | |
| Correction value in steps | |
| Return | |
SetMode
| SetMode | |
| Set operational mode. Mode: 0=position, 1=speed, 2=PWM, 3=step | |
| ServoID | |
| Servo ID | |
| Mode | |
| Mode: 0=position, 1=speed, 2=PWM, 3=step | |
| Return | |
SetPosition
| SetPosition | |
| Move servo to a target position. Position range: -30719 to 30719 steps. | |
| ServoID | |
| Servo ID | |
| Position | |
| Target position in steps (0 to 4095) | |
| Return | |
SetSpeed
| SetSpeed | |
| Set servo speed in steps per second. | |
| ServoID | |
| Servo ID | |
| Speed | |
| Speed in steps per second (0-3400) | |
| Return | |
SetTorqueLimit
| SetTorqueLimit | |
| Set torque limit value (0-1000). Controls maximum torque output. | |
| ServoID | |
| Servo ID | |
| TorqueLimit | |
| Torque limit value (0-1000) | |
| Return | |
StartServo
| StartServo | |
| Enable torque (start servo). | |
| ServoID | |
| Servo ID | |
| Return | |
StopServo
| StopServo | |
| Disable torque (stop servo). | |
| ServoID | |
| Servo ID | |
| Return | |
UnlockEEPROM
| UnlockEEPROM | |
| Unlock EEPROM to allow writes to be saved after power loss. | |
| ServoID | |
| Servo ID | |
| Return | |
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_ST3215.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_ST3215.fcfx