Author
|
Matrix Ltd
|
Version
|
1.1
|
Category
|
Mechatronics
|
Servo Motor Template component
Base component for creating custom servo motor simulations. Recieves messages from the the 'Servo Controller' component. Macro 'SetTarget' allows external objects to be moved by the servo for mechanical simulations.
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Downloadable macro reference
|
SetTarget
|
Set a panel object to be 'connected' to the servo's. The connected object will then move as if connected mechanically to the servo's actuator.
|
[[File:]] -
|
Target
|
Object to be moved by the motor
|
- VOID
|
Return
|
|
MoveToPositionInt
|
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.
|
- BYTE
|
Channel
|
The channel to assign the new position. Range: 0-7
|
- UINT
|
Position
|
Target position to move towards. Range: 0-65535
|
- BYTE
|
Return
|
|
SetPositionInt
|
Moves directly to the specified position with no interpolation. Uses a 16-bit position parameter to add extra precision.
|
- BYTE
|
Channel
|
The channel to assign the new position. Range: 0-7
|
- UINT
|
Position
|
Position to jump to. Range: 0-65535
|
- VOID
|
Return
|
|
MoveToPosition
|
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.
|
- BYTE
|
Channel
|
The channel to assign the new position. Range: 0-7
|
- BYTE
|
Position
|
Target position to move towards. Range: 0-255
|
- BYTE
|
Return
|
|
SetTrim
|
Allows the level of trim for each servo channel to be adjusted progmatically.
|
- BYTE
|
Channel
|
The channel to set the position for. First channel is zero.
|
- BYTE
|
Trim
|
Legacy: 0=0us, 1=+25us, 2=+50us, 3=+75us, 4=+100us, 5=-25us, 6=-50us, 7=-75us, 8=-100us or Smooth: 0-200
|
- VOID
|
Return
|
|
IsAutoMoving
|
Is the AutoMoveToPosition movement complete. Returns 1 if the servos are still moving. Returns 0 if all servo movement is complete.
|
- BYTE
|
Return
|
|
SetAutoMoveSpeedInt
|
Sets the speed of the auto move to position macro. Default speed is shown in the Servo_Period_Multiplier property.
|
- UINT
|
Speed
|
1=Slowest (Default), 2= Double, 3=Triple, 4=Quadruple
|
- VOID
|
Return
|
|
IsServoAutoMoving
|
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.
|
- BYTE
|
Channel
|
Servo Motor Output Range: 0-7
|
- BYTE
|
Return
|
|
AutoMoveToPosition
|
Automatically moves towards the new position at a fixed rate determined by the AutoMoveSpeed.
|
- BYTE
|
Channel
|
The channel to assign the new position. Range: 0-7
|
- BYTE
|
Position
|
Position to automatically move to. Range: 0-255
|
- VOID
|
Return
|
|
EnableServo
|
Enables a servo channel effectivly setting the position of the motor to the value in the local position variable.
|
- BYTE
|
Channel
|
The channel to set the position for. First channel is zero.
|
- VOID
|
Return
|
|
SetAutoMoveSpeed
|
Sets the speed of the auto move to position macro. Default speed is shown in the Servo_Period_Multiplier property.
|
- BYTE
|
Speed
|
1=Slowest (Default), 2= Double, 3=Triple, 4=Quadruple
|
- VOID
|
Return
|
|
AutoMoveToPositionInt
|
Automatically moves towards the new 16-bit position at a fixed rate determined by the AutoMoveSpeed.
|
- BYTE
|
Channel
|
The channel to assign the new position. Range: 0-7
|
- UINT
|
Position
|
Position to automatically move to. Range: 0-65535
|
- VOID
|
Return
|
|
Initialise
|
Sets up the servo motor interrupts
|
- VOID
|
Return
|
|
WriteLEDs
|
Allows control of all 8-LEDs on the front of the Formula Flowcode.
|
- BYTE
|
LED_Byte
|
|
- VOID
|
Return
|
|
Initialise
|
Starts up the formula flowcode PWM for motor control and performs the wait for button press
|
- VOID
|
Return
|
Property reference
|
Properties
|
|
Moving Part
|
Set an object on the System Panel to be the servo's actuator. The object's position at the moment of selection is taken to be the 'rest' position of the actuator - the maximum and minimum angles will be measured from this position.
|
|
Axis Object
|
Set a panel object to be the centre of rotation of the servo's actuator.
|
|
Move Around
|
Set the axis around which the actuator will revolve. If an 'Axis Object' is chosen, this will be a local axis of the chosen object, otherwise it will be the current world axes.
|
|
Movement Type
|
|
|
Minimum (degrees)
|
Angle that the servo turns when the PWM signal is at its minimum. Measured from the actuator object's 'rest' position, chosen at the time of connecting the object.
|
|
Maximum (degrees)
|
Angle that the servo turns when the PWM signal is at its maximum. Measured from the actuator object's 'rest' position, chosen at the time of connecting the object.
|
|
Connections
|
|
Simulations
|