Jump to content

Component: ST3215 Servo Motor (Mechatronics): Difference between revisions

From Flowcode Help
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;"" to "width="10%" align="center" class="mtx-class-macrohead""
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(2 intermediate revisions by the same user not shown)
Line 87: Line 87:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ChangeBaudrate'''
| width="90%" class="mtx-class-macrohead" | '''ChangeBaudrate'''
|-
|-
| colspan="2" | Change the servo baud rate. Baud rate values: 0=9600, 1=57600, 2=115200, 3=1000000. EEPROM must be unlocked. 
| colspan="2" | Change the servo baud rate. Baud rate values: 0=9600, 1=57600, 2=115200, 3=1000000. EEPROM must be unlocked. 
Line 111: Line 111:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ChangeID'''
| width="90%" class="mtx-class-macrohead" | '''ChangeID'''
|-
|-
| colspan="2" | Change the servo ID. New ID must be 0-253. EEPROM must be unlocked. Note: New ID takes effect after power cycle. 
| colspan="2" | Change the servo ID. New ID must be 0-253. EEPROM must be unlocked. Note: New ID takes effect after power cycle. 
Line 135: Line 135:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DefineMiddle'''
| width="90%" class="mtx-class-macrohead" | '''DefineMiddle'''
|-
|-
| colspan="2" | Define the 2048 position by setting torque to 128. 
| colspan="2" | Define the 2048 position by setting torque to 128. 
Line 154: Line 154:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| width="90%" class="mtx-class-macrohead" | '''Initialise'''
|-
|-
| colspan="2" |  
| colspan="2" |  
Line 168: Line 168:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IsMoving'''
| width="90%" class="mtx-class-macrohead" | '''IsMoving'''
|-
|-
| colspan="2" | Check if the servo is currently moving. Returns True if moving, False otherwise. 
| colspan="2" | Check if the servo is currently moving. Returns True if moving, False otherwise. 
Line 187: Line 187:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ListServos'''
| width="90%" class="mtx-class-macrohead" | '''ListServos'''
|-
|-
| colspan="2" | Scan and return a list of all responsive servos.  Returns number of servos found. 
| colspan="2" | Scan and return a list of all responsive servos.  Returns number of servos found. 
Line 211: Line 211:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LockEEPROM'''
| width="90%" class="mtx-class-macrohead" | '''LockEEPROM'''
|-
|-
| colspan="2" | Lock EEPROM to prevent writes from being saved after power loss. IMPORTANT: Use the NEW servo ID after ChangeID. 
| colspan="2" | Lock EEPROM to prevent writes from being saved after power loss. IMPORTANT: Use the NEW servo ID after ChangeID. 
Line 230: Line 230:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PingServo'''
| width="90%" class="mtx-class-macrohead" | '''PingServo'''
|-
|-
| colspan="2" | Check if a servo is responding. Returns True if successful, False otherwise. 
| colspan="2" | Check if a servo is responding. Returns True if successful, False otherwise. 
Line 249: Line 249:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadAcceleration'''
| width="90%" class="mtx-class-macrohead" | '''ReadAcceleration'''
|-
|-
| colspan="2" | Read current acceleration value in steps per second squared. 
| colspan="2" | Read current acceleration value in steps per second squared. 
Line 268: Line 268:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadAngle'''
| width="90%" class="mtx-class-macrohead" | '''ReadAngle'''
|-
|-
| colspan="2" | Read current position of servo. Returns position in steps (0-4095). 
| colspan="2" | Read current position of servo. Returns position in steps (0-4095). 
Line 287: Line 287:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadCorrection'''
| width="90%" class="mtx-class-macrohead" | '''ReadCorrection'''
|-
|-
| colspan="2" | Read position correction value in steps. 
| colspan="2" | Read position correction value in steps. 
Line 306: Line 306:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadCurrent'''
| width="90%" class="mtx-class-macrohead" | '''ReadCurrent'''
|-
|-
| colspan="2" | Read current in milliamps (6.5mA resolution). Returns current / 6.5. 
| colspan="2" | Read current in milliamps (6.5mA resolution). Returns current / 6.5. 
Line 325: Line 325:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadID'''
| width="90%" class="mtx-class-macrohead" | '''ReadID'''
|-
|-
| colspan="2" | Read the servo ID from EEPROM. Returns the stored ID value. 
| colspan="2" | Read the servo ID from EEPROM. Returns the stored ID value. 
Line 344: Line 344:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadLoad'''
| width="90%" class="mtx-class-macrohead" | '''ReadLoad'''
|-
|-
| colspan="2" | Read motor load in percentage. Returns load percentage. 
| colspan="2" | Read motor load in percentage. Returns load percentage. 
Line 363: Line 363:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadMode'''
| width="90%" class="mtx-class-macrohead" | '''ReadMode'''
|-
|-
| colspan="2" | Read current operational mode. Returns: 0=position, 1=speed, 2=PWM, 3=step 
| colspan="2" | Read current operational mode. Returns: 0=position, 1=speed, 2=PWM, 3=step 
Line 382: Line 382:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadPosition'''
| width="90%" class="mtx-class-macrohead" | '''ReadPosition'''
|-
|-
| colspan="2" | Read current position of servo. Returns position in steps (0-4095). 
| colspan="2" | Read current position of servo. Returns position in steps (0-4095). 
Line 401: Line 401:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadSpeed'''
| width="90%" class="mtx-class-macrohead" | '''ReadSpeed'''
|-
|-
| colspan="2" | Read current speed of servo. Returns speed in steps per second. 
| colspan="2" | Read current speed of servo. Returns speed in steps per second. 
Line 420: Line 420:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadStatus'''
| width="90%" class="mtx-class-macrohead" | '''ReadStatus'''
|-
|-
| colspan="2" | Read servo status flags. Returns status byte with bits: Voltage, Sensor, Temperature, Current, Angle, Overload 
| colspan="2" | Read servo status flags. Returns status byte with bits: Voltage, Sensor, Temperature, Current, Angle, Overload 
Line 439: Line 439:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadTemperature'''
| width="90%" class="mtx-class-macrohead" | '''ReadTemperature'''
|-
|-
| colspan="2" | Read temperature in degrees Celsius. 
| colspan="2" | Read temperature in degrees Celsius. 
Line 458: Line 458:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadTorqueLimit'''
| width="90%" class="mtx-class-macrohead" | '''ReadTorqueLimit'''
|-
|-
| colspan="2" | Read torque limit value (0-1000). 
| colspan="2" | Read torque limit value (0-1000). 
Line 477: Line 477:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadVoltage'''
| width="90%" class="mtx-class-macrohead" | '''ReadVoltage'''
|-
|-
| colspan="2" | Read voltage in volts (0.1V resolution). Returns voltage * 10. 
| colspan="2" | Read voltage in volts (0.1V resolution). Returns voltage * 10. 
Line 496: Line 496:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Rotate'''
| width="90%" class="mtx-class-macrohead" | '''Rotate'''
|-
|-
| colspan="2" | Rotate servo continuously in specified direction. Speed range: 50-1000. Direction: 0=forward, 1=reverse. 
| colspan="2" | Rotate servo continuously in specified direction. Speed range: 50-1000. Direction: 0=forward, 1=reverse. 
Line 525: Line 525:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAcceleration'''
| width="90%" class="mtx-class-macrohead" | '''SetAcceleration'''
|-
|-
| colspan="2" | Set servo acceleration in steps per second squared. 
| colspan="2" | Set servo acceleration in steps per second squared. 
Line 549: Line 549:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAngle'''
| width="90%" class="mtx-class-macrohead" | '''SetAngle'''
|-
|-
| colspan="2" | Move servo to a target angle. Angle range: -180 to 180 degrees. 
| colspan="2" | Move servo to a target angle. Angle range: -180 to 180 degrees. 
Line 573: Line 573:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetCorrection'''
| width="90%" class="mtx-class-macrohead" | '''SetCorrection'''
|-
|-
| colspan="2" | Set position correction value in steps. Adds correction to position. 
| colspan="2" | Set position correction value in steps. Adds correction to position. 
Line 597: Line 597:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetMode'''
| width="90%" class="mtx-class-macrohead" | '''SetMode'''
|-
|-
| colspan="2" | Set operational mode. Mode: 0=position, 1=speed, 2=PWM, 3=step 
| colspan="2" | Set operational mode. Mode: 0=position, 1=speed, 2=PWM, 3=step 
Line 621: Line 621:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetPosition'''
| width="90%" class="mtx-class-macrohead" | '''SetPosition'''
|-
|-
| colspan="2" | Move servo to a target position. Position range: -30719 to 30719 steps. 
| colspan="2" | Move servo to a target position. Position range: -30719 to 30719 steps. 
Line 645: Line 645:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetSpeed'''
| width="90%" class="mtx-class-macrohead" | '''SetSpeed'''
|-
|-
| colspan="2" | Set servo speed in steps per second. 
| colspan="2" | Set servo speed in steps per second. 
Line 669: Line 669:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetTorqueLimit'''
| width="90%" class="mtx-class-macrohead" | '''SetTorqueLimit'''
|-
|-
| colspan="2" | Set torque limit value (0-1000). Controls maximum torque output. 
| colspan="2" | Set torque limit value (0-1000). Controls maximum torque output. 
Line 693: Line 693:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''StartServo'''
| width="90%" class="mtx-class-macrohead" | '''StartServo'''
|-
|-
| colspan="2" | Enable torque (start servo). 
| colspan="2" | Enable torque (start servo). 
Line 712: Line 712:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''StopServo'''
| width="90%" class="mtx-class-macrohead" | '''StopServo'''
|-
|-
| colspan="2" | Disable torque (stop servo). 
| colspan="2" | Disable torque (stop servo). 
Line 731: Line 731:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UnlockEEPROM'''
| width="90%" class="mtx-class-macrohead" | '''UnlockEEPROM'''
|-
|-
| colspan="2" | Unlock EEPROM to allow writes to be saved after power loss. 
| colspan="2" | Unlock EEPROM to allow writes to be saved after power loss. 
Line 751: Line 751:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
| width="90%" class="mtx-class-propfolder" | Connections
|-
|-
|-
|-
Line 788: Line 788:
| colspan="2" |  
| colspan="2" |  
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
| width="90%" class="mtx-class-propfolder" | Simulation
|-
|-
|-
|-

Latest revision as of 14:37, 13 July 2026

Author Matrix TSL
Version 2.0
Category Mechatronics


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

ChangeBaudrate
Change the servo baud rate. Baud rate values: 0=9600, 1=57600, 2=115200, 3=1000000. EEPROM must be unlocked. 
- BYTE ServoID
Servo ID 
- BYTE Baudrate
Baud rate value: 0=9600, 1=57600, 2=115200, 3=1000000 
- BOOL Return


ChangeID

ChangeID
Change the servo ID. New ID must be 0-253. EEPROM must be unlocked. Note: New ID takes effect after power cycle. 
- BYTE ServoID
Current servo ID 
- BYTE NewID
New servo ID (0-253) 
- BOOL Return


DefineMiddle

DefineMiddle
Define the 2048 position by setting torque to 128. 
- BYTE ServoID
Servo ID 
- BOOL Return


Initialise

Initialise
 
- VOID Return


IsMoving

IsMoving
Check if the servo is currently moving. Returns True if moving, False otherwise. 
- BYTE ServoID
Servo ID 
- BOOL Return


ListServos

ListServos
Scan and return a list of all responsive servos. Returns number of servos found. 
- BYTE ServoList
Array to store found servo IDs 
- BYTE MaxCount
Max number of servos to try and return. 0=Don't limit 
- BYTE Return


LockEEPROM

LockEEPROM
Lock EEPROM to prevent writes from being saved after power loss. IMPORTANT: Use the NEW servo ID after ChangeID. 
- BYTE ServoID
Servo ID (use NEW ID after ChangeID) 
- BOOL Return


PingServo

PingServo
Check if a servo is responding. Returns True if successful, False otherwise. 
- BYTE ServoID
Servo ID to ping (0-253) 
- BOOL Return


ReadAcceleration

ReadAcceleration
Read current acceleration value in steps per second squared. 
- BYTE ServoID
Servo ID 
- BYTE Return


ReadAngle

ReadAngle
Read current position of servo. Returns position in steps (0-4095). 
- BYTE ServoID
Servo ID 
- FLOAT Return


ReadCorrection

ReadCorrection
Read position correction value in steps. 
- BYTE ServoID
Servo ID 
- INT Return


ReadCurrent

ReadCurrent
Read current in milliamps (6.5mA resolution). Returns current / 6.5. 
- BYTE ServoID
Servo ID 
- UINT Return


ReadID

ReadID
Read the servo ID from EEPROM. Returns the stored ID value. 
- BYTE ServoID
Servo ID to query 
- BYTE Return


ReadLoad

ReadLoad
Read motor load in percentage. Returns load percentage. 
- BYTE ServoID
Servo ID 
- BYTE Return


ReadMode

ReadMode
Read current operational mode. Returns: 0=position, 1=speed, 2=PWM, 3=step 
- BYTE ServoID
Servo ID 
- BYTE Return


ReadPosition

ReadPosition
Read current position of servo. Returns position in steps (0-4095). 
- BYTE ServoID
Servo ID 
- INT Return


ReadSpeed

ReadSpeed
Read current speed of servo. Returns speed in steps per second. 
- BYTE ServoID
Servo ID 
- UINT Return


ReadStatus

ReadStatus
Read servo status flags. Returns status byte with bits: Voltage, Sensor, Temperature, Current, Angle, Overload 
- BYTE ServoID
Servo ID 
- BYTE Return


ReadTemperature

ReadTemperature
Read temperature in degrees Celsius. 
- BYTE ServoID
Servo ID 
- BYTE Return


ReadTorqueLimit

ReadTorqueLimit
Read torque limit value (0-1000). 
- BYTE ServoID
Servo ID 
- UINT Return


ReadVoltage

ReadVoltage
Read voltage in volts (0.1V resolution). Returns voltage * 10. 
- BYTE ServoID
Servo ID 
- BYTE Return


Rotate

Rotate
Rotate servo continuously in specified direction. Speed range: 50-1000. Direction: 0=forward, 1=reverse. 
- BYTE ServoID
Servo ID 
- UINT Speed
Rotation speed (50-1000) 
- BYTE Direction
Direction: 0=forward, 1=reverse 
- BOOL Return


SetAcceleration

SetAcceleration
Set servo acceleration in steps per second squared. 
- BYTE ServoID
Servo ID 
- BYTE Acceleration
Acceleration value (0-254) 
- BOOL Return


SetAngle

SetAngle
Move servo to a target angle. Angle range: -180 to 180 degrees. 
- BYTE ServoID
Servo ID 
- FLOAT Angle
Angle range: -180 to 180 degrees. 
- BOOL Return


SetCorrection

SetCorrection
Set position correction value in steps. Adds correction to position. 
- BYTE ServoID
Servo ID 
- INT Correction
Correction value in steps 
- BOOL Return


SetMode

SetMode
Set operational mode. Mode: 0=position, 1=speed, 2=PWM, 3=step 
- BYTE ServoID
Servo ID 
- BYTE Mode
Mode: 0=position, 1=speed, 2=PWM, 3=step 
- BOOL Return


SetPosition

SetPosition
Move servo to a target position. Position range: -30719 to 30719 steps. 
- BYTE ServoID
Servo ID 
- UINT Position
Target position in steps (0 to 4095) 
- BOOL Return


SetSpeed

SetSpeed
Set servo speed in steps per second. 
- BYTE ServoID
Servo ID 
- UINT Speed
Speed in steps per second (0-3400) 
- BOOL Return


SetTorqueLimit

SetTorqueLimit
Set torque limit value (0-1000). Controls maximum torque output. 
- BYTE ServoID
Servo ID 
- UINT TorqueLimit
Torque limit value (0-1000) 
- BOOL Return


StartServo

StartServo
Enable torque (start servo). 
- BYTE ServoID
Servo ID 
- BOOL Return


StopServo

StopServo
Disable torque (stop servo). 
- BYTE ServoID
Servo ID 
- BOOL Return


UnlockEEPROM

UnlockEEPROM
Unlock EEPROM to allow writes to be saved after power loss. 
- BYTE ServoID
Servo ID 
- BOOL Return


Property reference

Properties
Connections
Channel
UART Channel selector Software channels are bit banged using generic I/O pins but are not as reliable as hardware channels. Hardware channels use the selected peripheral on-board the target microcontroller. 
TX
Pin to be used for Transmit data 
RX
Pin to be used for Receive data 
Use Flow Control
Flow Control (Handshake) enable or disable. On: Two I/O pins are used to control the flow of data in and out of the device. Off: Flow control is disabled. 
Baud Options
Baud rate option selector 
Baud Rate
 
Simulation
Label
Textual label shown on the component I/O flasher 
Scope Traces
Selects if the scope traces are automatically added to the data recorder window or not. 
Console Data
Selects if the console data is automatically generated or not 
Console Columns
Number of characters that can be displayed on a single line of the console. 
Data Source
Simulation data source used to allow the component to connect to various remote devices 

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